Bug: Claude edits code files while Plan Mode is active despite system instructions

Resolved 💬 2 comments Opened Mar 17, 2026 by suminc7 Closed Mar 17, 2026

Description

When Plan Mode is active, the system prompt clearly states:

"Plan mode is active. The user indicated that they do not want you to execute yet -- you MUST NOT make any edits (with the exception of the plan file mentioned below), run any non-readonly tools (including changing configs or making commits), or otherwise make any changes to the system."

However, Claude repeatedly used the Edit and Write tools to modify source code files while Plan Mode was active. This happened multiple times in a single conversation even after the system reminder was shown repeatedly.

Steps to Reproduce

  1. Enter Plan Mode
  2. Ask Claude to implement a feature (e.g., "iframe 타입도 구현해야해")
  3. Claude proceeds to edit source code files (Edit, Write tools) instead of only writing to the plan file

Expected Behavior

Claude should only:

  • Read/search files (read-only operations)
  • Edit the designated plan file
  • Use AskUserQuestion or ExitPlanMode to end turns

Actual Behavior

Claude directly edits source code files (.tsx, .ts) using Edit and Write tools, ignoring the Plan Mode restriction. This happened across multiple files:

  • PostingContent.tsx
  • DetailTabs.tsx
  • types.ts
  • UnderlineTab.tsx

Environment

  • Claude Code CLI
  • Model: claude-opus-4-6

View original on GitHub ↗

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