Here's something you'll notice after running AI agents in production for a few weeks: a fresh conversation with your agent is sharp. Give that same agent 40 messages of history and it starts contradicting earlier decisions, forgetting constraints, and producing worse output than it did at the start of the session.
It's not random. It's structural. The context window is a fixed-size working memory, and you're filling it with noise.
I call this context rot — the gradual degradation of agent performance as accumulated context crowds out the signal with stale data, repeated boilerplate, and irrelevant turns. Here's what causes it, how to measure it, and three patterns that genuinely fix it.
What's actually happening
Language models have no persistent memory between calls. Every request is a fresh inference over the entire sequence of tokens you provide. The "memory" is entirely the context window.







