[BUG] Edit tool not blocked during plan mode — file modifications succeed when they should be rejected
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?
During an active plan mode session, the Edit tool successfully modified a source file (src/app.jsx). Plan mode instructions explicitly state edits are forbidden except to the plan file, but the Edit tool executed without rejection.
What Should Happen?
During an active plan mode session, the Edit tool successfully modified a source file (src/app.jsx). Plan mode instructions explicitly
state edits are forbidden except to the plan file, but the Edit tool executed without rejection.
Expected: Edit tool should reject the modification with an error, similar to how ExitPlanMode was rejected when the user declined
Actual: The edit was applied to the source file
Session context: Claude Opus 4.6 (1M context), CLI session, macOS
Error Messages/Logs
Steps to Reproduce
Steps to reproduce:
- Enter plan mode via /update-help or EnterPlanMode
- While plan mode is active, use the Edit tool to modify a non-plan file
- The edit succeeds instead of being blocked
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.83
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗