Claude Code now summarizes sessions at 400K tokens instead of 1M
Anthropic has sharply lowered the default threshold for Claude Code's automatic context compaction. According to the report, version 2.1.334 means that on current models with a 1 million-token context window, autocompact now kicks in at around 400,000 tokens rather than 967,000. In practice, your session starts getting summarized once it reaches roughly 367,000 tokens. The change covers not only interactive sessions but also scripted runs using the -p flag and Claude Agent SDK runs.
There are two main reasons behind it. The first is cost: compacting earlier keeps the context carried into every prompt smaller, which reduces token spend. The second is 'context rot,' the phenomenon where models struggle to recall details relevant to the current request as the context window grows. Lydia Hallie from Anthropic's Claude Code team said the new default should help with usage during longer sessions, and the documentation notes that compacting sooner keeps sessions smaller overall.
According to the article, the setting is not fixed for everyone. You can change the threshold via the /config command or the Config tab in the desktop app, where a new 'Auto-compact window' row appears, and you can roll back to the earlier cutoff. The article also relays that Brian Scanlan of Fin ran A/B tests on more than 700 users and found that moving the trigger from 320K to 500K raised costs by about 10 percent while halving the number of compactions; to him, 400K looked like Claude Code's 'sweet spot.'
Reactions are mixed. Some developers are uneasy about compaction firing early during long refactors, with one saying they would rather it 'wait on a long refactor,' while another questioned whether reasoning chains stay intact with a shorter window. Anthropic's own context engineering guide acknowledges that aggressive compaction can erase 'subtle but critical context.' The practical takeaway: expect lower costs in long sessions, and consider raising the threshold manually for complex work.