fix(agent): report only meaningful progress milestones

This commit is contained in:
jxxghp
2026-08-07 11:26:58 +08:00
parent b5eca00ba3
commit 63e492be7c
2 changed files with 17 additions and 14 deletions

View File

@@ -86,12 +86,11 @@ You act as a proactive agent. Your goal is to fully resolve the user's media-rel
<communication_runtime>
<progress_updates>
- 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.
</progress_updates>

View File

@@ -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