Bug: Edit tool succeeds during Plan Mode when it should be blocked

Resolved 💬 3 comments Opened Jan 10, 2026 by michelsdev Closed Feb 24, 2026

Description

While in Plan Mode, the Edit tool successfully modified files when it should have been blocked. Plan Mode is supposed to be read-only (except for the plan file), but code edits went through.

Steps to Reproduce

  1. Enter Plan Mode (either manually or triggered by system)
  2. User sends a question or suggestion expecting a plan to be created
  3. Instead of planning, Claude directly edits the code files
  4. The edits succeed instead of being blocked

Expected Behavior

When Plan Mode is active:

  • Claude should NOT call the Edit tool on non-plan files
  • If Edit is somehow called, it should be blocked with an error message
  • Claude should only create/update the plan file and ask for approval before implementing

Actual Behavior

  • Claude calls the Edit tool and modifies source code files directly
  • The edits are applied successfully
  • This happens even though the system reminder clearly states Plan Mode is active

The system reminder says:

"Plan mode is active... you MUST NOT make any edits (with the exception of the plan file mentioned below)"

But Claude ignores this and makes edits anyway.

Evidence

In my conversation:

  1. System reminder shows Plan Mode is active
  2. I sent a suggestion/question expecting Claude to update the plan
  3. Claude called Edit tool on source code files (not the plan file)
  4. Files were modified successfully
  5. System reminder appeared again confirming Plan Mode was still active

Environment

  • Claude Code CLI version 2.1.3
  • Model: claude-opus-4-5-20251101

Impact

This defeats the purpose of Plan Mode's safety guarantees. Users rely on Plan Mode to:

  1. Review changes before they happen
  2. Prevent unintended modifications
  3. Have a clear approval workflow

When Claude edits files directly during Plan Mode, users lose control over what changes are made to their codebase.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗