11 pages for claude_code_auto_compact_window.
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
…nt row, or off screen, instead of the transcript's first row * Fixed `CLAUDE_CODE_AUTO_COMPACT_WINDOW=200k` silently setting a 100K window: the variable now accepts `k` and `M` suffixes like `--autoco…
Claude apps gateway configuration
Claude Code CLI · in the page
claude-apps-gateway-config
…anaged: policies: - match: {} cli: env: CLAUDE_CODE_AUTO_COMPACT_WINDOW: "200000" ``` Claude Code applies this variable without showing the developer the approval dialog…
Use Claude Code in the cloud
Claude Code CLI · in the page
claude-code-on-the-web
…ompaction triggers. To change the auto-compact window instead, set [`CLAUDE_CODE_AUTO_COMPACT_WINDOW`](/docs/en/env-vars) in your environment variables, or run [`/autocompact`](/docs/en/commands#all-…
Environment variables
Claude Code CLI · in the page
env-vars
…| | `CLAUDE_CODE_AUTO_COMPACT_WINDOW` | Set the [auto-compact window](/docs/en/model-config#set-the-auto-compact-…
Error reference
Claude Code CLI · in the page
errors
…orced` | [Configuration warnings](#the-200k-limit-isnt-enforced) | | `CLAUDE_CODE_AUTO_COMPACT_WINDOW="<value>" reads as <N> tokens, so Claude Code treats it as the 100k minimum` | [Values and warning…
Connect Claude Code to an LLM gateway
Claude Code CLI · in the page
llm-gateway-connect
…atically | Run `/compact` to recover the session. To prevent it, set `CLAUDE_CODE_AUTO_COMPACT_WINDOW` to the gateway's limit; Claude Code clamps the value to at least 100,000 tokens and at most the m…
Deploy managed settings
Claude Code CLI · in the page
managed-settings
…utocompactwindow) is a default too. The `--autocompact` flag and the `CLAUDE_CODE_AUTO_COMPACT_WINDOW` variable still set the [auto-compact window](/docs/en/model-config#set-the-auto-compact-window) f…
Model configuration
Claude Code CLI · in the page
model-config
…t enforces. If your gateway rejects requests above 200K tokens, set [`CLAUDE_CODE_AUTO_COMPACT_WINDOW=200000`](/docs/en/env-vars) in the environment that starts Claude Code, so sessions on every model…
Claude Code settings
Claude Code CLI · in the page
settings
…he [`--autocompact`](/docs/en/cli-reference#cli-flags) flag and the [`CLAUDE_CODE_AUTO_COMPACT_WINDOW`](/docs/en/env-vars) environment variable can override it. [Set the auto-compact window](/docs/en/…
All settings
Claude Code CLI · in the page
settings-reference
…ence#cli-flags) takes precedence over this key for one session, and [`CLAUDE_CODE_AUTO_COMPACT_WINDOW`](/docs/en/env-vars) takes precedence over both unless Claude Code [ignores the variable's value](…
Create custom subagents
Claude Code CLI · in the page
sub-agents
…ter-fields) to a token count from `100000` to `1000000`. If you set [`CLAUDE_CODE_AUTO_COMPACT_WINDOW`](/docs/en/env-vars#variables), the subagent uses that variable's window instead and the field has…