Plan mode indicator vs. enforcement desync when resuming a conversation that was in "edits on"
What happened
When I resume an older conversation that previously ended in normal/"edits on" (accept-edits)
mode and then submit a new request while the status line shows plan mode on, plan mode is
not enforced for that turn:
- Non-read-only tools (file writes,
git commit,git push,gh pr create) executed
successfully instead of being blocked.
- No "Plan mode is active — you MUST NOT make edits" system reminder was injected for that turn.
- The bottom status line still displayed
plan mode on (shift+tab to cycle)the whole time.
On a subsequent turn, plan-mode enforcement kicked in as expected (the restriction reminder
appeared and writes were blocked). So the desync appears to happen at resume / first-request time.
Expected behavior
The displayed mode and the enforced mode should always match. If the status line saysplan mode on, non-read-only tools should be blocked and the agent should receive the plan-mode
restriction context.
Actual behavior
Indicator shows plan mode on, but edits/commits/pushes/PR creation execute (enforcement is
effectively "edits on"). The mode carried over from the resumed session's previous state instead
of reflecting the currently displayed plan mode.
Steps to reproduce
- Have a conversation that ends while in normal / accept-edits ("edits on") mode.
- Resume it (e.g.
claude --resume/--continue). - Switch to plan mode with shift+tab — status line shows
plan mode on. - Submit a new request that would perform edits.
- Observe: edits/commits/pushes execute despite
plan mode onbeing displayed; no plan-mode
restriction reminder for that turn.
Environment
- Claude Code: 2.1.231
- OS: macOS 26.6.2 (build 25G83), darwin
- Shell: zsh
Notes
This is a safety-relevant mismatch: a user believing they are in plan mode may have changes made
to their working tree / remote (branches, commits, PRs) without the expected read-only guardrail.