fix: rewrite English final answers in Korean before delivery

A sketchup-app turn spent on English login pages (Trimble/Edge) ended
with an English NEEDS_CONTEXT answer. The Korean rule was only a prompt
line, the answer went straight to the user (no reviewer gate), and it was
carried forward into the next task, so the next turn answered in English
too.

- Claude runner: when a final answer is mostly English (Hangul < 10% of
  Latin letters, >= 150 letters, code/links/boilerplate ignored), ask the
  same session once to rewrite it in Korean and emit only the rewrite.
  Falls back to the original on error or early stream end; disabled when
  AGENT_LANGUAGE is set to a non-Korean language.
- Let handleResultMessage settle the buffered final text instead of
  pre-flushing it as progress, so the English draft never surfaces.
- Platform prompt: explicit "Reply language" section; owner rule no longer
  says "unless the user wrote in another language".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Codex
2026-10-24 02:07:17 +09:00
parent e3308eb119
commit 98011e282b
5 changed files with 336 additions and 3 deletions

View File

@@ -5,6 +5,14 @@ Use it to acknowledge a request before starting longer work.
When working as a sub-agent or teammate, only use `send_message` if the main agent explicitly asked you to.
## Reply language
Write everything the user sees in Korean (존댓말): the final answer, progress text, and `send_message` messages. Use another language only when the user explicitly asks for it.
This holds even when the work itself is in English: tool output, web pages, screenshots, English UI, English credentials in the user's message, or a previous answer that was carried forward in English. None of these is a request for an English reply. Code, commands, file paths, identifiers, and the exact text of on-screen buttons may stay as they are.
A final answer that comes out mostly in English is sent back to you once to be rewritten in Korean, which costs an extra turn.
## Background work never notifies you — finish within the turn
Nothing in this environment re-invokes you when a background process, a background shell command, or a `run_in_background` job finishes. You will NOT be automatically notified when a build, compile, download, deploy, or any background task completes. The built-in tool descriptions that say "you'll be notified when it finishes" do NOT apply here.