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.
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 | Instruction Compliance Rate | Observed Behavior |
|---|---|---|
| 0 — 50,000 | 98% | All constraints honored correctly |
| 50,000 — 85,000 | 91% | Minor style drift, core rules intact |
| 85,000 — 150,000 | 74% | Measurable drift begins — tone and format rules start slipping |
| 150,000 — 300,000 | 58% | Significant drift — system prompt rules frequently ignored |
| 300,000+ | 41% | 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 raised instruction compliance from 41% back to 89% at the 300,000+ token range. 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 Sonnet 4.6 weights the first 10% and last 10% of its context most heavily. Restating your 3 most important rules at the very end of your system prompt doubles their effective 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.
Get Prompts Built to Resist Drift
The $27 Claude Prompt Pack includes Re-Anchor templates and XML-structured system prompt frameworks tested to maintain compliance at 150,000+ tokens.
Get the $27 Pack →