[BUG] Auto mode system prompt overrides plan mode in same session — "do not enter plan mode" instruction causes immediate execution
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When both Auto Mode and Plan Mode are active in the same session, the model executes immediately instead of planning. The root cause is a direct conflict between the two system reminders injected in the same context window:
- Plan mode system prompt says: _\"do not execute yet — you MUST NOT make any edits\"_
- Auto mode system prompt says: _\"Execute immediately — Start implementing right away\"_ and _\"Do NOT enter plan mode unless the user explicitly asks\"_
Because both are present simultaneously and auto mode explicitly contains an anti-plan-mode instruction, the model treats the auto mode instruction as the more specific / later override and proceeds to execute.
This is distinct from #44318 (two concurrent sessions leaking into each other) — here there is only one session and both prompts arrive in the same context.
What Should Happen?
Plan mode should take hard precedence over auto mode. If the user explicitly invokes plan mode, that should be treated as the stronger, more recent signal regardless of what auto mode says. The auto mode prompt's instruction _\"do not enter plan mode unless explicitly asked\"_ should not be injected when plan mode is already active.
Steps to Reproduce
- Start a session with auto mode enabled (e.g. via
/autoor through the auto-mode onboarding flow) - In the same session, activate plan mode (e.g. via
EnterPlanModeor the/plancommand) - Give the agent a task
- Observe: agent skips planning and executes immediately
The session context at step 3 will contain both:
## Auto Mode Active
Execute immediately — Start implementing right away. Make reasonable assumptions and proceed on low-risk work.
...
Do not enter plan mode unless the user explicitly asks.
and:
Plan mode is active. The user indicated that they do not want you to execute yet -- you MUST NOT make any edits...
The conflicting instructions cause the model to execute rather than plan.
Observed Behaviour
Model proceeded to implement all changes (edited 6 files, ran tests, committed) without ever writing a plan or asking for approval.
Claude Model
Sonnet 4.6 (claude-sonnet-4-6)
Is this a regression?
Unknown — may have always existed once auto mode was introduced.
Claude Code Version
2.1.114 (or similar recent)
Platform
macOS / Anthropic API
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗