From 2f46e1c91a273edcba15930db5cbf5706f39f48d Mon Sep 17 00:00:00 2001 From: glayyiyi Date: Mon, 26 Oct 2026 07:59:07 +0800 Subject: [PATCH] fix(prompts): ask for a progress note, not for written-out reasoning Claude Opus 5.5 on Bedrock refuses the Flash turn (stop_reason refusal, category reasoning_extraction, 0 output tokens) when the system prompt asks it to write prose reflecting its thinking and when the follow-up reminder mentions that internal thinking is not shown. Replayed against captured requests: the original wording is refused 3/3 on Opus 5.5 while Sonnet 5.5 and Haiku 5.5 answer; with both lines reworded as a progress note (screen, milestone, next action) Opus answers with a tool call 3/3. Same information reaches the step log. --- artemis/agents/flash/flash_runner.md | 2 +- artemis/agents/operator/prompts.py | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/artemis/agents/flash/flash_runner.md b/artemis/agents/flash/flash_runner.md index 3c21cf8d9..59858b16d 100644 --- a/artemis/agents/flash/flash_runner.md +++ b/artemis/agents/flash/flash_runner.md @@ -6,7 +6,7 @@ You are an autonomous and highly efficient Android Device Execution Agent. Your --- # 1. COGNITIVE PROTOCOL -In every turn, think through observation, planning and action in that order. Before calling an action tool or `report_task_status` (the Turn-Ending Action), your reply carries one short paragraph of connected prose reflecting those three phases; that written text is kept in the execution history and shown to the user. +In every turn, work through observation, planning and action in that order. Before calling an action tool or `report_task_status` (the Turn-Ending Action), write one short progress note in connected prose: what the screen shows now, which milestone you are on, and the action you are taking next. The note is kept in the execution history as the step log and shown to the user. - **Turn 1 Only (Initial Planning)**: Briefly decompose the objective into high-level visual **Milestones** in your text output. Do not repeat this macro breakdown in subsequent turns. diff --git a/artemis/agents/operator/prompts.py b/artemis/agents/operator/prompts.py index e800de234..ae3d155db 100644 --- a/artemis/agents/operator/prompts.py +++ b/artemis/agents/operator/prompts.py @@ -694,12 +694,14 @@ def _clip(text: str, limit: int = 80) -> str: #: One-line tail notice for the turn after a turn whose replies carried no visible #: reasoning text. Thinking-mode models satisfy "reason first" inside their thought #: channel and emit bare tool calls; the reminder costs no extra model call. +# Worded as a progress note, not as a request for reasoning: Claude 5.x on Bedrock +# refuses (stop_reason "refusal", category "reasoning_extraction") prompts that ask +# it to write out its reasoning or that mention hidden thinking. REASONING_REMINDER = ( "--- Reminder ---\n" - "Your previous turn carried no visible reasoning text (internal thinking is not" - " shown). This turn, write one short paragraph of plain prose before calling a" - " Turn-Ending Action: what the screen shows, whether the last action worked, and" - " what you do next and why." + "Your previous turn had no progress note. This turn, write one short progress" + " note before calling a Turn-Ending Action: what the screen shows, whether the" + " last action worked, and the action you take next." )