claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] Plan Mode (Opus Plan): Claude executes file edits instead of only planning when iterating on the plan

Open matheuspimentaa opened this issue 8 months ago • 6 comments

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:

  1. Claude reads files and analyzes the context correctly during planning
  2. Claude generates the plan and writes it to the .claude/plans/ directory
  3. When I provide feedback to iterate on the plan (instead of accepting/rejecting), Claude starts executing file edits — updating actual project files with Update operations, which should not be allowed in Plan Mode
Image Image

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

  1. Open Claude Code and set the model configuration to Opus Plan (plan with Opus, execute with Sonnet)
  2. Give Claude a task that requires file modifications (e.g., resolving code review comments on a PR)
  3. Claude will read files, analyze the context, and generate a plan — writing it to .claude/plans/<plan-name>.md
  4. 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)
  5. Observe: Claude starts executing actual file edits (Update operations on project files) instead of revising the plan
  6. 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.
Image
  • Screenshot 2: After providing follow-up feedback to iterate on the plan, Claude immediately starts executing file edits — performing Update operations on actual project files (e.g., negotiate.md) with real code changes (adding/removing lines), which should not be allowed in Plan Mode. A Tool use rejected message is also visible, suggesting the system partially blocks the action but Claude still proceeds with edits.
Image

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.

matheuspimentaa avatar Apr 01 '26 20:04 matheuspimentaa

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/21292
  2. https://github.com/anthropics/claude-code/issues/38255
  3. 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

github-actions[bot] avatar Apr 01 '26 20:04 github-actions[bot]

Having the exact same issue.

majidmanzarpour avatar Apr 01 '26 22:04 majidmanzarpour

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.

tgockel avatar Apr 02 '26 22:04 tgockel

Also having this issue in 2.1.90 - Claude sometimes completely ignores plan mode.

schugazi avatar Apr 02 '26 23:04 schugazi

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.

thbuerg avatar Apr 10 '26 09:04 thbuerg

Try turning off Use auto mode during plan https://github.com/anthropics/claude-code/issues/38255#issuecomment-4463782751

blueohsix avatar May 15 '26 21:05 blueohsix