Follow Discord
Sweep 24 Nov 2026 · 22:58Z Build v2.1.332 549 read Stable v2.1.326 Latest v2.1.332 Next v2.1.332 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.296 ·

Agents can now set their own autoCompactWindow

Agent and plugin agent definitions accept autoCompactWindow, so a subagent can compact its own conversation at its own token threshold

Group of 3 Use it now Notable New Features
JSON All of v2.1.296
Use it nowTier: how much it should matter to you
4Useful: my rating, 1 to 5
2Signal: worth watching, 1 to 5
PluginsArea: what it touches
New FeaturesKind: in v2.1.296,
What probably matters to youSection of the release

What

The auto-compact window (autoCompactWindow) is how full the context gets, in tokens, before Claude Code compacts, meaning it summarises the conversation to make room. It could already be set per model. Agent definitions, including plugin agent files, can now set it in their frontmatter (the settings block at the top of the agent file) for that one agent:

  • The value is a token count, accepted as a number or numeric string and validated as an integer between two bounds. An invalid value gives the error "has invalid autoCompactWindow".
  • It is the token count at which the agent compacts its own conversation when it runs as a subagent (a helper agent started by the main one). One finding notes it can only lower the window the agent would inherit and has no effect on the main session agent.
  • The value is kept on the agent definition, copied through alongside maxTurns, hooks and mcpServers, and forwarded into the subagent's options when it is spawned.
  • The in-process teammate runner's auto-compact check now also takes the per-agent value into account alongside the inherited one.

The per-model setting, described as 100000 to 1000000 tokens or auto, is still where /autocompact saves its value.

Why

An agent that reads a lot can compact earlier than the main session, keeping its own work within a size you choose. Teammate agents may now compact at a different point than before.

Read from
Names in the bundleautoCompactWindow
Since it was published

The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.

Confirmed since Anthropic's documentation has since written up autoCompactWindow, on Create custom subagents. * **[Frontmatter fields](#supported-frontmatter-fields)**: `description`, `tools`, `disallowedTools`, `model`, `permissionMode`, `mcpServers`, `hooks`, `maxTurns`, `autoCompactWindow`, `skills`, `initialPrompt`, `memory`, `effort`, `backgr… sub-agents see the edit
Added since A small documentation edit on Subagents in the SDK touched a line naming autoCompactWindow after this was published. | `autoCompactWindow` | `number` | No | Lower the [auto-compact window](/docs/en/sub-agents#subagent-auto-compact-window) for this agent when it runs as a subagent, to a token count from `100000` to `1000000`. Requires TypeScript Agent SDK… agent-sdk/subagents see the edit
How sure we are
Two sources agreeTwo things we can check say the same as this entry.
Anthropic's documentation agreesA small documentation edit on Subagents in the SDK touched a line naming autoCompactWindow after this was published.
Anthropic's release notes agreeAdded autoCompactWindow to subagent frontmatter and --agents definitions, so a subagent can auto-compact earlier than the main…

See this entry in the whole of v2.1.296 →

Feedback