Last updated: December 2, 2026
Claude Code 2.1.334, released December 1, 2026, makes sessions on most current 1M-context models auto-compact near 400K tokens instead of 1M to cut the cost of long sessions. It also adds a search box to /model, an Auto-compact window row in /config, and folder-level REVIEW.md support for local reviews.
Contents
- What changed in 2.1.334
- The 400K auto-compact default
- Auto-compact options at a glance
- How to choose your auto-compact window
- /model search and other terminal changes
- Gateway, pricing and review changes for admins
- VS Code and web changes
- Limitations
- Frequently asked questions
What changed in 2.1.334
Anthropic lists version 2.1.334 under December 1, 2026 in the official changelog (Claude Code changelog), with the same notes on the GitHub release page (GitHub release). It follows 2.1.333 from the day before, which we covered in our Claude Code 2.1.333 guide to REVIEW.md and workflow agents.
The release is long, with dozens of fixes. The sections below cover the changes power users will notice first.
The 400K auto-compact default
The release notes describe the headline change as moving “auto-compact’s per-model auto setting to near 400K on most current 1M models, -p and SDK runs too.” The change is rolling out, and it is on now for people using third-party providers or with telemetry off (release notes).
The model configuration docs explain the reasoning. By default a session uses auto, a window Anthropic tunes per model “for the best cost and performance.” On current native 1M models, auto is now 400K. Compaction runs at about 367K tokens, so the status line’s used_percentage reads about 37% at that point, because it still counts against the full 1M (model configuration docs).
The docs name the affected models as the Fable models, Sonnet 5 and later, Haiku 5.5, and Opus 4.7 and later. You will see a notice that the session “now autocompacts near 400k tokens instead of 1m to lower the cost of long sessions,” with /autocompact 1m as the opt-out.
Some people also see a one-time prompt titled Autocompact now defaults to 400k tokens. Apply moves models to auto; Keep preserves your saved sizes. Closing it changes nothing.
Why it matters: compacting earlier means each later request carries fewer tokens. The trade-off is that Claude works from a summary sooner, so for large refactors the full 1M window may still be the better choice.
Auto-compact options at a glance
This table summarizes the ways to set the window, as described in the docs (Set the auto-compact window).
| Where you set it | Example | Scope |
|---|---|---|
/autocompact in a session |
/autocompact 500k |
Current model, this session and later ones |
/config (new in 2.1.334) |
Auto-compact window row | Same size that /autocompact sets |
autoCompactWindow setting |
"autoCompactWindow": 200000 |
Every model, unless a per-model size is saved |
--autocompact flag |
claude --autocompact 500k |
One launch; overrides settings |
CLAUDE_CODE_AUTO_COMPACT_WINDOW |
200000 |
Scripts and cloud environments |
Managed modelSettings |
"autoCompactWindow": 1000000 per model |
Whole organization |
One detail trips people up: a bare number in the environment variable means tokens, so CLAUDE_CODE_AUTO_COMPACT_WINDOW=200 means 200 tokens, while /autocompact 200 means 200,000.
How to choose your auto-compact window
- Update. Native installs update in the background (setup docs); to update now, run
claude update, thenclaude --version. - Check your current window. Run
/autocompactwith no value, or open/configand find the Auto-compact window row. In a resumed conversation, wait for one reply first. - Keep the default if your sessions are mostly short tasks. You get earlier compaction and lower token use per turn.
- Restore 1M for deep work with
/autocompact 1M. On your own machine this is saved for that model version, and compaction runs at about 967K tokens. - Go back to the default at any time with
/autocompact auto. - Set it for scripts by exporting
CLAUDE_CODE_AUTO_COMPACT_WINDOWbeforeclaude -por an Agent SDK run. - Re-check after switching models, because the docs say Anthropic may set a different
autowindow for future models.
If you build agents on the SDK, our Claude Agent SDK 0.3.332 guide covers setup, and the 400K default now applies to those runs as well.
/model search and other terminal changes
Other terminal changes in the release notes (release notes):
/modelsearch. When the list has more than 25 models, a search box matches names and model IDs. Press the down arrow to reach thesshortcut and number keys.- Windows on Arm.
/desktopandclaude --desktopnow work there.
Fixes include worktrees starting from the wrong branch and several Code Mode problems. For background on Code Mode, see our Claude Code Code Mode guide.
Gateway, pricing and review changes for admins
Folder-level REVIEW.md. Version 2.1.333 let local /code-review follow the root REVIEW.md. In 2.1.334, local reviews “also follow REVIEW.md files in folders above a committed change” (release notes). That matches the managed Code Review service, which already reads REVIEW.md files in most subdirectories on a protected branch (Customize Code Review).
Pricing keys. The modelPricing managed setting gains cacheWrite5m, cacheWrite1h and, for Haiku 5.5, longPrompt. The gateway’s pricing.overrides gains cache_write_5m, cache_write_1h and long_prompt; old keys still work. The model docs note that a Haiku 5.5 request costs more per token when its prompt is longer than 100K tokens, which is what longPrompt captures.
Gateway checks. claude gateway --config <file> --check config validates a config file without starting the gateway, and a start now reports a bad managed policy before it connects to Postgres. The gateway also warns when a managed MCP server holds a ${...} placeholder that Claude Code would send as written.
VS Code and web changes
The VS Code extension’s new look gains a Try again button for failed replies, Mermaid diagrams, editing queued messages, a changed-lines count with a “Review Session Changes” command, and a “Turn off new look…” command. On Claude Code on the web, the New scheduled task dialog adds One-time and Custom (cron) frequencies, and Team and Enterprise Owners get a Git providers setting, off by default, to limit which GitHub organizations and accounts can be linked.
For a broader look at plans, models and features, start with our Claude Code power-user guide.
Limitations
- Rolling out. The release notes say the 400K default is still rolling out, and is on now with third-party providers or with telemetry off.
- No cost figures. Anthropic says the change lowers the cost of long sessions but does not publish a savings percentage.
- Some sessions run past 400K. For example, resuming a conversation already past 400K uses 1M until it compacts.
Frequently asked questions
What is new in Claude Code 2.1.334?
Version 2.1.334, released December 1, 2026, moves the default auto-compact window on most current 1M-context models to about 400K tokens, adds a search box to /model, adds an Auto-compact window row to /config, and lets local /code-review follow REVIEW.md files in folders above a change.
Why does Claude Code now compact at 400K tokens?
Anthropic’s docs say the per-model auto setting now compacts near 400K tokens instead of 1M to lower the cost of long sessions. Compaction runs at about 367K tokens, so the status line shows roughly 37% of the 1M window used at that point.
How do I keep the full 1M context window?
Run /autocompact 1M in a session. On your own machine the size is saved for that model version, and compaction then runs at about 967K tokens. Administrators can keep 1M for everyone with a modelSettings entry in managed settings.
Does the 400K default apply to scripts and the Agent SDK?
Yes. The 2.1.334 release notes say the change covers -p and SDK runs too. You can set CLAUDE_CODE_AUTO_COMPACT_WINDOW in the environment to choose a different size for scripts and cloud environments.
How do I update to Claude Code 2.1.334?
Anthropic’s setup docs say native installs update automatically in the background. To update now, run claude update, then run claude –version to confirm you are on 2.1.334.
Sources
- Claude Code v2.1.334 release notes (GitHub)
- Claude Code changelog (Claude Code docs)
- Model configuration and the auto-compact window (Claude Code docs)
- Set up Claude Code: install and update (Claude Code docs)
- Customize Code Review with REVIEW.md (Claude Code docs)