[BUG] Plan mode re-activated via shift+tab after ExitPlanMode does not re-emit system-reminder (single session)

Resolved 💬 3 comments Opened Apr 13, 2026 by YUJOO-LEE Closed May 5, 2026

Preflight Checklist

  • [x] I have searched existing issues (#44318 is related but describes two concurrent sessions; this report is about a single session)
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code (2.1.104)

What's Wrong?

Within a single Claude Code session, re-activating plan mode via shift+tab after a prior ExitPlanMode does not re-emit the Plan mode is active system-reminder on subsequent turns. Meanwhile, the ## Auto Mode Active reminder continues to be injected. The agent, having no plan-mode signal but receiving an auto-mode "execute immediately" signal, bypasses plan mode and applies edits directly.

I verified this by inspecting the actual system-reminder blocks reaching the agent across turns in the session where this occurred: after ExitPlanMode, subsequent turns included ## Auto Mode Active but never Plan mode is active again — despite the user having toggled plan mode back on between turns.

What Should Happen?

Every user turn during which plan mode is active should receive a fresh Plan mode is active system-reminder, regardless of whether ExitPlanMode was previously called in the same session. Toggling plan mode back on via shift+tab should restore reminder injection for the current and subsequent turns.

Steps to Reproduce

  1. Start a Claude Code session with auto mode enabled.
  2. shift+tab to enable plan mode.
  3. Send a task requiring code changes.
  4. Agent plans, calls ExitPlanMode, user approves, agent implements.
  5. shift+tab to re-enable plan mode (UI shows plan mode on).
  6. Send a follow-up code-change request.
  7. Observe: the agent's next turn contains ## Auto Mode Active but no Plan mode is active reminder. Agent executes immediately instead of planning.

Expected vs Actual

  • Expected: Agent enters plan mode, writes/updates the plan file, calls ExitPlanMode for approval before any edits.
  • Actual: Agent applies edits without planning because it receives no plan-mode signal.

Likely Root Cause

Speculation, based on observed behavior:

  • ExitPlanMode appears to set a session-scoped flag (e.g. "planApproved") that inhibits subsequent Plan mode is active injections.
  • The shift+tab toggle updates the UI state but does not clear that flag, nor does it trigger the reminder-injection pipeline.
  • Net effect: the agent has no way to know plan mode is back on, because its only channel for mode state is the per-turn system-reminder.

Related Issues

  • #44318 — concurrent-session context bleed (similar symptom, different cause)
  • #43494 / #33037 — plan mode auto-enters then silently exits during a Read call (different trigger)

Workarounds

  • Disable auto mode (/auto off) before toggling plan mode — the conflicting auto-mode reminder disappears, reducing ambiguity (but plan-mode reminder still may not re-inject).
  • Explicitly mention "plan mode" in the message so the agent can infer from user text.

Environment

  • Claude Code: 2.1.104
  • Model: claude-opus-4-6 (1M context)
  • OS: macOS Darwin 25.4.0
  • Shell: zsh

Additional Notes

The agent cannot self-diagnose plan-mode state: its only reliable channel is the per-turn system-reminder injection. Memory/CLAUDE.md-level rules ("always plan first") are structurally outweighed by the active auto-mode reminder ("execute immediately") when the two conflict in the same context, so this must be fixed at the reminder-injection layer — prompt-side mitigations do not solve it.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗