The short answer
- On December 1, 2026, Anthropic’s Claude Code changelog said the auto setting for automatic compaction is near 400K tokens on most current 1M models, including `-p` and SDK runs, and that the change is rolling out.
- The model’s context window is still 1M. Anthropic’s model configuration docs say: “On auto at 400K, compaction runs at about 367K tokens.”
- The new default applies to current models with a native 1M window, including the Fable models, Sonnet 5 and later, Haiku 5.5, and Opus 4.7 and later. Some sessions still use a 1M window, including versions before v2.1.334 and some scheduled or self hosted sessions.
- Users can check the window with `/autocompact`, use the full 1M with `/autocompact 1M`, or return to the default with `/autocompact auto`. Scripts and cloud environments use the `CLAUDE_CODE_AUTO_COMPACT_WINDOW` setting.
On December 1, 2026, Anthropic’s Claude Code changelog said the auto setting for automatic compaction is near 400K tokens on most current 1M models, including -p and SDK runs, and that the change is “rolling out,” already on with third party providers or with telemetry off. The model’s context window is still 1M. Only the point at which Claude Code compacts the session has moved.
Anthropic’s model configuration docs are where the detail lives. They say: “On current models with a native 1M context window, auto is 400K, so your session compacts near 400K tokens, or later in some cases.” They also state: “On auto at 400K, compaction runs at about 367K tokens.” The context window page points readers to those sections and notes: “The point where automatic compaction runs depends on your model and configuration.”
The New Stack’s Ritoban Mukherjee, in an article published December 4, 2026, reports that Anthropic is rolling the change out progressively, and that it is already live for users who run Claude Code through third party providers or who turn telemetry off. The New Stack says Anthropic “did not respond by publication time.” Token figures in this article come from Anthropic’s docs, not from The New Stack.
#What changed?
The December 1, 2026 changelog records the new auto setting. Anthropic’s v2.1.334 release notes carry the same text; they are the same publisher’s notes, not a separate confirmation. Anthropic’s settings reference says: “The row requires Claude Code v2.1.334 or later.”
The model configuration page lists which models use the new default: “Current models with a native 1M window compact near 400K tokens by default or later in some cases. These models include the Fable models, Sonnet 5 and later, Haiku 5.5, and Opus 4.7 and later.” Anthropic’s reason, in its words, is: “Your later requests are smaller when compaction runs sooner, so long sessions use fewer tokens.”
The auto figure and the point where compaction actually runs are not the same number. Auto is 400K. Compaction, Anthropic writes, “runs at about 367K tokens.”
The docs also describe cases that do not follow the 400K auto setting. A session on a Claude Code version before v2.1.334, a Desktop scheduled task, a cloud scheduled task, or a session in an environment you host yourself uses a 1M window. “A conversation you leave idle can still compact below the size you set.” And: “Sonnet 4.6 and Opus 4.6 without extended context compact at the 200K boundary.” Anthropic adds: “Check again after you switch to a newer model, because Anthropic continues to evaluate auto for future models and can set a different window.”
#Who can use it and when?
The changelog describes the change as “rolling out,” and already on with third party providers or with telemetry off. It does not say the rollout is complete for every user. Users who already have v2.1.334 or later, and who are in the rollout or already have it on, see the new auto setting on the 1M context models listed above.
To check the current window, Anthropic says to run /autocompact with no value. To use the full 1M on the current model, the docs say to run /autocompact 1M in the session. On a local machine, that size is saved for later sessions on that model version. For the current cloud session, the docs also say to run /autocompact 1M. To return to the default, run /autocompact auto. In scripts and cloud environments, set CLAUDE_CODE_AUTO_COMPACT_WINDOW to a token count. Anthropic also added a row in /config to see and change the size that /autocompact sets; the settings reference says that row requires Claude Code v2.1.334 or later.
#How does it compare?
This changes a default in Claude Code, not the models’ 1M context window. For earlier Claude Code coverage, see Claude Code approval files expose secrets; rotate keys before cleanup, published November 9, 2026. For the Fable models that Anthropic includes in the 1M list, see Anthropic releases Claude Fable 5.2 and Mythos 5.2 at a lower price, published November 10, 2026.
Our analysis: Anthropic is moving when Claude Code compacts a long session, not shrinking the 1M context window. The auto setting is 400K; Anthropic’s model configuration docs say compaction then runs at about 367K tokens. The changelog’s “rolling out” wording means some users may not have the new auto setting yet. The New Stack is used here only for the rollout and for its December 4, 2026 publication, not for any token figure.
#What is still unclear?
- When will the rollout reach users who are not already on the new auto setting?
- Will auto stay at 400K for later 1M context models? Anthropic says it continues to evaluate auto and can set a different window.
Frequently asked questions
What did Anthropic change in Claude Code?
In the December 1, 2026 changelog, Anthropic said the auto setting for automatic compaction is near 400K tokens on most current 1M models, including `-p` and SDK runs, and that the change is rolling out. The context window is still 1M.
If auto is 400K, when does compaction run?
Anthropic’s model configuration docs say: “On auto at 400K, compaction runs at about 367K tokens.” They also say a session compacts near 400K tokens, or later in some cases.
Which models use the new default?
Anthropic says current models with a native 1M window compact near 400K tokens by default or later in some cases, including the Fable models, Sonnet 5 and later, Haiku 5.5, and Opus 4.7 and later. Sonnet 4.6 and Opus 4.6 without extended context compact at the 200K boundary.
How can users go back to a 1M window?
Anthropic says to run `/autocompact 1M` in the session to use the full 1M on the current model, or in the current cloud session. To check the window, run `/autocompact` with no value. To return to the default, run `/autocompact auto`. In scripts and cloud environments, set `CLAUDE_CODE_AUTO_COMPACT_WINDOW` to a token count.
Does every user have the new auto setting?
No. Anthropic describes the change as rolling out, and already on with third party providers or with telemetry off. It does not say the rollout is complete.
Sources
Every factual claim in this article traces back to one of these.
One email a week on AI agents and bots.
Launches, pricing and rollout changes and the guides worth reading. At most once a week, and you can leave with one click.



