HomeLearnCoursesHackathonsAccount
Claude Agent Skills & Subagents
Why Long Sessions Break Down · 1/2

The single-context assumption

A conversation with an agent is, mechanically, one growing block of text: everything you've said, everything the agent has said, every tool result it has read, all sitting in the same context window and all competing for the same limited attention when the model generates its next token. Early in a session this is fine, there's little in there to compete with. Late in a session, after the agent has read a dozen files, run several tool calls, and worked through a couple of false starts, that same context window is carrying a lot of material that isn't relevant to the very next decision, and the model has to implicitly filter through it every time it reasons.

This is context pollution: not wrong information, just too much of it, and not all of it load-bearing. A stack trace from an error you already fixed, the full contents of a file you only needed one function from, an aborted plan you abandoned three turns ago, none of these are false, but each one is now permanently part of what the model has to weigh when it decides what to do next. The result isn't usually a dramatic failure. It's a gradual one: the agent starts re-reading files it already read, repeating steps, or losing track of a constraint you mentioned early on because it's now buried under everything that came after.