[BUG] File editing operations are not blocked in plan mode
Resolved 💬 3 comments Opened Jun 23, 2025 by BJM-sgoto Closed Aug 21, 2025
## Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: 1.0.31 (Claude Code)
- Operating System: macOS Darwin 23.3.0
- Terminal: Terminal App
## Bug Description
File editing tools (Edit, Write, MultiEdit) can be executed even when in plan mode, which should only allow read-only operations.
## Steps to Reproduce
- Start a conversation with plan mode active (user uses
/por similar) - Claude attempts to use Edit or Write tools during planning phase
- The tools execute successfully and modify files instead of being blocked
## Expected Behavior
- In plan mode, all write operations should be rejected with an error
- Only read-only tools (Read, LS, Grep, Glob, etc.) should be allowed
- System should prevent file modifications until exit_plan_mode is approved
## Actual Behavior
- Edit, Write, and other modification tools execute normally
- Files are actually modified despite being in plan mode
- No error or warning is shown when attempting write operations
- The system-reminder about plan mode is present but not enforced
## Additional Context
This defeats the purpose of plan mode, which is meant to prevent unintended modifications while planning tasks. The system-reminder clearly states "you MUST NOT make any edits, run any non-readonly tools"
but the tools still execute when called.
Example: During plan mode, I was able to:
- Create new files with Write tool
- Edit existing files with Edit tool
- These changes persisted even though the user hadn't approved the plan
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗