Anthropic Lowers Claude Code Autocompact Trigger
The default now compacts sessions at roughly 400,000 tokens rather than roughly 967,000, reducing token costs for many users.
By Wisevoter Tech Desk · Published Dec. 4, 2026, 10:15 a.m. ET

Anthropic released Claude Code version 2.1.334 on Tuesday, changing the default autocompact trigger from roughly 967,000 tokens to roughly 400,000 tokens. The new default applies to Fable models, Sonnet 5, Haiku 5.5, and Opus 4.7, covering interactive sessions, -p runs, and Claude Agent SDK runs.
Why it matters
Running compaction sooner keeps sessions smaller, which Anthropic says reduces token costs and avoids carrying the full weight of long coding sessions into every prompt. Developers working in long sessions across many models will see the change in how their context is managed.
The new default compacts sessions at roughly 400,000 tokens on most current models with a 1 million-token context window, down from roughly 967,000 tokens. In A/B tests on more than 700 Fin Claude Code users, raising the trigger from 320K to 500K increased costs about 10% while halving the number of compactions.
The players
Anthropic
Anthropic is an AI safety company that develops the Claude family of models and the Claude Code developer tool.
Brian Scanlan
Brian Scanlan ran the A/B tests on Claude Code users at Fin that informed the new default.
The details
Claude Code summarizes session context when a session reaches the cutoff length. Affected users see a one-time message reading 'Autocompact now defaults to 400k tokens,' and can run /autocompact 1m to restore the 967,000-token window or set CLAUDE_CODE_AUTO_COMPACT_WINDOW=1000000 for cloud users.
Timeline
Tuesday: Claude Code version 2.1.334 with the new autocompact default is released.
December 2, 2026: Brian Scanlan posts that 400K is the sweet spot.
December 3, 2026: Lydia Hallie posts on X about the new default.
The Tech Race
The change reverses Claude Code's earlier 967,000-token autocompact default, moving compaction to roughly 400,000 tokens as coding assistants compete on cost and context management. It reflects a shift toward trading some context length for lower per-session token spend.
Developers using Claude Code will see sessions compact sooner by default, which can lower token costs. Those who prefer the longer window can restore it with /autocompact 1m or the environment variable for cloud users.
The takeaway
Check the Config tab or run /config to confirm your autocompact setting, and choose between lower cost and longer context based on how long your sessions run.
Further reading
Explore more on Artificial Intelligence developments shaping how developer tools manage context.
Source note: This article includes information reported by The New Stack.




