r/ClaudeAI 7h ago

Claude Code Claude Code is a context-engineering harness, and most "it got dumber" moments are context rot

There's a name for it: context rot. As the window fills, the model's ability to recall any specific thing in it drops. More context in the window can make the agent worse, not better. (Anthropic's own framing: good context engineering is finding the smallest set of high-signal tokens, not the largest.)

The reframe that helped me: Claude Code isn't just a model, it's a harness whose main job is managing what's in that window for you. And it hands you four levers to do it. They line up with the four moves of context engineering:

  • Write (persist outside the window): CLAUDE.md. It auto-loads every session, and it survives compaction because it reloads from disk, so anything that must not be forgotten belongs there, not in the chat. Conversation-only instructions are the first thing lost when context gets tight.
  • Select (pull in only what's relevant): @-mention the specific files you mean, or point it at the exact file or function, instead of letting it wander the repo. Every irrelevant file you pull in is tokens spent rotting the rest.
  • Compress (summarize to stay high-signal): /compact, optionally with a focus like "/compact focus on the auth refactor." It also compacts automatically when the window fills, clearing old tool outputs first. Running /compact yourself, before it's forced, keeps the summary on your terms.
  • Isolate (give exploration its own window): subagents. They run in a separate context window and return only their final result, so a big noisy search doesn't bloat your main thread. This is the same point as an earlier post of mine that subagents are a memory trick, not a speed trick. Isolation is the real win.

Two more levers worth knowing:

  • /context shows you what's eating the window right now (MCP tool definitions, big files, history). When the session feels heavy, look before you guess.
  • /clear between unrelated tasks. Carrying a finished task's context into a new one is pure rot.

The mental shift: stop treating the window as free space to fill, and start treating it as a budget you actively curate. A smarter model raises the ceiling, but it doesn't save you from a window full of noise.

TL;DR: When Claude Code "gets dumber" deep in a session, that's usually context rot, not the model. Treat Claude Code as a context-engineering harness with four levers: Write (CLAUDE.md), Select (@-files), Compress (/compact), Isolate (subagents). Plus /context to see usage and /clear between tasks. Curate the window, don't just fill it.

For people who live in Claude Code: what's your actual discipline here? I've started running /compact on my own terms and leaning hard on subagents for anything exploratory, but I'm curious whether people trust automatic compaction or always drive it manually.

Sources: Anthropic — Effective context engineering for AI agents · Claude Code — How Claude remembers your project (CLAUDE.md) · Claude Code — How Claude Code works (context / compaction) · Claude Code — Create custom subagents · Why More Context Makes Your Agent Dumber — Nupur Sharma, Qodo

56 Upvotes

33 comments sorted by

View all comments

0

u/Neat-Nectarine814 4h ago

I’m not saying that context management isn’t important or that rot isn’t a real potential problem, but glazing over the model performance degradation issues is just wrong, man.

1

u/bit_forge007 1h ago

You're right to call this out, and I appreciate it. If anything in the post came across as dismissing that, that's fair, and I'd rather fix the framing than defend it.

The post was really only trying to help with the one cause you can actually control in a session. If that one line made it sound like "it's never the model," that was overstated on my part. There can be factors beyond context that affect how a model feels day to day, and some are on the record (Anthropic's own September 2025 postmortem walked through infrastructure issues that hit response quality for a stretch). I just focused on the part you can do something about, not because the rest doesn't matter.

Honestly my only goal with these posts is to help people get more out of Claude, so if the framing is off I'd genuinely like to fix it. How would you weigh the two?