> ## Documentation Index
> Fetch the complete documentation index at: https://agent-harness101.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Context rot

> Raw files and logs crowd out the goal and current reasoning.

## The question

The loop works. What breaks after 50 tool calls?

## The answer

Raw files and logs crowd out the goal and current reasoning.

```mermaid theme={null}
flowchart LR
n0["Retain"]
n1["Summarize"]
n2["Drop"]
n3["Prompt"]
n0 --> n1
n1 --> n2
n2 --> n3
```

**Retain** the goal, constraints, current diff and recent errors. **Summarize** old reads and logs. **Drop** duplicates and dead ends.

### Source

[anthropic.com/engineering — effective-context-engineering](https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents) — Anthropic calls this “context rot”: as tokens accumulate, models measurably lose the ability to use the full window well. Left number-free on purpose — Anthropic’s writeup doesn’t quantify a single figure; treat it as a documented phenomenon, not a stat.

<Tip>
  **Design decision:** Separate persistent state by lifetime and purpose.
</Tip>

## Continue the walkthrough

<Card title="Seven state stores" icon="arrow-right" href="/context/state-stores">
  Continue to topic 4 of 14.
</Card>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.