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.