Follow Discord
Sweep 22 Oct 2026 · 21:04Z Build v2.1.309 528 read Stable v2.1.308 Latest v2.1.309 Next v2.1.309 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.300 ·

Claude Code tracks where the auto-compact window comes from, including per-model settings

The auto-compact window can be set per model under modelSettings, and Claude Code now records which source decided the window in use

Group of 2 Use it now Internal Changes
JSON All of v2.1.300
Use it nowTier: how much it should matter to you
3Useful: my rating, 1 to 5
3Signal: worth watching, 1 to 5
CompactionArea: what it touches
Internal ChangesKind: in v2.1.300,
What probably matters to youSection of the release

What

Compaction is when Claude Code shortens the conversation so it fits in the model's working memory (the context window). The autoCompactWindow setting controls how full that memory gets before this happens.

  • A per-model value is looked up at modelSettings.autoCompactWindow, so different models can have different windows.
  • Claude Code now records the window actually in force and where it came from, once each time it changes. Possible sources are env, server, experiment, default, agent_definition, session_override, settings_per_model and settings_top_level. The code that works out the window was split up to allow this.
  • Records of successful compaction gain autoCompactWindow, autoCompactWindowOrigin and armTrigger fields.
  • A new helper can prepare a compaction in advance while Claude Code is idle (armTrigger "idle").
  • The list of settings Claude Code reports as set now includes modelSettings.autoCompactWindow when any entry under modelSettings defines autoCompactWindow, alongside permissions.defaultMode and worktree.baseRef.

Why

Several places can set the auto-compact window, from environment variables to settings files to agent definitions. Recording which one won makes it possible to tell why compaction happens when it does, and confirms a per-model setting is recognised.

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.

Added since A small documentation edit on Create custom subagents touched a line naming autoCompactWindow after this was published. To make one subagent compact earlier than it otherwise would, set `autoCompactWindow` in its [frontmatter](#supported-frontmatter-fields) to a token count from `100000` to `1000000`. If you set [`CLAUDE_CODE_AUTO_COMPACT_WINDOW`](/docs/en/… sub-agents see the edit
Confirmed since Anthropic's documentation has since written up autoCompactWindow, on Model configuration. * **In scripts and cloud environments**: set [`CLAUDE_CODE_AUTO_COMPACT_WINDOW`](/docs/en/env-vars) to a token count such as `200000`. Unless Claude Code [ignores the value](#claude_code_auto_compact_window-values), the variable takes prec… model-config see the edit
How sure we are
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agreesAnthropic's documentation has since written up autoCompactWindow, on Model configuration.

See this entry in the whole of v2.1.300 →

Feedback