Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions api/streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,12 @@ def _clarify_timeout_seconds(default: int = 120) -> int:

_WEBUI_PROGRESS_PROMPT = """
WebUI progress guidance:
- Match the normal Hermes messaging style; do not add extra status updates solely because this is a browser session.
- For long multi-step work that uses tools, you may provide brief user-visible progress updates before continuing with tool calls.
- Match the normal Hermes messaging style, but do not let long tool-running WebUI turns appear silent.
- For long multi-step work that uses tools, emit brief user-visible progress updates as normal assistant content, not only as hidden reasoning.
- Before the first tool batch in a long task, say what you are about to inspect.
- After each meaningful batch of tool calls, say what you just confirmed and what you will check next before continuing with more tools.
- Do not run many independent tool batches back-to-back without visible assistant text between them when the task is still ongoing.
- Do not keep progress only in reasoning, thinking, or tool-result channels; those are not a substitute for visible interim updates.
- Each update should say what you are about to check, what you just confirmed, or why the next tool call is needed.
- Keep updates concise, factual, and in the user's language. One or two short sentences are enough.
- Do not reveal hidden reasoning, chain-of-thought, private scratchpads, secrets, raw logs, or long tool output.
Expand Down
29 changes: 28 additions & 1 deletion tests/test_sprint42.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,34 @@ def path(self):
self.assertTrue(callable(init_kwargs["interim_assistant_callback"]))
self.assertIn("WebUI progress guidance", captured["agent"].ephemeral_system_prompt)
self.assertIn("Match the normal Hermes messaging style", captured["agent"].ephemeral_system_prompt)
self.assertIn("user-visible progress updates", captured["agent"].ephemeral_system_prompt)
self.assertIn(
"do not let long tool-running WebUI turns appear silent",
captured["agent"].ephemeral_system_prompt,
)
self.assertIn(
"emit brief user-visible progress updates as normal assistant content",
captured["agent"].ephemeral_system_prompt,
)
self.assertIn(
"Before the first tool batch in a long task, say what you are about to inspect",
captured["agent"].ephemeral_system_prompt,
)
self.assertIn(
"After each meaningful batch of tool calls, say what you just confirmed",
captured["agent"].ephemeral_system_prompt,
)
self.assertIn(
"Do not run many independent tool batches back-to-back without visible assistant text between them",
captured["agent"].ephemeral_system_prompt,
)
self.assertIn(
"Do not keep progress only in reasoning, thinking, or tool-result channels",
captured["agent"].ephemeral_system_prompt,
)
self.assertNotIn(
"you may provide brief user-visible progress updates",
captured["agent"].ephemeral_system_prompt,
)

interim_events = []
while not fake_queue.empty():
Expand Down
Loading