fix(gateway): suppress the duplicate clarify tool-progress bubble (#69175) - #69212
Conversation
…usResearch#69175) When tool progress is enabled, a clarify call emitted two near-identical messages: the generic tool-progress bubble ("❓ Asking <question>") built from get_tool_verb("clarify") -> "Asking", and then the full prompt sent by the clarify tool's own callback (send_clarify, via _clarify_callback_sync in gateway/run.py). The bubble was a verbatim duplicate of the prompt. Add agent.display.tool_renders_own_progress(), mirroring the existing verb_drops_preview() predicate, to mark tools that deliver their own complete prompt via a dedicated adapter callback, and skip the generic tool-progress bubble for them in progress_callback. The ephemeral status line and log-mode logging are unaffected; the clarify verb mapping is left intact.
Related: #54328 already includes the clarify progress-bubble suppression alongside a separate prose-before-poll ordering repair. This is a focused alternative; maintainers can choose the preferred scope. |
…eadlock Fix P1 Windows packaging (NousResearch#69179) and Terminal Deadlock (NousResearch#69212)
|
Thanks for the sharp diagnosis @PRATHAMESH75 — you found the exact root cause (the generic tool-progress bubble duplicating This landed hours earlier via #69318 (merged): the gateway now skips the tool-progress bubble for Appreciate both your Slack PRs today — the block-text one (#68160) was also superseded only because a broader consolidated fix covered it. Keep them coming. |
Summary
When tool progress is enabled, a
clarifycall renders two near-identical messages in chat:❓ Asking <question>— built fromget_tool_verb("clarify")→"Asking"inprogress_callback.send_clarify, scheduled from_clarify_callback_syncingateway/run.py).The bubble is a verbatim duplicate of the prompt, so the user sees the same clarify question twice (#69175).
Fix
clarifyalready owns its chat rendering via the adapter'ssend_clarifycallback, so its generic progress bubble is always redundant. This PR:agent.display.tool_renders_own_progress()— a small predicate mirroring the existingverb_drops_preview()idiom — backed by a_TOOL_SELF_RENDERED_PROGRESSfrozenset marking tools that deliver their own complete prompt via a dedicated adapter callback;progress_callbackingateway/run.pyon it, right after thetool.startedfilter, so the duplicate bubble is skipped.Scope is deliberately narrow:
setStatus) andlog-mode stdout logging are unaffected — they run before this gate;clarifyverb mapping ("Asking") is left intact, so nothing else that reads the verb changes.Tests
tests/agent/test_display.py::TestToolRendersOwnProgress— the predicate isTrueforclarify,Falsefor regular tools, and the verb mapping stays defined.tests/agent/test_display.pyplus the gateway clarify suites (test_clarify_active_session_bypass,test_telegram_clarify_buttons,test_discord_clarify_buttons) — 106 passed, no regressions.Fixes #69175