CCLearn

When it feels like Claude Code got worse, audit cache and clutter first

Before concluding the model changed, check two documented self-inflicted causes: a prompt-cache miss after an idle gap on a large context window, and skills, subagents and MCP servers loading into every session. Both are measurable from inside the product.

docs corroborate

The official documentation describes the mechanism this relies on. The technique itself is community practice.

What this costs you if it is wrong

The mechanisms are documented; the causal story about any particular degradation episode is not, and it comes from a forum account of an in-flight investigation. Do not use this as proof nothing upstream changed — if quality genuinely regressed, blaming your own config buries a report worth filing. Lowering the auto-compact window is a real trade: you compact sooner and more often, so long tasks lose detail earlier, and compaction itself costs a large request. Prune skills and MCP servers by disabling, not deleting, and check nothing else depends on them first.

Some week, Claude Code feels worse. Same repo, same prompts, but answers land flatter and your plan limit arrives by lunchtime. The instinct is that something changed upstream. Before you settle on that, there are two mechanisms you own that produce exactly this pair of symptoms, and both are measurable from inside a session in about five minutes.

The two suspects

SuspectWhat it doesHow you see it
Cache miss after an idle gapYour first message after a long break reprocesses the entire conversation as uncached input/usage — the Prompt cache (main) line shows hit share, miss count, and whether the cache is warm right now
Startup clutterSkills, subagent descriptions, and always-loaded MCP tools sit in context on every turn whether or not you use them/context for the live breakdown, /doctor for an estimate of the skill listing's cost, /skill-doctor for per-skill cost and usage

Neither is exotic. Both are described plainly in the docs. What is not documented anywhere is the claim that they explain the periodic "Claude Code got dumber" waves — that framing comes from a forum thread, not from Anthropic's documentation, and you should hold it loosely.

Cache misses scale with the window you are carrying

Claude Code sends your full conversation with every request and reads it back at the cached rate. That is cheap right up until the cached prefix expires. After a break longer than the cache lifetime there is nothing left to read, so the next turn pays full uncached price for everything.

The lifetime is not one number:

BillingMain conversation TTLSubagents, workflows, compaction
Claude subscription, within plan usageOne hourFive minutes, except server-controlled helpers
Usage credits, API key, or cloud providerFive minutesFive minutes

So a subscription that has tipped over into usage credits silently drops from an hour to five minutes — the same lunch break that used to be free now costs a full reprocess. You can pin it back with promptCacheTtl set to 1h (or CLAUDE_CODE_PROMPT_CACHE_TTL), and subagentPromptCacheTtl for everything else.

The second half is the multiplier. A miss costs whatever the context holds, so the same idle gap is far more expensive in a session that has grown toward a 1M window than in one capped lower. That is why the suggested experiment is to run with a smaller auto-compact window:

bash
CLAUDE_CODE_AUTO_COMPACT_WINDOW=400000 claude

The cheaper move needs no configuration at all: stop resuming hours-old sessions out of habit. /clear costs nothing. On Pro and Max, resuming a large stale session offers to resume from a summary instead, which is the same idea with your history preserved.

The clutter is real, but not where people point

The forum version of this is "I found roughly 20k tokens of context I never intentionally opened." The mechanism is documented, but it is worth being precise about which parts of your setup actually cost you every turn:

Thing you installedLoaded every session?
SkillsYes — every skill in the listing adds to context on every turn, used or not. Only the description; full content loads on invocation
SubagentsYes — their description fields load. Past 15,000 tokens combined you get a startup warning, and Claude Code still loads them all
MCP serversMostly no — tool definitions are deferred by default, so only names and server instructions enter context until a tool is used
CLAUDE.md and memoryYes, read once at session start and held for the session

A skill with disable-model-invocation: true stays completely out of context until you type its name, which makes it the right shape for things you want available but not advertised.

What is actually unverified here

Be clear about the seam. Every mechanism above is documented. The story that stitches them together — that a specific wave of quality complaints was traced to these two causes, and that model and inference regressions were ruled out — is one engineer's account of an investigation in progress, posted into an angry thread, with the stated cache lifetime disputed in replies. No Anthropic documentation page connects any of this to a perceived-degradation episode.

What that means for you: the diagnostic is sound and worth running regardless of whether the story is true. The conclusion is not. "My config explains it" and "nothing changed upstream" are different claims, and the first does not establish the second.

What would settle it

Run the measurements rather than reasoning about them:

bash
# In a fresh session, before doing any work:
/context        # what is loaded before you type anything
/doctor         # skill-listing cost and its biggest contributors
/skill-doctor   # per-skill cost and how often each is actually used

# Then, after a day of normal work:
/usage          # read the Prompt cache (main) line: hit share, misses, warm or cold

/usage on a Pro, Max, Team, or Enterprise plan also flags any behavior accounting for 10% or more of recent usage, cache misses and long context among them. If cache misses are not flagged and your hit ratio is healthy, this tip is not your problem and you should look elsewhere. If they are, you have a number to compare before and after changing the window or your idle habits.

The honest experiment is a paired one: a week at your current settings, then a week with a smaller auto-compact window and a habit of clearing instead of resuming, comparing cache-miss share both times. Nobody in the community has published that comparison. Until someone does, this is a well-grounded hypothesis with a cheap test attached, not a finding.

Checkpoint

  • Without changing anything, can you say what your cache hit ratio and miss count are right now?

    Show answer

    Only your own session can say, and /usage is where to read it: the Prompt cache (main) line reports hit share, miss count, and whether the cache is warm right now. Check claude --version first — that line requires v2.1.251 or later, and a line that is not there is the instrument missing, not a cache that is healthy. On a Pro, Max, Team or Enterprise plan /usage also flags any behavior accounting for 10% or more of recent usage, cache misses among them. If misses are not flagged and your hit ratio looks fine, this tip is not your problem and you should look elsewhere.

  • Which of your installed extensions actually cost context on every turn, and which are deferred until used?

    Show answer

    Skills and subagents cost you every turn; MCP servers mostly do not. Every skill in the listing adds its description to context whether or not you use it, with the full content loading only on invocation. Subagent description fields load the same way — past 15,000 tokens combined you get a startup warning, and Claude Code still loads them all. CLAUDE.md and memory are read once at session start and held for the session.

    The MCP row is the one the community version usually gets wrong: tool definitions are deferred by default, so only names and server instructions enter context until a tool is used — unless tool search is disabled or unavailable, or the server is marked alwaysLoad, in which case its full definitions sit in your prefix and any reconnect invalidates the cache. Your own split comes from /context, with /doctor for the skill listing's cost and /skill-doctor for per-skill cost and usage.

  • If you set a smaller auto-compact window and it did not help, what number would tell you that?

    Show answer

    Cache-miss share on the Prompt cache (main) line, compared against the same number before you changed anything — which is why you run /usage first. Without that baseline you cannot tell a smaller window from a quiet week. Treat the 400000 in the tip as a knob rather than a setting: it is somebody's guess, and the docs give the variable's 100000–1000000 range while recommending no value.

    Two things to weigh alongside the number. Compacting sooner means compacting more often, so long tasks lose detail earlier and each compaction costs a large request; and once the variable is set, the status line's used percentage no longer tells you when compaction will fire. The honest form of the test is paired — a week at your current settings, then a week with the smaller window and a habit of clearing instead of resuming — and nobody in the community has published that comparison.

Where this came from

Official pages that back this