Follow Discord
Sweep 25 Sep 2026 · 19:33Z Build v2.1.283 504 read Stable v2.1.274 Latest v2.1.283 Next v2.1.283 Feeds RSS JSON llms.txt llms-full.txt Unofficial
HomeDocsSearch
Search the documentation

20 pages for autocompact.

Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.

Beta Claude Developer Platform · in the page api/beta …`BetaCompactionBlock object` A compaction block returned when autocompact is triggered. When content is None, it indicates the compaction failed to produce a valid summary (e.g.,… Messages Claude Developer Platform · in the page api/beta/messages …`BetaCompactionBlock object` A compaction block returned when autocompact is triggered. When content is None, it indicates the compaction failed to produce a valid summary (e.g.,… Batches Claude Developer Platform · in the page api/beta/messages/batches …CompactionBlock object` A compaction block returned when autocompact is triggered. When content is None, it indicates the compaction failed to produce a valid sum… Retrieve Message Batch results Claude Developer Platform · in the page api/beta/messages/batches/results …CompactionBlock object` A compaction block returned when autocompact is triggered. When content is None, it indicates the compaction failed to produce a valid sum… Create a Message Claude Developer Platform · in the page api/beta/messages/create …`BetaCompactionBlock object` A compaction block returned when autocompact is triggered. When content is None, it indicates the compaction failed to produce a valid summary (e.g.,… Agent SDK reference - TypeScript Claude Code CLI · in the page agent-sdk/typescript …: string; source: string; tokens: number; }[]; }; autoCompactThreshold?: number; isAutoCompactEnabled: boolean; messageBreakdown?: { toolCallTokens: number; toolResultT… Claude Code changelog Claude Code CLI · in the page changelog …ged or `--settings` `effortLevel`, or a per-model level * Changed `/autocompact`'s footer hint to name ←/→, the keys that adjust other ordered values * Changed `/fast`'s footer to name Space as th… Use Claude Code in the cloud Claude Code CLI · in the page claude-code-on-the-web …n the context window approaches capacity. Cloud sessions set [`CLAUDE_AUTOCOMPACT_PCT_OVERRIDE`](/docs/en/env-vars) themselves, so compaction triggers partway through the [auto-compact window](/docs/e… CLI reference Claude Code CLI · in the page cli-reference …/extra-rules.txt` | | `--autocompact <auto\|tokens>` | Set the [auto-compact window](/docs/en/model-config#set-the-auto-compact-window) fo… Configure cloud environments Claude Code CLI · in the page cloud-environments …session also sets some variables itself when it starts. For [`CLAUDE_AUTOCOMPACT_PCT_OVERRIDE`](/docs/en/claude-code-on-the-web#manage-context), the value the session sets overrides one you add here,… 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 …ion 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 get… Environment variables Claude Code CLI · in the page env-vars …| | `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE` | Set the percentage (1-100) of the auto-compact window at which auto-compaction t… Model configuration Claude Code CLI · in the page model-config …window in three places: * **For this session and later ones**: run `/autocompact` with a value, like `/autocompact 500k`. Claude Code saves it to your user settings as [`autoCompactWindow`](/docs/en/… Continue local sessions from any device with Remote Control Claude Code CLI · in the page remote-control …eractive 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 the… Claude Code settings Claude Code CLI · in the page settings …| | `autoCompactEnabled` | **Default**: `true`. Automatically compact the conversation when context approaches the limit.… All settings Claude Code CLI · in the page settings-reference …| Git and attribution | Any file | | [`autoCompactEnabled`](#autocompactenabled) | Turn [automatic compaction](… Create custom subagents Claude Code CLI · in the page sub-agents …versation. Compaction triggers under the same conditions, and `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE` applies to subagents as well. See [environment variables](/docs/en/env-vars) for when the override takes… Troubleshooting Claude Code CLI · in the page troubleshooting …dered. ### Auto-compaction stops with a thrashing error If you see `Autocompact is thrashing: the context refilled to the limit...`, automatic compaction succeeded but a file or tool output immediat… Week 17 · April 20–24, 2026 Claude Code CLI · in the page whats-new/2026-w17 …ndow, fixing inflated <code>/context</code> percentages and premature autocompaction</div> <div><code>/resume</code> on large sessions is up to 67% faster and now offers to summarize stale, large…
Feedback