
Why it mattersA session you had tuned for a one-million-token window will summarise itself much sooner. A team running Claude Code in scripts or the SDK gets the same change.
Anthropic released Claude Code 2.1.336 on 3 December 2026. The release moves the auto-compact threshold. A long session now summarises itself at near 400,000 tokens. That is on most current one-million-token models. The old point was close to one million. The release notes call this a change to "auto-compact's per-model auto setting". A new row in /config called "Auto-compact window" shows the size. A user who wants the old behaviour can put it back there. The same change applies to -p and SDK runs.
What the change does
Auto-compact is how Claude Code fits a long session into the model's context window. The session gets close to the limit. Claude Code replaces the earlier turns with a summary. Then it keeps working. Until this release, the point of switching was near one million tokens. 2.1.336 moves it to near 400,000. Sessions that ran for hours before summarising will now summarise more than once.
The exact release-notes line is: "Changed auto-compact's per-model auto setting to near 400K on most current 1M models, -p and SDK runs too". The notes add: "rolling out; on now with third-party providers or telemetry off". So accounts with Anthropic's telemetry on will see a staged rollout. Accounts with telemetry off have it now. So do accounts using a third-party model provider.
How to see and change it
The same release adds a new row to /config labelled "Auto-compact window". The row shows the size that /autocompact sets. A user can change it in that row. A separate fix in the notes says the status line's used_percentage and remaining_percentage now count against the auto-compact window. The status line and /context now show the same number. A user who wants the full one-million-token window back can set the row to the model's own context size.
The notes also add "a line that says when automatic compaction gives up". Compaction is not always possible. The summariser can refuse. It can run out of budget. The new line makes that case visible instead of letting the session appear to stall.
A team using Claude Code in production should pick a setting on purpose. A shorter auto-compact window keeps per-turn latency and cost predictable. That matters for long unattended agent runs. A team that has built around a one-million-token window should check the new row before the next run. Otherwise a session that used to run end to end will summarise several times in the middle of it. A summary step costs tokens. It also drops detail that was in the earlier turns. So the setting is a trade between predictable cost and keeping the whole history in front of the model.
Source
Claude Code release notes, version 2.1.336, Anthropic.
This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.
Get AI News in your inbox
New developer tools, model and agent releases, and how teams are actually using them to release software. Short, and only when there is something worth reading.


