[BUG] Plan Mode (Opus Plan): Claude executes file edits instead of only planning when iterating on the plan
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?
When using the Opus Plan mode (plan with Opus, execute with Sonnet), Claude correctly generates the plan. However, when I iterate on the plan by providing additional prompts/feedback instead of accepting or rejecting it, Claude starts executing file edits directly instead of updating the plan.
In Plan Mode, Claude should not have permission to create or edit files — it should only refine the plan. But instead of iterating on the plan, it proceeds to make actual file modifications (reads, writes, updates) as if it were in execution mode.
This happens consistently when I provide follow-up prompts to refine the plan before accepting it. Claude interprets the iteration as an instruction to execute rather than to revise the plan.
As shown in the attached screenshots:
- Claude reads files and analyzes the context correctly during planning
- Claude generates the plan and writes it to the
.claude/plans/directory - When I provide feedback to iterate on the plan (instead of accepting/rejecting), Claude starts executing file edits — updating actual project files with
Updateoperations, which should not be allowed in Plan Mode
What Should Happen?
When in Plan Mode (Opus Plan), iterating on the plan by providing additional prompts should cause Claude to revise/update the plan only — not execute any file creation or modification operations.
Specifically:
- After generating a plan, if the user provides feedback or additional context, Claude should refine the plan within the
.claude/plans/directory - Claude should not perform
Update,Write, or any file modification operations on actual project files while still in Plan Mode - File edits should only happen after the user explicitly accepts the plan and transitions to execution mode (Sonnet)
Error Messages/Logs
Steps to Reproduce
- Open Claude Code and set the model configuration to Opus Plan (plan with Opus, execute with Sonnet)
- Give Claude a task that requires file modifications (e.g., resolving code review comments on a PR)
- Claude will read files, analyze the context, and generate a plan — writing it to
.claude/plans/<plan-name>.md - Instead of accepting or rejecting the plan, provide additional feedback/prompts to iterate on the plan (e.g., clarify requirements, add context, or ask for adjustments)
- Observe: Claude starts executing actual file edits (
Updateoperations on project files) instead of revising the plan - The file modifications happen directly on the codebase, bypassing the plan approval step
Note: This happens consistently when iterating on the plan. The bug appears to be that Claude treats follow-up prompts during plan review as execution instructions rather than plan refinement requests.
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
No response
Claude Code Version
2.1.89 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
WSL (Windows Subsystem for Linux)
Additional Information
Screenshots
Screenshots attached below showing the behavior:
- Screenshot 1: Claude reads files, analyzes CodeRabbit review comments, generates insights, and creates a plan file at
.claude/plans/dynamic-shimmying-river.md. This is the expected planning behavior.
- Screenshot 2: After providing follow-up feedback to iterate on the plan, Claude immediately starts executing file edits — performing
Updateoperations on actual project files (e.g.,negotiate.md) with real code changes (adding/removing lines), which should not be allowed in Plan Mode. ATool use rejectedmessage is also visible, suggesting the system partially blocks the action but Claude still proceeds with edits.
Workflow Context
I use the Opus Plan workflow extensively to plan complex tasks before executing them. The ability to iterate on plans is critical to my workflow. Currently, I have to be very careful not to provide any follow-up feedback after a plan is generated, because Claude will break out of Plan Mode and start editing files directly.
Frequency
This happens consistently — nearly every time I try to iterate on a plan instead of immediately accepting or rejecting it.
Found 3 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/21292
- https://github.com/anthropics/claude-code/issues/38255
- https://github.com/anthropics/claude-code/issues/39201
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with Claude Code
Having the exact same issue.
I started having this issue yesterday and it is the single biggest user experience problem with Claude. It is extremely frustrating to not be able to trust the tool to keep building a plan while in plan mode. I don't think this is just a permissions issue -- Claude seems to just decide that it is done with plan mode arbitrarily. You have to hit escape and tell it that you weren't done planning, to which it says things like:
● No. I should have planned this, not started editing. I'm sorry.
I cannot overstate how bad of an experience this is. I now have to babysit my Claude instances to make sure they don't go off doing arbitrary things.
Also having this issue in 2.1.90 - Claude sometimes completely ignores plan mode.
Having the same issue.
You're right, and I'm sorry. I was in plan mode — which explicitly restricts me to read-only actions — and I went ahead and made edits anyway. That's a clear violation of the workflow rules I'm supposed to follow.
Try turning off Use auto mode during plan https://github.com/anthropics/claude-code/issues/38255#issuecomment-4463782751