Back to Lab

Context Rot: Why Claude Gets Dumber With Every Message

Stefan5 min read

Claude is not forgetting anything. It is deprioritizing. As a conversation grows, attention degrades across the context window, and earlier instructions get drowned out by more recent ones. That is context rot, and it is why a session that was brilliant at the start is contradicting itself 45 minutes in, ignoring the CLAUDE.md it is supposed to follow, and redoing work it already did. The fix is not a bigger window or a memory feature; it is treating the model's attention as a resource you actively manage.

What is context rot?

The pattern is easiest to see in Claude Code, but it shows up in plain Claude chats too. Early in a session: good answers, clean instruction following, perfect recall of what you said. Deep into a long session: contradictions, ignored rules, repeated work, and that particular flavor of dumb where it notices mid-answer that it already did the thing.

This matters more than it looks. People who do not know the mechanism blame themselves or quietly lose trust in the tool. It puts a ceiling on how complex a task you can delegate: long refactors drift off the architecture rules, and business use drifts off your voice and strategy.

Why hasn't a bigger context window fixed it?

Because window size and retrieval quality are independent. The failure mode is called lost in the middle: the model weights what came first, the system prompt, and what came last, your most recent message, and struggles with everything between. The same model has essentially the same true working capacity whether the window is 200K or a million tokens. It is an architectural property of LLMs, which is why it has resisted solving.

What has been tried

Compaction. What Claude does automatically in long conversations. It is a summary, which means lossy compression: if the compression keeps the wrong things, you feel the quality drop. Noticeably worse in Claude Code and the desktop app than in Codex, which handles this well.

RAG. Pulling context on demand instead of carrying it everywhere is a further option.

Structured context, skills, and a warning. Front-loading what matters into the system prompt helps, but skills and commands are auto-discoverable, which means each one injects tokens so the model knows when to invoke it. When Anthropic converted commands into skills, our hundred-odd commands all started injecting tokens into every context, and performance broke without us knowing why until we traced it. Your helpers can be your rot.

Multi-agent setups. Scoped agents with fresh windows, like Claude Code's explore agents, keep exploration from polluting the main window. The tradeoff is the map-versus-territory problem: the subagent hands back a summary, the main agent has to trust it, and on a cheap model the map is often wrong. Good when 10,000 records need searching and three matter; see fork agents for the version of this that keeps full context.

The paradox: memory makes it worse. The tools meant to help AI remember accelerate the rot. A large CLAUDE.md degrades performance from message one, because every persisted token is one less token of attention for the actual work. Keep the file small, a handful of rules, and let the agent decide the rest. The same paradox governs agent memory systems generally. Otherwise you start every conversation already handicapped.

Strategy 1: repeat yourself intentionally

Keep a collection of your key prompts. When the session starts saying stupid things, paste the relevant prompt back in. Re-sending works because of the attention math: the newest message sits in the high-attention zone, so a repeated instruction gets reinstated.

I built an MCP for this, Context OS, with a deliberately slim token footprint. Its commands end with a step that refetches and re-injects the instructions, so the reinforcement happens automatically. It costs some context to do this, so it is not a perfect solution. The honest mental model: you are micromanaging an intern, reminding it every five minutes how to do the job, because otherwise it forgets.

Strategy 2: plan in one window, execute in a fresh one

Separate thinking things through from doing the work. In plan mode, Claude Code writes the plan to a file; when the plan is done, clear the context and start fresh. The new session reads the plan file, loads exactly the files it needs, and carries none of the back-and-forth clutter that produced the plan. Write your own summaries into files too. You know what mattered in the conversation; do not outsource that judgment to a lossy auto-summary.

Strategy 3: nuke the context and start over

Keep a tracking file as the source of truth for work in progress. When the session rots, hand the file to a fresh session; we keep a command for exactly this, which reads the work-in-progress file and gets up to speed. Starting over feels expensive and is not. Fighting a rotted session, repeating the same instruction while it keeps getting it wrong, costs far more time. Conversations are disposable. Artifacts persist.

Manage the model's attention like a resource

One conversation should do one thing. Before you start a session, decide what kind it is: a quick fix, a planning session, or a build that needs a tracking file. Managing the model's attention like a scarce resource is the actual skill behind all three strategies, and it is what separates getting great results from turning your brain off because the tool is impressive. Context rot is why Claude feels like an intern with amnesia. Work with the amnesia instead of resenting it.

Related

Want this kind of thinking applied to your business?

Book a Free Value Layer Audit