Context rot and why more is worse
Model providers advertise context window size as a capability. It is better understood as a budget you should try not to spend.
The effect
As the amount of text in the context grows, the model's ability to use any particular piece of it declines. Instructions get missed. Details from the middle get overlooked. Earlier decisions get contradicted.
This is not a bug in a specific model. It shows up across providers and across architectures, and it is the reason a fresh session often outperforms a long one on the same task.
Why it happens
Attention is finite and spread across everything present. Doubling the tokens roughly halves the share any individual token receives.
There is also a positional effect: material at the very start and the very end is used more reliably than material in the middle. A long context has a large middle.
What it feels like in practice
- You state a constraint early. Thirty turns later it is quietly violated.
- The agent re-reads a file it already read, because the earlier read is buried.
- It contradicts a decision the two of you made twenty minutes ago.
- Answers get vaguer and more generic as a session goes on.
If you have caught yourself thinking the model "got tired", this is what you were seeing.
What to do about it
Start fresh sessions often. The cheapest fix available. When a task is done, start a new session for the next one. Carry forward only what matters.
Do not paste whole files when a section will do. A 40 line function beats the 900 line file it sits in.
Keep rules files short. A 400 line rules file is 400 lines of middle. Under 100 is a good target.
Prune tool definitions. Every connected MCP server adds its full schema to every request. Ten servers you are not using is a permanent tax on every turn. Connect what the task needs.
Summarise deliberately. When a long session must continue, ask for a summary of decisions and open questions, then start fresh with that summary. See compaction and summarisation.
The counterintuitive rule
If an agent is doing badly on a complex task, the instinct is to give it more context. Usually the right move is to give it less, and make what remains more relevant.
More context makes a model less likely to miss something only when that something was genuinely absent. When the problem is dilution, adding text makes it worse.
A useful check
Before adding anything to the context, ask whether it changes what the correct answer is. If it does not, it is noise, and it is competing with the parts that do.