Skip to content
Glossary Workflow

Context rot

The progressive degradation of an LLM's response quality over a long session, caused by the dilution of initial instructions within the context.

Definition

Context rot refers to the phenomenon where an LLM starts producing lower quality responses, inconsistent with initial instructions, or repetitive as a conversation grows longer. The main cause is that the context window has a finite capacity: the longer the conversation, the more the initial instructions (which define tone, constraints, conventions) lose their relative weight in the model's attention.

postcursors perspective

Context rot is the main reason why "one long session = better results" is wrong. Long sessions aren't the goal — focused sessions with verifiable checkpoints are far more effective. Treating context as an active resource (managing it, cutting it at the right moment) is one of the most important skills in a mature agentic workflow.

In practice

Typical signs of context rot: the agent starts ignoring constraints you gave it earlier ("use the existing helpers"), produces code in a different style than at the beginning of the session, or repeats explanations it already gave. The fix is to cut the session and start a new one with a fresh context.

Common misconceptions

  • Confusing context rot with a tool bug — it's an inherent LLM behavior, not an implementation defect
  • Believing that increasing the context window solves the problem — it delays it, it doesn't eliminate it

See also