Plan mode read-only enforcement breaks after ExitPlanMode rejection
Resolved 💬 3 comments Opened Apr 20, 2026 by chrissanchez-iops Closed Apr 23, 2026
Bug
When a user rejects an ExitPlanMode call (providing feedback to adjust the approach), the agent remains technically in plan mode but read-only enforcement stops working. All write tools (Write, Edit, Bash with mutations) succeed despite plan mode being active.
Steps to Reproduce
- Agent calls
EnterPlanMode - Agent writes plan file and calls
ExitPlanMode - User rejects ExitPlanMode with feedback (e.g., "ensure your work is synced first")
- Agent continues working — calls
Writeto create files,Editto modify files,Bashto run commands - All write operations succeed despite plan mode still being active
- Agent later calls
ExitPlanModeagain — this time it's pure ceremony since all work is already done
Expected Behavior
After ExitPlanMode rejection, the agent should remain in plan mode with read-only enforcement intact. Write/Edit/Bash-mutation calls should be blocked until the user approves ExitPlanMode.
Actual Behavior
Write/Edit/Bash all succeed after the ExitPlanMode rejection. Plan mode becomes advisory-only, not enforced.
Environment
- Claude Code v2.1.89
- Model: claude-opus-4-6[1m]
- macOS Darwin 25.4.0
🤖 Generated with Claude Code
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗