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

Claude Code v2.1.304 ·

CLAUDE_CODE_AUTO_COMPACT_WINDOW gets shorthand values, warnings and a note in /config

The auto-compact window env var accepts 200k or 1M shorthand, clamps or warns on bad values, and /config shows an extra note about it

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

What

Auto-compact is when Claude Code summarises the conversation so far to free up room in the model's memory. The auto-compact window sets how full that memory can get, in tokens, before this happens. CLAUDE_CODE_AUTO_COMPACT_WINDOW is an environment variable, a value set in your shell, that sets this window. This release changes how it is read and shown:

  • The value is read by a new parser. It accepts shorthand such as 200k or 1M, and a bare number between 100 and 1000 is treated as thousands.
  • Values that are too small or too large are brought up to the minimum or down to the maximum, with a warning in the log or in headless output.
  • A value that cannot be read at all is ignored, with the message that it "isn't a usable size, so Claude Code ignores it." Before, an invalid value was dropped without a visible warning.
  • At startup in interactive mode, the variable is checked and a warning is raised if needed.
  • The auto-compact window entry in /config now shows an extra warning-coloured line built from the environment variable. Its exact wording was not read. Before, the only extra line was "Auto-compact is currently disabled (see /config)".

Why

A mistyped window size now produces a warning instead of quietly having no effect, and the settings screen points out when the environment variable is in play.

Read from
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 CLAUDE_CODE_AUTO_COMPACT_WINDOW, on Error reference. | `CLAUDE_CODE_AUTO_COMPACT_WINDOW="<value>" reads as <N> tokens, so Claude Code treats it as the 100k minimum` | [Values and warnings for `CLAUDE_CODE_AUTO_COMPACT_WINDOW`](/docs/en/model-config#claude_code_auto_compact_window-values) | errors see the edit
How sure we are
Two sources agreeTwo things we can check say the same as this entry.
Anthropic's documentation agreesAnthropic's documentation has since written up CLAUDE_CODE_AUTO_COMPACT_WINDOW, on Error reference.
Anthropic's release notes agreeFixed CLAUDE_CODE_AUTO_COMPACT_WINDOW=200k silently setting a 100K window: the variable now accepts k and M suffixes like --autocompact, and…

See this entry in the whole of v2.1.304 →

Feedback