---
id: "concept-context-rot"
type: "concept"
source_timestamps: ["§ Battling Context Rot"]
tags: ["context-management", "failure-modes"]
related: ["concept-compaction", "concept-tool-call-offloading", "concept-progressive-disclosure", "quote-context-engineering"]
definition: "The degradation of a model's reasoning and task completion capabilities as its context window becomes increasingly full."
---
# Context Rot

## What It Is

**Context Rot** is the phenomenon where a model's ability to reason and complete tasks **degrades as its context window fills up**. Context is a precious and scarce resource; once it becomes noisy, long, or cluttered, model performance drops — even before the hard token limit is reached.

This is related to the well-documented *“lost in the middle”* effect, where models under-utilize information located in the middle of long prompts.

## Why It Matters

The primary role of modern harnesses (per [[quote-context-engineering]]) is *“delivery mechanisms for good context engineering.”* If the harness cannot keep the working context clean and relevant, the agent will fail at long-horizon work — see [[claim-long-horizon-compounds]].

## Mitigations (Harness-Level)

Three compounding strategies are advocated:

1. **[[concept-compaction|Compaction]]** — summarize and offload as the window fills.
2. **[[concept-tool-call-offloading|Tool call offloading]]** — keep only head/tail tokens of large tool outputs in active context.
3. **[[concept-progressive-disclosure|Progressive Disclosure (Skills)]]** — only inject tool/skill descriptions when relevant, preventing *early* context rot from bloated tool catalogs.

All three live in the harness ([[concept-agent-harness]]), not the model.
