[sonnet 4.6] Claude Code repeatedly misinterprets scoped instructions and modifies out-of-scope files, wasting user tokens with no recourse
Preflight Checklist
- [x] I have searched existing issues for similar behavior reports
- [x] This report does NOT contain sensitive information (API keys, passwords, etc.)
Type of Behavior Issue
Claude ignored my instructions or configuration
What You Asked Claude to Do
What Claude Actually Did
⏺ 1. Misread "no env vars" as "remove from docs" — changed documentation
instead of the script signature. Repeated 4 times with different wrong
approaches (env var, TF_VAR_, reading from tfvars automatically).
- Searched the entire repo for account ID references when the user
explicitly said "only the script and the READMEs that call it."
- Modified a timestamped historical penetration test archive
(penetration-test/penetration-run/20260305-112518/ADDENDUM-Security-Fixes-20260305.md)
that was never mentioned and should never be touched.
- Made documentation changes without updating the script, and script
changes without updating the docs — repeatedly out of sync.
- Every wrong interpretation, repo-wide search, and revert consumed
billable tokens. The user had no recourse.
The correct fix was ~10 lines across 4 files. It took 15+ conversation
turns to get there.
Expected Behavior
- When a user scopes a task ("the script and the READMEs that call it"),
Claude changes only those files — no repo-wide searches, no touching
unrelated files.
- When corrected on the same point multiple times, Claude stops, states
its current understanding explicitly, and waits for confirmation before
acting.
- Claude never modifies timestamped archives, historical records, or
files in directories that are clearly not part of the stated task.
- When a script changes, Claude automatically syncs all documentation
that references that script — without being asked.
- A simple change (2-parameter script + 3 doc updates) is completed in
1-2 turns, not 15+.
Files Affected
scripts/create-openvpn-ssh-key.sh
docs/runbook-dev-rke2.md
docs/runbook-prod-eks.md
scripts/README.md
Permission Mode
Accept Edits was ON (auto-accepting changes)
Can You Reproduce This?
Haven't tried to reproduce
Steps to Reproduce
- Ask Claude to add a parameter to a script and update the docs that
reference it.
- When Claude misunderstands, correct it with the same instruction
rephrased.
- Observe Claude change something other than what was asked.
- Repeat correction. Observe Claude search the entire repo instead of
the stated files.
- Observe Claude modify a file in a historical/archive directory that
was never mentioned.
- Count the turns required to complete a change that should take 1-2.
Claude Model
Sonnet
Relevant Conversation
See the MD I uploaded
Impact
Medium - Extra work to undo changes
Claude Code Version
claude-sonnet-4-6
Platform
Anthropic API
Additional Context
_No response_
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗