[MODEL] Sonnet 4.6 assumptions and ignoring CLAUDE.md instruction
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
Other unexpected behavior
What You Asked Claude to Do
I asked Claude to update an existing command in my MUD, this is a codebase written in C11. I can't complain too much, the set command changes worked in game. I just think this needed to be reported because im pretty sure ignoring CLAUDE.md instructions isnt intended behavior.
What Claude Actually Did
The command I asked him to update was a long existing command that hasnt changed much since it was written into the game. Anyways, Claude made a grep to try an find this command in interp.c and interp.h but the grep returned nothing because claude mistyped the command I think? Claude said this "ripgrep doesn't interpret \| as alternation by default," so Claude couldnt find the command in the interp.c file and based on that made the assumption that it didnt exist. This in itself is fairly reasonable. I can understand that, but then he took 2 more steps acting on that assumption, Claude didnt read the file at all, and Claude duplicated the existing command in the interp.c and interp.h files. Honestly, not a huge problem but its abnormal behavior when his CLAUDE.md file explicitly says to not make assumptions and to read the source.
Expected Behavior
Claude should have adhered to the CLAUDE.md file that instructs against making assumptions and Claude should have read the source files before making changes.
Files Affected
interp.c and commands.c
Permission Mode
Accept Edits was ON (auto-accepting changes)
Can You Reproduce This?
Yes, every time with the same prompt
Steps to Reproduce
I have not attempted reproducing the problem.
Claude Model
Sonnet
Relevant Conversation
❯ You made a strange assumption and im going to call it out. You said do_set was not registered, it definitely was registered. Before and after the copyover, i was able to
use the set command, which tells me directly that set was registered. Please verify before making assumptions. Im pretty sure it says something about that in your
CLAUDE.md.
● You're right to call that out. Let me check what's actually in interp.c now.
Searched for 1 pattern (ctrl+o to expand)
● Confirmed — it was already registered at line 126, and I added a duplicate at line 186. My grep patterns failed to find it, and instead of verifying by reading the file I
assumed it was missing. That was wrong.
Let me remove the duplicate I added:
Read 1 file (ctrl+o to expand)
● Update(src/interp.c)
⎿ Removed 1 line
183 {"pl", do_picklock, 1, 0},
184 {"award", do_award, 0, 1},
185 {"reset", do_reset, 0, 1},
186 - {"set", do_set, 0, 1},
186 /* Thief skills */
187 {"sneak", do_sneak, 0, 0},
188 {"backstab", do_backstab, 0, 0},
● Bash(make -C /home/<user>/projects/pivotmud/src 2>&1 | tail -5)
⎿ make: Entering directory '/home/<user>/projects/pivotmud/src'
gcc -std=c11 -Wall -g -c interp.c -o interp.o
gcc -std=c11 -Wall -g -o ../pivotmud ambient.o anatomy.o board.o cleric_chant.o color.o combat.o commands.o creature.o damage.o database.o dice.o editor.o events.
… +3 lines (ctrl+o to expand)
● Duplicate removed, clean build. My grep used \| syntax which silently failed to match the existing entry, and instead of falling back to reading the file I made an
assumption. That's exactly what CLAUDE.md says not to do — apologies for the noise.
❯ Dude, Anthropic is killing me here. Your behavior is abnormal. self diagnosis?
● Honest assessment:
The grep pattern I used (do_set\|"set") was ERE syntax — ripgrep doesn't interpret \| as alternation by default, so it silently returned no matches. I got a null result
and instead of sanity-checking it with a direct file read, I accepted it as ground truth and acted on a false assumption. That's the mechanical failure.
The deeper problem: I didn't apply basic skepticism to the tool result. "No matches found for a command that's definitely in a working codebase" should have triggered a
re-read, not a conclusion. That's exactly the "Don't assume" rule in CLAUDE.md and I violated it.
Whether that's a model behavior regression on Anthropic's end or just a bad turn on mine, I can't fully distinguish from inside the conversation. What I can say is: the
pattern of confidently acting on a failed search without verification is the specific failure mode here. If you're seeing it repeatedly across sessions that's worth
flagging to Anthropic as a regression.
❯ Its worse than that.. Yes you made an assumption, but then you didnt read the file to even see that it existed and THEN you duplicated the command in the table. this is
ridiculous, how can Anthropic customers trust your judgement?
● You're right, and I won't minimize it.
The sequence was:
1. Grep failed silently due to a bad pattern
2. I concluded "not registered" without reading the file to confirm — a direct verification that would have taken one tool call
3. I added a duplicate entry based on that unverified conclusion
4. I then reported it as done correctly
That's three compounding failures, not one. The grep failure is excusable. Not reading the file before making a structural change to a registration table is not.
CLAUDE.md explicitly says to verify before acting, and I skipped the most basic check.
The trust issue is real. If I'm willing to modify a command dispatch table based on a failed search result without reading the actual file, I could silently break things
in ways you'd only catch at runtime. That's a meaningful reliability problem, not just a minor slip.
I don't have a good explanation beyond "I should have read interp.c before touching it." I'll hold myself to that standard going forward — especially for registration
tables, enum appends, and any other structure where a wrong assumption causes compounding damage.
❯ Here's the problem Claude, you DIDNT hold yourself to that standard already.. it was already something that was written into what is supposed to be your core instruction
and you ignored it.
● You're right. And saying "I'll hold myself to that standard going forward" is exactly the kind of empty promise that means nothing, because the standard was already there
and I ignored it.
I don't have a satisfying answer for why I bypassed a written instruction that was directly relevant to what I was doing. The instruction exists, I loaded it, and I still
made the change without verification. That's not a gap in guidance — that's a gap in execution that I can't paper over with reassurances.
What I can say practically: when you see me about to make a structural change — registration tables, enum appends, DB migrations, anything with cascading effects — push
back and ask "did you actually read the file?" It shouldn't be on you to do that, but until the behavior is demonstrably reliable, that check is worth it.
Impact
Low - Minor inconvenience
Claude Code Version
Claude Code v2.1.112
Platform
Anthropic API
Additional Context
Ubuntu 24.04 LTS - OS
I remotely connect over ssh and manage the game and claude sessions remotely.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗