What context rot is
As conversations grow longer, accumulated irrelevant information competes with what matters. Research suggests AI performance can degrade at longer context lengths — not because the model gets worse, but because the signal-to-noise ratio in the active context drops.
Imagine a reporter's working document that started as a sharp story brief and has grown to include tangential notes, discarded angles, outdated source contacts, and internal debates. Drafting from it is harder than starting fresh. That's context rot.
Signs your session context has bloated
Watch for: Claude referencing outdated instructions from earlier in the conversation; responses that drift in quality as a session runs long; needing to re-state something you already said.
These are symptoms of context rot, not model failure. The model hasn't changed — the context you're feeding it has gotten noisier.
Three things you can do about it
-
—
Use
/clearwhen switching between unrelated tasks. The context file persists across clears; the conversation doesn't. A clean conversation is not a loss of work. -
—
Use
/compactat natural breakpoints — before switching topics, not just when the system prompts you. You know where your context boundaries are better than an autocompact system does. -
—
Create a
/handoffcommand that summarizes the current session state before clearing, so you don't lose track of where you were. The handoff becomes the first message of the next session.
CLAUDE.md discipline as prevention
Context rot starts before the session does if your CLAUDE.md is bloated. Apply the deletion test to your context file regularly: read each line and ask whether it's actually changing Claude's output. Instructions that aren't changing behavior are consuming context budget without contributing.
Review your CLAUDE.md once per project — not once forever. As a story evolves, some early context becomes outdated. Deleting stale instructions is as important as adding new ones.
SOURCE: These patterns are drawn from the "Context hygiene" lesson in jamditis/stash, which extracts and organizes techniques from The Agentic Lab's advanced Claude Code guide.
NEXT: Head to Module 2 to write your first context file and apply the deletion test.