From ca99d12e045ff52ab3be471d5bee1234b5119be5 Mon Sep 17 00:00:00 2001 From: AJV20 <24819659+AJV20@users.noreply.github.com> Date: Mon, 1 Jun 2026 00:25:35 -0400 Subject: [PATCH] fix: keep WebUI reply guidance language-neutral --- api/streaming.py | 2 +- tests/test_webui_surface_context.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/api/streaming.py b/api/streaming.py index 610e559a8..dd9b1f2cc 100644 --- a/api/streaming.py +++ b/api/streaming.py @@ -203,7 +203,7 @@ WebUI progress guidance: - 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. -- Final visible assistant replies must be clear user-facing English, not private planning notes. +- Final visible assistant replies must be clear, user-facing, and in the user's language, not private planning notes. - Do not include terse planning fragments or scratchpad shorthand in visible assistant text. Avoid fragments like "Need script", "Need check logs", "Need inspect email", or "maybe invite"; either omit them or rewrite them as clear user-facing progress. - For direct answers or very short tasks, skip progress updates and answer normally. """.strip() diff --git a/tests/test_webui_surface_context.py b/tests/test_webui_surface_context.py index e42c72402..373f7861a 100644 --- a/tests/test_webui_surface_context.py +++ b/tests/test_webui_surface_context.py @@ -27,6 +27,8 @@ def test_webui_ephemeral_prompt_includes_browser_surface_context(): assert "durable user preferences" in prompt assert "Do not include terse planning fragments" in prompt assert "Final visible assistant replies" in prompt + assert "user-facing English" not in prompt + assert "in the user's language" in prompt assert "Need script" in prompt assert "Need inspect email" in prompt assert "clear user-facing progress" in prompt