Quick Answer

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

Verified Snapshot: Tested on Claude Sonnet 4.6, Reviewed October 2026 (current generation: Sonnet 5.5, checked October 2026)

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.

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 CountRule ComplianceObserved Behavior
0 to 50,000ReliableAll constraints honored correctly
50,000 to 85,000ReliableMinor style drift, core rules intact
85,000 to 150,000SlippingMeasurable drift begins. Tone and format rules start slipping
150,000 to 300,000DegradedSignificant drift. System prompt rules frequently ignored
300,000+Severe driftOnly 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.
Re-Anchor Results on Sonnet 4.6

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.

A large context window is not the same as reliable recall across all of it. Instructions given early in a long conversation lose force as the window fills with later text, so a rule you set at the start can quietly stop being applied. The reliable workaround is not a bigger window. It is restating the one rule that matters late in the conversation, right before the request that depends on it. The behavior described here was observed on Claude Sonnet 4.6 and is a dated snapshot.

Sources: Anthropic: Prompt engineering docs