From 4a56e2cd88c328c9258bb24274cd1d1f1086c386 Mon Sep 17 00:00:00 2001 From: Teknium Date: Thu, 26 Mar 2026 01:52:52 -0700 Subject: [PATCH] fix(display): show tool progress for substantive tools, not just "preparing" _mute_post_response was set True whenever a turn had both content and tool_calls, suppressing ALL subsequent _vprint output including tool completion messages. This meant users only saw "preparing search_files..." but never the result. Now only mutes output when every tool in the batch is housekeeping (memory, todo, skill_manage, session_search). Substantive tools like search_files, read_file, write_file, terminal etc. keep their completion messages visible. Also fixes: run_conversation no longer raises on max retries (returns graceful error dict instead), and cli.py wraps the agent thread in try/except as a safety net. Made-with: Cursor --- run_agent.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/run_agent.py b/run_agent.py index 755a79343..bedf24a13 100644 --- a/run_agent.py +++ b/run_agent.py @@ -7097,11 +7097,19 @@ class AIAgent: turn_content = assistant_message.content or "" if turn_content and self._has_content_after_think_block(turn_content): self._last_content_with_tools = turn_content - # The response was already streamed to the user in the - # response box. The remaining tool calls (memory, skill, - # todo, etc.) are post-response housekeeping — mute all - # subsequent CLI output so they run invisibly. - if self._has_stream_consumers(): + # Only mute subsequent output when EVERY tool call in + # this turn is post-response housekeeping (memory, todo, + # skill_manage, etc.). If any substantive tool is present + # (search_files, read_file, write_file, terminal, ...), + # keep output visible so the user sees progress. + _HOUSEKEEPING_TOOLS = frozenset({ + "memory", "todo", "skill_manage", "session_search", + }) + _all_housekeeping = all( + tc.function.name in _HOUSEKEEPING_TOOLS + for tc in assistant_message.tool_calls + ) + if _all_housekeeping and self._has_stream_consumers(): self._mute_post_response = True elif self.quiet_mode: clean = self._strip_think_blocks(turn_content).strip()