Skip to content

[BUG] Edit tool not blocked during plan mode — file modifications succeed when they should be rejected #39201

@ericmstone

Description

@ericmstone

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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:

  1. Enter plan mode via /update-help or EnterPlanMode
  2. While plan mode is active, use the Edit tool to modify a non-plan file
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:toolsbugSomething isn't workinghas reproHas detailed reproduction stepsplatform:macosIssue specifically occurs on macOSstaleIssue is inactive

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions