2 pages for claude_code_max_context_tokens.
Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.
Environment variables
Claude Code CLI · in the page
env-vars
…e, Claude Code compacts at the context window it assumes for the ID. `CLAUDE_CODE_MAX_CONTEXT_TOKENS` can correct the assumed window instead; see [Correct the window for a gateway or custom model ID](…
Model configuration
Claude Code CLI · in the page
model-config
…same window with or without the suffix. * **Any other window**: set [`CLAUDE_CODE_MAX_CONTEXT_TOKENS`](/docs/en/env-vars) to the window size in tokens in the environment that starts Claude Code, such…