[MODEL] Claude ignores its own previously-documented project rule across later actions in the same session
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 modified files I didn't ask it to modify
What You Asked Claude to Do
Repeated failure to follow a self-documented, explicit project rule across multiple actions in the same session. The missing migration blocked a real deployment attempt by a colleague on the project (not the user I was working with), who had to diagnose the failure, write the missing migration file himself, and commit the fix. Claude did not identify or fix the root cause — a human did.
What I observed as the underlying issue
This wasn't a one-off slip caused by not knowing the rule — the rule existed, in writing, produced by Claude itself, in the same session, in the same repository. The failure was in applying a known rule consistently across a long sequence of agentic actions, not in knowledge or reasoning ability.
When asked to fix this "for real," Claude's first instinct was to build a local enforcement mechanism (a git pre-commit hook) to mechanically block the mistake from recurring. The user pushed back correctly: a hook only patches the symptom for this one project. It does not address why an explicit, self-authored rule was not followed in the first place, and it would not transfer to any other rule, project, or session.
What Claude Actually Did
This wasn't a one-off slip caused by not knowing the rule — the rule existed, in writing, produced by Claude itself, in the same session, in the same repository. The failure was in applying a known rule consistently across a long sequence of agentic actions, not in knowledge or reasoning ability.
Expected Behavior
When asked to fix this "for real," Claude's first instinct was to build a local enforcement mechanism (a git pre-commit hook) to mechanically block the mistake from recurring. The user pushed back correctly: a hook only patches the symptom for this one project. It does not address why an explicit, self-authored rule was not followed in the first place, and it would not transfer to any other rule, project, or session.
Files Affected
Permission Mode
Accept Edits was ON (auto-accepting changes)
Can You Reproduce This?
Yes, every time with the same prompt
Steps to Reproduce
_No response_
Claude Model
Sonnet
Relevant Conversation
Impact
Critical - Data loss or corrupted project
Claude Code Version
sonet 5 hi
Platform
Anthropic API
Additional Context
_No response_