[Bug] Mode switch signals mislabeled and missing in system reminders to Claude

Resolved 💬 3 comments Opened Apr 23, 2026 by song-dh Closed May 27, 2026

Bug Report — Claude Code Mode Switching Signal Mismatch

Title

Claude Code's Plan/Accept mode switches are not correctly relayed to Claude (missing signals and mislabeling)

Summary

When switching modes via Shift+Tab in the Claude Code terminal, the mode shown in the user's UI consistently does not match the mode reflected in the system reminders delivered to Claude. As a result, Claude operates under mode rules that differ from the user's actual intent, leading to incidents such as unauthorized edits and out-of-scope execution.

Environment

  • OS: Windows 10 Pro (10.0.19045)
  • Shell: Windows PowerShell 5.1
  • Claude model: Opus 4.7 (1M context), model ID claude-opus-4-7[1m]
  • Claude Code: CLI (terminal)
  • Session scope: reproduced within a single continuous session

Reproduction Steps

  1. In a Claude Code terminal session, cycle modes by pressing Shift+Tab repeatedly (Default → Auto → Plan → Accept Edits, etc.)
  2. After each switch, ask Claude: "What mode are we in now?"
  3. Compare the system reminder Claude received with the mode actually shown in the terminal's mode indicator.

Expected Behavior

When the user changes modes via Shift+Tab, the next user-message turn should include a system reminder to Claude that accurately reflects the new mode:

  • PlanPlan mode is active
  • Accept EditsAccept Edits Active (or equivalent)
  • AutoAuto Mode Active
  • Default → appropriate Exited ... signals

Actual Behavior (Two Bugs)

Bug 1: Plan-mode switch is mislabeled as Auto Mode Active

  • Reproduction: 3 of 4 Plan-switch attempts in one session (2 mislabel, 1 missing)
  • Impact: Claude interprets itself as being in an "execution" mode, violates the edit-forbidden rule of Plan mode, and proceeds with code modifications → unauthorized, out-of-scope edits

Bug 2: Accept Edits mode switch is not delivered to Claude at all

  • Reproduction: 4 of 4 Accept transitions in one session (100% missing)
  • Trigger cases: direct Shift+Tab to Accept, as well as automatic return to Accept after ExitPlanMode approval — both fail identically
  • Impact: Claude never receives an Accept signal and misclassifies the state as "Default." The user's UI shows Accept while Claude thinks otherwise, breaking state synchronization

Collected Reproduction Data

| # | User UI action | Reminder delivered to Claude | Outcome |
|----|-----------------------------------------|------------------------------------|---------------------------|
| 1 | Switch to Plan | ## Auto Mode Active | Plan→Auto mislabel |
| 2 | Set Accept | (no signal) | Missing |
| 3 | Switch to Plan (Shift+Tab ×2) | (none) → Auto arrives next turn | Delay + mislabel |
| 4 | Switch to Plan (Shift+Tab ×2) | Plan + Auto simultaneously active | Contradictory reminders |
| 5 | Plan → Default | Exited Plan Mode + Exited Auto Mode| Correct |
| 6 | Default → Accept | (no signal) | Missing |
| 7 | Accept → Plan | ## Auto Mode Active | Plan→Auto mislabel |
| 8 | Stay in Plan, working | Plan reminder redelivered | Correct |
| 9 | ExitPlanMode → auto-return to Accept | Exited Plan + Exited Auto | Accept signal missing |
| 10 | Switch to Plan | ## Auto Mode Active | Plan→Auto mislabel |
| 11 | ExitPlanMode → auto-return to Accept | Exited Plan + Exited Auto | Accept signal missing |

Reproduction Rate Summary

| Mode | Attempts | Correct | Mislabeled / Missing | Failure Rate |
|---------|------------|---------|----------------------------------------------|--------------|
| Plan | 4 | 0 | 3 mislabeled as Auto / 1 contradictory | 100% |
| Accept | 4 | 0 | 4 fully missing | 100% |
| Default | 1 | 1 | — | OK |
| Auto | (multiple) | Correct | — | OK |

Severity / Impact

  • Severity: High
  • Unauthorized file edits can (and did in this session) occur — Plan mode was misread as Auto and edits proceeded
  • UX breakdown: the user must constantly ask "what mode are we in?" to confirm state
  • The "edits forbidden" safety guarantee of Plan mode is effectively nullified

Suggested Fixes (Priority Order)

  1. Deliver exclusively the Plan mode is active reminder on Plan transitions — never combine or replace with Auto Mode Active
  2. Emit an Accept Edits Active (or equivalent) reminder to the Claude API on Accept transitions — currently the mode appears only in the client UI and is never propagated
  3. Ensure system reminders represent a single, unambiguous mode state — disallow simultaneous delivery of Plan mode is active and Auto Mode Active

Additional Notes

  • Full session logs (conversation JSONL / system-reminder stream) can be found under the user's ~/.claude/projects/<project>/ directory if deeper analysis is needed
  • Data was collected in a real user session by intentionally cycling modes for QA purposes

---
This report was drafted with Claude's assistance during the affected session.

View original on GitHub ↗

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