Claude follows your rules less reliably as a conversation grows very long. The most reliable fix, tested on Sonnet 4.6, is Re-Anchor Injection: every 50,000 tokens or so, re-insert a compressed summary of your core rules as a new message.
Last Updated: August 2026 · Cole Bridges Research Lab
Drift onset thresholds and fix effectiveness documented on live Claude Sonnet 4.6 API sessions by the Cole Bridges Research Lab. Sonnet 4.6 has a 1M token context window; these tests were conducted at the 85k, 200k, and 500k token marks.
Instruction Drift begins around the 85,000-token mark in Claude Sonnet 4.6. The model does not forget your rules, it deprioritizes them as newer context crowds the attention window. The fix is a Re-Anchor Injection: a compressed rule summary inserted every 50,000 tokens as a user-turn message.
Anthropic's current lineup is Claude Haiku 4.5, Claude Sonnet 5 (released June 30, 2026), Claude Opus 5 (released July 24, 2026), and Claude Fable 5, with Claude Mythos 5 restricted to approved partners. Sonnet 5 is the default model on the Free and Pro plans, Opus 5 is the default on Max and the strongest model available on Pro. Source: Anthropic.
The test runs on this page were performed on Claude Sonnet 4.6, which Sonnet 5 replaced as the default model on June 30, 2026. We publish these results as a dated snapshot rather than restating them as current-model behavior. Where a finding has not been re-tested on Sonnet 5 or Opus 5, treat it as history, not as a live bug report.
The Problem: 1M Tokens Doesn't Mean 1M Tokens of Reliable Attention
Claude Sonnet 4.6's 1M token context window is a genuine engineering achievement. But context capacity and attention reliability are different things. A model can technically hold 1M tokens while weighting recent tokens far more heavily than early ones.
In production use, this creates a specific failure pattern: you set detailed rules in your system prompt, the conversation grows, and by message 30 Claude is producing output that directly violates constraints you set at the start. No error. No apology. Just drift.
When Drift Starts: Our Test Results
| Token Count | Rule Compliance | Observed Behavior |
|---|---|---|
| 0 to 50,000 | Reliable | All constraints honored correctly |
| 50,000 to 85,000 | Reliable | Minor style drift, core rules intact |
| 85,000 to 150,000 | Slipping | Measurable drift begins. Tone and format rules start slipping |
| 150,000 to 300,000 | Degraded | Significant drift. System prompt rules frequently ignored |
| 300,000+ | Severe drift | Only the most recently reinforced rules honored |
The Fix: Re-Anchor Injection Every 50,000 Tokens
The most reliable solution we tested is inserting a compressed rule summary as a standard user-turn message at regular intervals. Claude Sonnet 4.6 treats recent user-turn content as high-priority context, which effectively resets the attention hierarchy without ending the session.
<re_anchor>
ACTIVE RULES, ENFORCE FOR ALL REMAINING OUTPUT:
1. Tone: Professional, no casual language
2. Format: Bullet points only, no paragraphs
3. Citations: Required for every factual claim
4. Length: Maximum 150 words per response
</re_anchor>
Continue from where we left off.
In our testing, inserting a Re-Anchor block every 50,000 tokens restored most of the lost compliance at very long context lengths. It does not fully restore baseline performance, but it eliminates the most damaging drift patterns.
Three Additional Drift Prevention Techniques
- Front-load critical rules and repeat at the bottom, Claude tends to weight the beginning and end of its context most heavily. Restating your most important rules at the very end of your system prompt gives them noticeably more weight.
- Use XML tags for every rule, not plain text, Untagged instructions drift faster than XML-wrapped ones. The tag structure provides an anchor that persists longer in attention weighting.
- Keep system prompts under 2,000 tokens, Bloated system prompts paradoxically increase drift. The model skims long system prompts under load. A tight, XML-structured 1,500-token prompt outperforms a 6,000-token one in compliance at 100k+ tokens.
Context Poisoning: The Related Problem
Drift has a close cousin: Context Poisoning. This happens when one bad output early in a session corrupts the logic thread for everything that follows. Claude Sonnet 4.6 uses its own previous outputs as reference context. If output at message 5 contains a flawed assumption, messages 6 through 40 may all build on that flaw.
The fix for Context Poisoning is explicit correction, not implicit override. If you catch a bad output, explicitly state "The previous response contained an error. Disregard it and restart from [correct premise]" before continuing. Implicit corrections, just asking again differently, do not reliably clear poisoned context.