Follow Discord
Sweep 03 Dec 2026 · 19:13Z Build v2.1.336 553 read Stable v2.1.332 Latest v2.1.336 Next v2.1.336 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · claude-code

Model configuration changedmodel-config

Nearest release: v2.1.336, published 2 hours before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Upstream edited this page at 3 Dec 2026 20:18 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 3 Dec 2026 20:37 UTC.

Upstream edited
Recorded here
Lines+2added
Lines−2removed
From line 911 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits125to this page, all time

The whole hunk

from line 911, old and new numbered
/
lines
from line 911
911911* **For the current model, in this session and later ones**: run `/autocompact` with a value, like `/autocompact 500k`. Claude Code saves it to your user settings under the current model in [`modelSettings`](https://code.claude.com/docs/en/settings-reference#modelsettings) and applies it to the current session. If a higher-priority [settings scope](https://code.claude.com/docs/en/settings.md#settings-precedence) such as managed settings sets its own window for that model or for every model, the command saves your value but the session keeps that scope's window, and the command says so. Run `/autocompact auto` to return to the window tuned for your model. Before v2.1.288, the command saved one window for every model, as the top-level `autoCompactWindow`.
912912* **For every model**: set [`autoCompactWindow`](https://code.claude.com/docs/en/settings-reference#autocompactwindow) in a settings file, such as `"autoCompactWindow": 200000` in `~/.claude/settings.json`. A window you saved for a model with `/autocompact` takes precedence over this key in the same file for that model.
913913* **For one launch**: start Claude Code with the [`--autocompact`](https://code.claude.com/docs/en/cli-reference#cli-flags) flag, such as `claude --autocompact 500k`. The flag overrides a window set in any settings scope, including managed settings, without changing your saved setting.
914* **In scripts and cloud environments**: set [`CLAUDE_CODE_AUTO_COMPACT_WINDOW`](https://code.claude.com/docs/en/env-vars) to a token count such as `200000`. Unless Claude Code [ignores the value](#claude_code_auto_compact_window-values), the variable takes precedence over the command, the flag, and the `autoCompactWindow` setting. `/autocompact` then reports the override without saving. The status line's `used_percentage` measures against the model's full context window, so while the variable is set, that percentage doesn't indicate when compaction will run.
914* **In scripts and cloud environments**: set [`CLAUDE_CODE_AUTO_COMPACT_WINDOW`](https://code.claude.com/docs/en/env-vars) to a token count such as `200000`. Unless Claude Code [ignores the value](#claude_code_auto_compact_window-values), the variable takes precedence over the command, the flag, and the `autoCompactWindow` setting. `/autocompact` then reports the override without saving.
915915* **For one subagent**: see [Set the auto-compact window for one subagent](https://code.claude.com/docs/en/sub-agents.md#subagent-auto-compact-window).
916916 
917917The command and the flag accept a window size of 100K tokens or more, in any of these forms:
from line 957
957957This session is on auto, which now autocompacts near 400k tokens instead of 1m to lower the cost of long sessions. To opt out, run /autocompact 1m.
958958```
959959 
960On `auto` at 400K, compaction runs at about 367K tokens. The [status line's](https://code.claude.com/docs/en/statusline.md#context-window-fields) `used_percentage` then reads about 37%, because it counts against the full 1M.
960On `auto` at 400K, compaction runs at about 367K tokens.
961961 
962962`auto` is the recommended setting, so you can keep working as you are. To use the full 1M, set the window yourself:
963963 
Feedback