Skip to main content
Blue Moose logo Blue Moose Field notes
← All articles
claude code

Claude Code now auto-compacts near 400K, not 1M

Developer laptop with code on screen

I keep a long-running Claude Code session open most days, so the changes that matter to me are rarely the flashy ones. The v2.1.334 release, tagged on 1 December, has one of those quiet changes buried in a very long changelog: auto-compaction now triggers much earlier than I assumed it would on a 1M-token model.

What the release notes actually say

The relevant line, verbatim: "Changed auto-compact's per-model auto setting to near 400K on most current 1M models, -p and SDK runs too (rolling out; on now with third-party providers or telemetry off); see /autocompact".

Three things stand out. First, the default is per model, and for most current 1M-context models it now lands near 400K rather than near the full window. Second, it applies to headless -p and SDK runs as well, so scripted pipelines get the same behaviour as interactive sessions. Third, it is a staged rollout: it is already on if you use third-party providers or have telemetry off, and arrives for everyone else gradually. Two sessions on the same version can therefore behave differently today.

The knobs that came with it

The same release adds an Auto-compact window row to /config, "to see and change the size that /autocompact sets". That is the part I care about: the number is no longer invisible. If you had been relying on a huge window for a big refactor, you can look at what you are really getting and raise it, or lower it if you would rather compact sooner and keep context sharp.

There are also several compaction fixes in the same list:

  • Needless auto-compaction, or a false "Prompt is too long" error, after a response hit the output token limit before writing any text.
  • /context no longer draws the compact buffer as used space when auto-compact is off.
  • /compact and auto-compact no longer sometimes keep the model's draft notes in front of the conversation summary.

That last one is worth a mention. A summary that is preceded by stray draft notes is exactly the kind of subtle noise that makes a post-compaction session feel slightly off without any visible error.

Pricing keys, if you run a gateway

If you route Claude Code through a gateway, the release adds cacheWrite5m and cacheWrite1h to modelPricing, plus longPrompt for Haiku 5.5, and the snake_case equivalents (cache_write_5m, cache_write_1h, long_prompt) in gateway pricing.overrides. The notes say old keys still work. I have not changed my own config, so I cannot tell you how the old and new keys interact in edge cases.

Also in the list: folder-level REVIEW.md support for /code-review, so local reviews also follow REVIEW.md files in folders above a committed change.

What I would do with this

I would open /config after updating and write down what the Auto-compact window row says. If you run Claude Code unattended with -p, check the value there too, since your jobs may now compact earlier than they did last week. An earlier compaction is not automatically worse, because long contexts degrade anyway, but it should be a choice you made rather than a default you discovered mid-task. I have not measured how the new default affects output quality, so treat that as an open question and not a verdict.

BM
Blue Moose
The moose behind Blue Moose. Full-stack PHP developer — Drupal by day, Symfony by night, tests always.