Skip to content
Free since 2015. Built for the engineers who keep things running.

cat /articles/claude-code-will-now-summarize-your-session-at-400k-tokens-instead-of-1m.md

AI & MLOps

Claude Code will now summarize your session at 400K tokens instead of 1M

Anthropic has changed Claude Code so that autocompact now triggers around 400,000 tokens rather than roughly 967,000, a default some developers welcome and others question. Users can revert the setting.

The New Stack04 Dec 2026 · 4 min read · summary

article --summary

The summary

This piece explains a default change in Claude Code version 2.1.334, where session summarization now begins at about 400,000 tokens instead of close to 1 million for current models with a 1M context window. The change applies to interactive sessions, scripted runs, and Agent SDK runs, and it is rolling out gradually, so some users may already see a one-time notice or a new auto-compact row in their settings. The reasoning centers on cost and quality. Compacting sooner keeps sessions smaller and cheaper, and one company's A/B test reportedly found 400K to be a sweet spot, with little measurable loss in response quality. Developers worry, though, that compaction can drop important context on complex, long-running work, and research on context rot suggests reliability declines as inputs grow. Readers who want the old behavior can run /autocompact 1m in the CLI, set an environment variable in cloud setups, or use /compact with instructions about what to keep. Running /autocompact alone shows the current setting.

Editorial note: This is a summary of an article first published by The New Stack. The full piece is on their site.

Reading now

Topic
AI & MLOps
Source
The New Stack
Published
04 Dec 2026
Format
Curated summary

Have a take on this?

Write it up and submit it. It goes on the list once an editor approves it.

Submit an article

articles --latest

Latest articles

New from the blogs we follow and the community.

All articles

newsletter --weekly

DevOps Weekly, minus the noise.

The best reads, new jobs and upcoming events, in one email a week.