Claude Code has changed its default threshold for automatically summarizing conversations. With version 2.1.334, auto-context window.">compaction now triggers around 400K tokens instead of around 1M tokens, for most models with a 1M-token context window. Anthropic says quality should stay the same for most tasks, with lower usage and cost, especially in long sessions.
Compaction is the mechanism by which the agent summarizes earlier turns when a conversation approaches the limit of its context window, freeing space for later steps. Until this version, on many 1M-token models the automatic threshold was set at about 967K tokens. The new default is 400K tokens, about 40% of the full window, and the feature also applies to sessions run with -p and through the SDK, according to the official changelog and several technical outlets.

Image: Anthropic — https://www.anthropic.com/news/enabling-claude-code-to-work-more-autonomously
The change applies in particular to the Fable models, Sonnet 5 and later, Haiku 5.5, and Opus 4.7 and later. Lydia Hallie of Anthropic's Claude Code team announced on X on December 2 that the 400K default is rolling out. According to the 2.1.334 release notes, published December 1, the auto window can still be changed at any time with the /autocompact command.
Users who want the previous behavior can restore it: /autocompact 1m, or the /config menu, moves the threshold back near one million tokens. The practical effect is on cost and usage: fewer tokens consumed per turn means lower spending in long working sessions. The same release also fixed numerous issues across worktrees, plugins, MCP and Vim mode, according to the release notes.

Image: Anthropic — https://claude.com/product/claude-code
The change comes as context consumption has become a central concern for users working on large projects. In November, an analysis of a repository with about 24,000 files showed that the initial configuration alone could occupy tens of thousands of tokens before a single file was read. Earlier compaction responds to that problem by reducing how much context the model must reread at each step.
The open question is whether quality holds on the most complex tasks, which is what developers working on very large codebases will watch. Anthropic says the default is meant for most cases, and leaves users free to raise the threshold again when needed.

No comments yet. Be the first!