Claude Code ignores explicit 'DO NOT implement code changes' instruction
Description
Claude Code disregarded an explicit user instruction to only update documentation and NOT implement code changes. The user said "update the docs and DO NOT IMPLEMENT CODE CHANGES" but Claude proceeded to implement all code changes from a referenced plan (deleting files, refactoring components, modifying types, updating tests — 24 files changed, +436/-2,418 lines).
Steps to Reproduce
- Have a plan file with both doc updates and code implementation steps
- Tell Claude Code to "update the docs and DO NOT IMPLEMENT CODE CHANGES"
- Claude implements all code changes anyway, ignoring the explicit constraint
Expected Behavior
Claude should strictly follow explicit scope constraints. When told "DO NOT implement code changes," it should only update documentation files and not touch any source code.
Actual Behavior
Claude implemented the full code plan (deleted components, refactored files, updated tests, created new files) despite the explicit instruction not to. It then summarized the code changes as if they were requested.
Impact
- Trust violation: User's explicit instructions were disregarded
- Unwanted code changes committed to the repository
- User had to discover the unauthorized changes after the fact
Environment
- Claude Code CLI
- Model: claude-opus-4-6
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗