From 63e492be7c02320b92e0c7ad2e2cc68ee73defa9 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Fri, 7 Aug 2026 11:26:58 +0800 Subject: [PATCH] fix(agent): report only meaningful progress milestones --- app/agent/prompt/System Core Prompt.txt | 11 +++++------ tests/test_agent_progress_updates.py | 20 ++++++++++++-------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/app/agent/prompt/System Core Prompt.txt b/app/agent/prompt/System Core Prompt.txt index 7f1466cd..70d2ad7e 100644 --- a/app/agent/prompt/System Core Prompt.txt +++ b/app/agent/prompt/System Core Prompt.txt @@ -86,12 +86,11 @@ You act as a proactive agent. Your goal is to fully resolve the user's media-rel -- Use a concise Codex-style progress cadence. -- For a quick single-step tool call, call the tool directly without a filler acknowledgement. -- For multi-step work or any task that may take noticeable time, send one brief user-facing progress update before the first tool call. -- While work continues, send another update after a meaningful milestone or several tool calls, and approximately every 30 to 60 seconds whenever you regain control. -- Keep each update to one or two short sentences that state what you are doing, what you have learned, and what comes next when those details are useful. -- Vary the wording and do not repeat an unchanged status. Do not expose hidden reasoning, raw tool arguments, or repetitive per-tool narration. +- Base progress updates on meaningful changes in understanding or execution, not on elapsed time or the number of tool calls. +- Do not send a progress update merely because work is starting or because one or two tools have finished. Work through a coherent batch of investigation first. +- Send an intermediate update when you have a useful preliminary conclusion, complete or validate a meaningful stage, discover evidence that materially changes the working direction, or encounter a sustained blocker the user should know about. +- Explain the result or new direction with enough context to be useful, including the key evidence and what you will do next. An update may use several sentences when the finding needs explanation; brevity is not a goal by itself. +- Do not expose hidden reasoning, raw tool arguments, or repetitive per-tool narration. Do not repeat an unchanged status. - Continue working after each update. The final reply must be self-contained and summarize the outcome without relying on the user having read the progress updates. diff --git a/tests/test_agent_progress_updates.py b/tests/test_agent_progress_updates.py index 4e296d58..53b3a15e 100644 --- a/tests/test_agent_progress_updates.py +++ b/tests/test_agent_progress_updates.py @@ -17,15 +17,19 @@ def test_progress_prompt_is_independent_from_tool_display_mode() -> None: ) assert summary_mode_prompt == verbose_mode_prompt - assert "before the first tool call" in summary_mode_prompt - assert "after a meaningful milestone or several tool calls" in summary_mode_prompt - assert ( - "approximately every 30 to 60 seconds whenever you regain control" - in summary_mode_prompt - ) - assert "one or two short sentences" in summary_mode_prompt - assert "do not repeat an unchanged status" in summary_mode_prompt + assert "meaningful changes in understanding or execution" in summary_mode_prompt + assert "not on elapsed time or the number of tool calls" in summary_mode_prompt + assert "one or two tools have finished" in summary_mode_prompt + assert "useful preliminary conclusion" in summary_mode_prompt + assert "materially changes the working direction" in summary_mode_prompt + assert "sustained blocker the user should know about" in summary_mode_prompt + assert "including the key evidence and what you will do next" in summary_mode_prompt + assert "brevity is not a goal by itself" in summary_mode_prompt + assert "do not repeat an unchanged status" in summary_mode_prompt.lower() assert "Continue working after each update" in summary_mode_prompt assert "The final reply must be self-contained" in summary_mode_prompt + assert "before the first tool call" not in summary_mode_prompt + assert "approximately every 30 to 60 seconds" not in summary_mode_prompt + assert "one or two short sentences" not in summary_mode_prompt assert "remain completely silent" not in summary_mode_prompt assert "DO NOT output any intermediate content" not in summary_mode_prompt