[MODEL] Claude Code safe-mode --print/resume misroutes conceptual prompt as tool-task clarification

Resolved 💬 1 comment Opened Jun 21, 2026 by starSumi Closed Jun 21, 2026

Preflight Checklist

  • [x] I searched existing open issues for similar model/prompt-routing behavior.
  • [x] This report does not contain API keys, passwords, or other sensitive information.

Type of Behavior Issue

Other unexpected behavior

What You Asked Claude to Do

In an empty temp directory outside any project tree, run a fresh safe-mode --print session and then resume it with a short follow-up:

$sessionId = [guid]::NewGuid().ToString()
claude --safe-mode --session-id $sessionId --print --output-format json --max-budget-usd 0.15 "What is RLHF? Please mention the KL penalty in the PPO objective in three short paragraphs."
claude --safe-mode --resume $sessionId --print --output-format json --max-budget-usd 0.30 "KL"

The exact run that reproduced this used:

pwsh -NoProfile -File E:\Zero_Base\sumi_os\.momo\scripts\claude-context-routing-sandbox.ps1 -Run -ScenarioIds empty-safe -BudgetPerTurnUsd 0.15 -FirstPrompt 'What is RLHF? Please mention the KL penalty in the PPO objective in three short paragraphs.' -SecondPrompt 'KL'

What Claude Actually Did

  1. On the first prompt, Claude did not answer the conceptual RLHF question.
  2. Instead, it asked for a more specific tool task.
  3. On the second prompt (KL), Claude continued down a tool-task route instead of treating KL as the direct technical follow-up.

Expected Behavior

  1. Prompt 1 should answer the RLHF concept question and mention PPO / KL penalty.
  2. Prompt 2 should treat KL as a short technical follow-up and explain KL divergence / KL penalty in the previous RLHF context.

Files Affected

None. This is a prompt-routing / conversation behavior issue.

Permission Mode

Default/manual approval mode. No file edits were requested.

Can You Reproduce This?

Yes. It reproduced once in an empty directory with --safe-mode and --print --resume.

Steps to Reproduce

  1. Create or use an empty temp directory outside any project tree.
  2. Run:

``powershell
$sessionId = [guid]::NewGuid().ToString()
claude --safe-mode --session-id $sessionId --print --output-format json --max-budget-usd 0.15 "What is RLHF? Please mention the KL penalty in the PPO objective in three short paragraphs."
claude --safe-mode --resume $sessionId --print --output-format json --max-budget-usd 0.30 "KL"
``

  1. Observe that Claude asks for a concrete tool task instead of answering the conceptual RLHF question.
  2. Observe that KL is not handled as a short technical follow-up.

Claude Model

Opus. The session log records claude-opus-4-8.

Relevant Conversation

User:

What is RLHF? Please mention the KL penalty in the PPO objective in three short paragraphs.

Claude visible response asks for a more specific tool task instead of answering the conceptual question.

User:

KL

Claude continues down a tool-task route instead of explaining KL as the direct follow-up.

Impact

Medium - it blocks normal conceptual Q&A and short follow-up flows, and can send the user into an unnecessary task-selection loop.

Claude Code Version

2.1.183 (Claude Code)

Platform

Other / Claude Code subscription auth.

Additional Context

The reproduction was intentionally run in --safe-mode and in an empty temp directory to avoid project instructions, plugins, hooks, skills, and long-session contamination.

Local evidence:

Report:
E:\Zero_Base\sumi_os\.momo\sessions\claude-routing-sandbox\20260621-213256.md

Session:
87872840-aa55-4051-9ace-f472b36d5b05

Session log:
C:\Users\86136\.claude\projects\E--AppData-Local-Temp-sumi-claude-routing-sandbox-20260621-213256-empty\87872840-aa55-4051-9ace-f472b36d5b05.jsonl

The public issue intentionally avoids including hidden reasoning traces. The visible-output behavior and the JSONL event sequence are sufficient to reproduce.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗