{"name":"\/autocompact","slug":"autocompact","family":"slash","title":"Slash commands","noun":"slash command","description":"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](\/docs\/en\/model-config#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","description_source":"docs","described_by":{"doc":"claude-code\/commands","title":"Commands"},"presence":{"first_seen":null,"removed_in":null,"in_current_build":false,"newest_mined":"2.1.308","builds":0,"mined_builds":149,"first_cited":{"version":"2.1.120","released_at":"2026-04-24 23:02:49","spans":2}},"aliases":[],"entries":[{"version":"2.1.300","anchor":"autocompact-telemetry-expanded-and-the-high-token-warning-m","heading":"\/autocompact warns about high token usage only for larger windows","line":"The high-token-usage warning in `\/autocompact` now shows only when the chosen window is bigger than the auto window for your model","released_at":"2026-10-14 14:27:26","reason":"found in this entry's text, named in this entry"},{"version":"2.1.296","anchor":"plugin-agent-frontmatter-gains-autocompactwindow-passed-thr","heading":"Plugin agents can set their own auto-compact window","line":"Plugin agent files can now set `autoCompactWindow` to choose when that agent compacts its own conversation as a subagent","released_at":"2026-10-09 16:58:10","reason":"found in this entry's text"},{"version":"2.1.296","anchor":"agent-definitions-can-carry-an-autocompactwindow-passed-to","heading":"Subagent definitions now pass their own auto-compact window to the agent","line":"An agent definition can set `autoCompactWindow`, and Claude Code now passes that value on to the subagent it starts","released_at":"2026-10-09 16:58:10","reason":"found in this entry's text"},{"version":"2.1.288","anchor":"per-model-autocompactwindow-setting","heading":"Auto-compact window can now be set separately for each model","line":"`autoCompactWindow` can now go under `modelSettings` for a single model, as a token count or `auto`","released_at":"2026-10-02 18:30:40","reason":"found in this entry's text"},{"version":"2.1.281","anchor":"auto-compact-window-lookup-now-normalises-the-model-name-fir","heading":"Auto-compact window lookup now normalises the model name first","line":"`\/autocompact` now standardises the model name first, so aliases get the right default and limit","released_at":"2026-09-23 17:01:17","reason":"found in this entry's text, named in this entry"},{"version":"2.1.221","anchor":"autocompact-ungated-plus-an-autocompact-cli-option","heading":"\/autocompact ungated, plus an --autocompact CLI option","line":"You can now set when auto-compaction kicks in with a new --autocompact flag, and \/autocompact works for everyone.","released_at":"2026-08-03 22:16:25","reason":"named in this entry, found in this entry's text"},{"version":"2.1.121","anchor":"autocompact-status-display","heading":"Autocompact Status Display","line":null,"released_at":"2026-04-27 19:39:46","reason":"found in this entry's text"},{"version":"2.1.120","anchor":"improved-autocompact-notification","heading":"Improved Autocompact Notification","line":null,"released_at":"2026-04-24 23:02:49","reason":"found in this entry's text"},{"version":"2.1.119","anchor":"auto-compact-interactive-configuration-autocompact","heading":"Auto-Compact Interactive Configuration ( \/autocompact )","line":null,"released_at":"2026-04-23 21:36:46","reason":"found in this entry's text"},{"version":"2.1.117","anchor":"notes","heading":"","line":null,"released_at":"2026-04-21 21:54:08","reason":"found in this entry's text"}],"entries_total":12,"docs":[{"source":"claude-code","path":"commands","title":"Commands","documented":true},{"source":"claude-code","path":"changelog","title":"Claude Code changelog","documented":false},{"source":"claude-code","path":"claude-code-on-the-web","title":"Use Claude Code in the cloud","documented":false},{"source":"claude-code","path":"cli-reference","title":"CLI reference","documented":false},{"source":"claude-code","path":"context-window","title":"Explore the context window","documented":false},{"source":"claude-code","path":"env-vars","title":"Environment variables","documented":false},{"source":"claude-code","path":"model-config","title":"Model configuration","documented":false},{"source":"claude-code","path":"remote-control","title":"Continue local sessions from any device with Remote Control","documented":false},{"source":"claude-code","path":"settings","title":"Claude Code settings","documented":false},{"source":"claude-code","path":"settings-reference","title":"All settings","documented":false}],"docs_total":10,"gates":[],"related":[],"url":"https:\/\/changelogs.core-directive.com\/reference\/slash\/autocompact","family_url":"https:\/\/changelogs.core-directive.com\/reference\/slash.json"}