10 pages for /autocompact.
Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.
Claude Code changelog
Claude Code CLI · in the page
changelog
…that read many PDF pages, images or other large tool results * Fixed `/autocompact` in cloud sessions going back to the default window after the session restarted * Fixed a conversation cleared with `…
Use Claude Code in the cloud
Claude Code CLI · in the page
claude-code-on-the-web
…T_WINDOW`](/docs/en/env-vars) in your environment variables, or run [`/autocompact`](/docs/en/commands#all-commands) with a token count in a session where the variable isn't set. [Subagents](/docs/en…
CLI reference
Claude Code CLI · in the page
cli-reference
…ion without changing your saved settings. Accepts the same values as `/autocompact`; that section covers the value forms and what overrides the flag. Requires Claude Code v2.1.221 or later…
Commands
Claude Code CLI · in the page
commands
…| | `/autocompact [auto\|<tokens>]` | Set the auto-compact…
Explore the context window
Claude Code CLI · in the page
context-window
…tion keeps and how to guide the summary. * **Compact earlier**: run [`/autocompact`](/docs/en/commands#all-commands) with a token count, like `/autocompact 500k`, to set how full the context window ge…
Environment variables
Claude Code CLI · in the page
env-vars
…also capped at the model's context window. Takes precedence over the `/autocompact` command, the `--autocompact` flag, and the `autoCompactWindow` setting. The status line's `used_percentage` always m…
Model configuration
Claude Code CLI · in the page
model-config
…s: * **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 [`mode…
Continue local sessions from any device with Remote Control
Claude Code CLI · in the page
remote-control
…teractive CLI, so the command tells you to run it there instead. * `/autocompact`, from v2.1.221: pass the window size as an argument, for example `/autocompact 500k`. With no argument, it prints th…
Claude Code settings
Claude Code CLI · in the page
settings
…et, Claude Code uses a window tuned for your model. Set it with the [`/autocompact`](/docs/en/commands#all-commands) command, which writes this key to user settings; the [`--autocompact`](/docs/en/cli…
All settings
Claude Code CLI · in the page
settings-reference
…0000` to `1000000`, or `"auto"` for the window tuned for the model. [`/autocompact`](/docs/en/model-config#set-the-auto-compact-window) saves here. For that model, the value takes precedence over a to…