autoCompactWindow
A Claude Code settings key, read out of the shipped bundle. It was in the build from v2.1.138 and was gone by v2.1.284.
Set how full the context gets before Claude Code compacts
Anthropic's own wording. Read off All settings, captured 2026-10-22.
In the changelogs
15Releases whose published page names autoCompactWindow.
-
v2.1.307
Auto-compact window is remembered per model when a session is resumed
Each model's auto-compact window is now saved with the session and restored on resume, and the default window for a model has changed
named in this entry, found in this entry's text
-
v2.1.301
Organizations can push more settings remotely, and the output style is now reported
Remotely managed settings now accept keys such as
effortLevel,outputStyleandattribution, and Claude Code's settings report includes the output stylefound in this entry's text
-
v2.1.300
Claude Code now reports which setting decides when it compacts
A new usage report records the auto-compact window in force and where it came from, such as an environment variable, a setting or the default
found in this entry's text, named in this entry
-
v2.1.300
Claude Code now notes when a per-model auto-compact window is set
Claude Code's list of settings in use now includes
autoCompactWindowwhen it is set for any model undermodelSettingsfound in this entry's text
-
v2.1.296
Plugin agents can set their own auto-compact window
Plugin agent files can now set
autoCompactWindowto choose when that agent compacts its own conversation as a subagentfound in this entry's text, named in this entry
-
v2.1.296
Subagent definitions now pass their own auto-compact window to the agent
An agent definition can set
autoCompactWindow, and Claude Code now passes that value on to the subagent it startsfound in this entry's text
-
v2.1.296
Teammate agents weigh a second setting when deciding to compact
Teammate agents now check a per-agent compaction window alongside autoCompactWindow when deciding whether to compact their history
found in this entry's text
-
v2.1.288
Auto-compact window can now be set separately for each model
autoCompactWindowcan now go undermodelSettingsfor a single model, as a token count orautofound in this entry's text, named in this entry
-
v2.1.288
The auto-compact window is now saved separately for each model
Setting the auto-compact window in
/confignow applies to the current model only, not every modelfound in this entry's text, named in this entry
-
v2.1.261
New settings keys: bashOutputMaxChars / taskOutputMaxChars
The new Bash and Task output limit settings are now formally recognized and propagated internally.
found in this entry's text
-
v2.1.238
New
keybindingFlavorsetting for readline-style prompt editingSet keybindingFlavor to readline and Ctrl+W deletes back to whitespace like Bash does.
found in this entry's text
-
v2.1.223
Startup warning when CLAUDE_CODE_DISABLE_1M_CONTEXT can't actually be enforced
If your 1M-context disable flag has no effect on your model, startup now tells you and points at the real setting.
named in this entry, found in this entry's text
-
v2.1.221
New --autocompact flag for the auto-compact window
You can set the auto-compact window at launch with --autocompact, using auto or 100k to 1M.
named in this entry, found in this entry's text
-
v2.1.117
/autocompact Interactive Dialog
found in this entry's text
-
v2.1.117
Auto-Compact Window Message Improvement
found in this entry's text
First cited
3The earliest release whose published evidence quoted autoCompactWindow was v2.1.288, 2 Oct 2026. That is the oldest release this project wrote about it, so it is a floor on the name's age and not the release that introduced it. It is not a presence reading: which builds carried the name is the table below.
Presence across releases
2Build by build
149One row per release since the first build this name was read out of. Absent means the build was read and the name was not in it, never mined means no bundle for that release was ever archived, and a declared type or a default is only ever what that release's own bundle stated.
Read out of the published npm bundle release by release, and out of Anthropic's own documentation as this site captured it. Nothing on this page is a description anybody here wrote about what the settings key does. All settings keys.