Context Rot

The progressive degradation of Claude Code's output quality as session length grows, caused by attention dilution across an ever-larger token history.

Key points

  • Retrieval accuracy drops from 92% at 256K tokens to 78% at 1M tokens [src-011]
  • Analysis of 18K thinking blocks across 7K sessions: thinking depth dropped 67% and "edit without reading" behaviour rose from 6% to 34% in long sessions [src-011]
  • One developer tracked 100+ message chats and found 98.5% of tokens were spent re-reading old conversation history — not producing new output [src-011]
  • Token cost is exponential: message 30 in a chat can cost 31x more tokens than message 1, because the entire history is re-read each turn [src-011]
  • Auto-compaction fires at 95% context use and retains only 20–30% of detail — the worst possible moment (most degraded state) [src-011]

Symptoms

  • Model edits files without reading them first
  • Contradicts earlier decisions made in the same session
  • Vague or repetitive outputs
  • Increasing error rate on tasks it handled correctly earlier in the session

Remediation patterns

  • Cap Opus sessions at ~120K tokens (12% of 1M window), then summarise and /clear [src-011]
  • Use /session-handoff skill to generate a structured context handoff document before clearing [src-011]
  • Use /re (rewind) to drop failed attempts that silently pollute future responses [src-011]
  • Convert documents to markdown before ingestion (33–90% token reduction) [src-011]
  • Use /btw for side questions that don't need to enter conversation history [src-011]
  • Session chaining: discovery → planning → execution sessions, each consuming only the prior session's output document [src-011]

Related entities

  • Claude Code — the primary environment where context rot occurs

Related concepts

Source references

  • [src-011] Nate Herk — Claude Code power features cluster (2026-04-20 to 2026-04-27)

Robin Cartier perspective

This page is part of Robin Cartier's working AI knowledge graph: a practical research layer for production AI, recommendation systems, experimentation, GEO, and agentic web readiness.

The useful next step is to connect this concept back to applied product leadership and operating models.

Recommended next

Keep reading from this thread

From 500 indexed pages and articles.

  1. Wiki concept Session Chaining The practice of decomposing a large project into a sequence of specialised Claude Code sessions — discovery, planning, execution — where each session's output Related by 011
  2. Wiki concept Session Handoff The practice of packaging the useful state from a Claude Code session into a concise handoff document before clearing context or moving work into Related by 011
  3. Wiki concept Adaptive Thinking Anthropic's dynamic reasoning budget allocation introduced 2026-02-09. The model decides per-turn whether to allocate reasoning tokens based on perceived task complexity, rather than applying Related by 011