Claude Code cuts default auto-compact to 400k
Anthropic is rolling out a 400k-token auto-compact default for most 1M-context models in Claude Code (v2.1.334), down from roughly 967k tokens, to rein in heavy usage burn during long sessions. Developers who still need the full 1M window can opt back in via /autocompact 1m or the /config menu.
A 1M context window looks great on a model card, but in an iterative coding loop it turned out to be a rate-limit trap — Anthropic is finally making a popular community workaround the default.
- –Previously, letting 1M-context sessions climb to ~967k tokens before compacting forced every turn to carry massive history; if a session sat idle long enough to expire the prompt cache, a single follow-up prompt could burn a huge slice of 5-hour or weekly quotas.
- –Power users had already converged on /autocompact 400k — or setting CLAUDE_CODE_DISABLE_1M_CONTEXT=1 — to fight both quota drain and context rot, where stale debugging logs and abandoned code paths make the agent noticeably less sharp.
- –The changelog notes the 400k target also applies to -p headless and SDK runs, so automated CI and agent pipelines built on 1M models will compact earlier unless explicitly overridden via --autocompact or autoCompactWindow in settings.json.
- –There is a clear tradeoff: compacting at 400k triggers more frequent summarization pauses and can drop granular details from earlier file reads, meaning developers running deep monorepo audits will still want to switch to /autocompact 1m.
DISCOVERED
1h ago
2026-12-02
PUBLISHED
1h ago
2026-12-02
RELEVANCE
AUTHOR
lydiahallie