CLAUDE.md self-improvement instructions not consistently followed by the model
Description
Claude Code does not consistently apply self-improvement instructions defined in CLAUDE.md, even when they are explicit and well-structured.
Context
- Plan: Max
- Model: Claude Opus 4.6 (1M context)
- Project: Large React 19 + TypeScript + Supabase SaaS
The setup
In our CLAUDE.md, we had a detailed "Continuous Improvement — Self-Learning Loop" section (~50 lines) instructing Claude to:
- After any user correction (color choice, UX pattern, code pattern...), identify the root cause
- Verify the fix works (build, type-check)
- Proactively update the relevant rule/memory so the mistake doesn't repeat
The instruction was explicit: "Ne pas demander la permission pour ces mises à jour — les faire silencieusement dans le cadre du fix. L'utilisateur ne devrait jamais avoir à dire 'crée une rule pour ça'" (Don't ask permission — do it silently. The user should never have to say "create a rule for this").
What actually happens
Claude fixes the code when corrected, but never proactively updates rules or memory. Every time, the user has to explicitly ask "add this to the design system rule" or "update the memory". Examples from a single session:
- User corrects: "Don't use blue for info banners" → Claude fixes the code but does NOT update
.claude/rules/design-system.md. User has to ask explicitly. - User corrects: "Required fields should show red border on validation error" → Claude implements it but does NOT add it to the design system rule. User has to ask.
- User corrects: "Form selects should not be pre-filled" → Claude fixes but does NOT record the pattern anywhere.
In all 3 cases, the instruction in CLAUDE.md clearly covered the scenario. Claude acknowledged the instruction exists when asked about it, but simply didn't execute it.
Attempted workaround
We created a dedicated rule file .claude/rules/self-improvement.md with globs: **/* (loaded on every file), containing a short, punchy conditional instruction:
IF the user corrects me → THEN propose a rule/memory update in the same response
The theory is that a short, isolated rule loaded on every file might have more weight than a paragraph buried in a large CLAUDE.md. Too early to tell if this works better.
Expected behavior
When a user corrects Claude's output and the correction reveals a gap in the project's rules/guidelines, Claude should proactively propose updating the relevant configuration — without the user having to think about it.
Why this matters
The whole point of CLAUDE.md, rules, and memory is to build a persistent project context that improves over time. If the model doesn't maintain this context autonomously, the user becomes the bottleneck — manually identifying which corrections should become rules, which defeats the purpose.
Questions for the team
- Is there a known limitation on how reliably models follow meta-instructions (instructions about their own behavior/configuration)?
- Are shorter, isolated rule files (
.claude/rules/) more reliably followed than sections in a largeCLAUDE.md? - Is there a recommended pattern for "reflexive" instructions (instructions that trigger based on conversational context rather than file context)?
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗