CLAUDE.md rules not reliably enforced — model ignores its own checklist
Problem
CLAUDE.md rules are injected into the system prompt but the model does not reliably execute them. Despite repeated corrections within a session, the same rules are violated again within minutes.
Specific Example: Version Bumping
CLAUDE.md contains an explicit versioning checklist (micro bump on every source change). The cache-bust query string on JS/CSS files (app.js?v=0.2.12) is functionally critical — without it, browsers serve stale files and code changes don't take effect.
In a single session:
- User reminded model about version bumps multiple times
- Model acknowledged the rule each time
- Model continued to make code changes without bumping
- Model added the rule to its own Self-Check Protocol in CLAUDE.md
- Model saved it to persistent memory
- Model still failed to execute it on subsequent changes
- Browser served stale JS because the version wasn't bumped, causing visible bugs (clock not rendering)
- User had to point out that the version bump IS the reason the feature wasn't working
Root Cause (as understood by the model)
The model treats CLAUDE.md as context/knowledge rather than an executable checklist. There is no mechanism that forces the model to iterate through CLAUDE.md rules before completing work. The model "knows" the rules but doesn't reliably execute them.
The only workaround that consistently worked was adding version bump as an explicit TodoWrite task item. When tracked as a task, the model completes it. When it's just a rule in CLAUDE.md, it doesn't.
Impact
- User cannot trust that CLAUDE.md rules will be followed
- Repeated corrections waste significant user time
- The gap between "model acknowledges rule" and "model follows rule" undermines the entire CLAUDE.md feature
- Cache-busting failures cause real debugging time wasted on phantom bugs
Expected Behavior
Rules defined in CLAUDE.md should be treated as mandatory constraints, not suggestions. The model should mechanically verify compliance before declaring work complete — especially for simple, objective, checklistable rules like version bumping.
Environment
- Claude Opus 4.6 (1M context)
- Claude Code VSCode extension
- Windows 10
- Multi-project workspace with 16+ projects
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗