/autocompact
A Claude Code slash command, read out of the shipped bundle. No mined inventory carries it: everything below comes from what this site has written about it.
Set the auto-compact window: how full the context window gets before Claude Code compacts automatically. Pass a size such as 500k, or auto to return to the window tuned for your model. Claude Code saves the value to user settings and applies it to the current session. See Set the auto-compact window for accepted values and what overrides it. Without an argument, opens a dialog that shows the current window. Requires Claude Code v2.1.221 or later
Anthropic's own wording. Read off Commands, captured 2026-09-28.
In the changelogs
12Releases whose published page names /autocompact.
-
v2.1.300
/autocompactwarns about high token usage only for larger windowsThe high-token-usage warning in
/autocompactnow shows only when the chosen window is bigger than the auto window for your modelfound in this entry's text, named in this entry
-
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
-
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.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
-
v2.1.281
Auto-compact window lookup now normalises the model name first
/autocompactnow standardises the model name first, so aliases get the right default and limitfound in this entry's text, named in this entry
-
v2.1.221
/autocompact ungated, plus an --autocompact CLI option
You can now set when auto-compaction kicks in with a new --autocompact flag, and /autocompact works for everyone.
named in this entry, found in this entry's text
-
v2.1.121
Autocompact Status Display
found in this entry's text
-
v2.1.120
Improved Autocompact Notification
found in this entry's text
-
v2.1.119
Auto-Compact Interactive Configuration (
/autocompact)found in this entry's text
- v2.1.117
-
v2.1.117
/autocompact Interactive Dialog
found in this entry's text
- v2.1.89
First cited
2The earliest release whose published evidence quoted /autocompact was v2.1.120, 24 Apr 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
0The miner has never read a build containing this name. It is here because a changelog entry of ours names it, which is evidence that it existed and not evidence of which releases carried it. The inventory starts at v2.1.138 and everything older than that was never mined.
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 slash command does. All slash commands.