Instruction adherence decays mid-session — CLAUDE.md rules "fade" after 5–10 turns

Status Open
Maintainer reply None cached
Activity 2 comments · opened Jul 24, 2026

Problem

Claude Code applies CLAUDE.md rules correctly at the start of a session, then progressively ignores them as the conversation grows — even when the rules remain in context (visible in system-reminders every turn). This is not a length issue: the rules are present, they are being read, they are being disregarded.

Concretely: rules like "keep responses short," "ask a clarifying question when ambiguous," "no unsolicited Sources/menus/closers," "audit against existing code patterns before proposing changes" are followed for the first few turns, then start slipping around turn 5–10, and are effectively gone by turn 20. The user then has to re-instruct in the same session, burning tokens on the same fight every time.

This is widely reported: #35019, #34197, #36997, #16527, #51039, #668, #23617, #32161, #32775 — most are open. The pattern is consistent across users, projects, and rule categories. It is the single biggest reliability problem with Claude Code for power users, and "shorten your CLAUDE.md" is not a fix when the rules are already short and the model is demonstrably reading them.

Why "shorter CLAUDE.md" is not the answer

Length helps at the margin, but the failure mode is attention decay on specific rules mid-session, not context overflow. Rules under 200 lines still fade. Hooks help but only for behaviors you can express as deterministic checks — most style/verbosity/clarification rules cannot.

Concrete suggestions

  1. Re-inject the rule that was just violated. When a user correction lands ("stop doing X", "you ignored Y"), the harness could detect the correction and re-prepend the matching CLAUDE.md rule as a hard system-reminder for the next N turns.
  2. Rule pinning. Let users tag specific CLAUDE.md rules as "always-on" so they get re-injected verbatim every turn (not just once at session start).
  3. Post-response audit hook. Give users a hook that runs after the model responds, with the response text, and can force a retry if it violates a pattern (analogous to PreToolUse hooks but for text output).
  4. Adherence telemetry. Ship a debug mode that logs which CLAUDE.md rules were "attended to" per response, so users and Anthropic can see empirically where the decay happens.
  5. Session-level compaction preserves rules. When the harness compacts prior turns, CLAUDE.md and recent correction memories should be exempt from compression.

Impact

Every session becomes a re-training exercise. Users start compensating by writing hooks for behaviors that should be a native model competence, or by giving up and accepting the drift. Both outcomes erode the value proposition of a rules file.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗