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.98 ·

CLAUDE_CODE_MAX_CONTEXT_TOKENS Environment Variable

Entry
JSON All of v2.1.98
EntryKind: in v2.1.98,
New FeaturesSection of the release
What

Allows manual control of the maximum context token limit when automatic compaction is disabled.

Usage
export DISABLE_COMPACT=1
export CLAUDE_CODE_MAX_CONTEXT_TOKENS=500000
Details
  • Only takes effect when DISABLE_COMPACT is set to a truthy value
  • Parses the value as an integer; ignores invalid or non-positive values
  • When compaction is disabled without this variable, the context limit message now shows "Compaction is disabled." instead of the previous autocompact instructions
Evidence

Context limit override (search for "CLAUDE_CODE_MAX_CONTEXT_TOKENS" and "Compaction is disabled.")

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

How sure we are
One source agreesOne thing we can check says the same as this entry.
Anthropic's release notes agreeFixed CLAUDE_CODE_MAX_CONTEXT_TOKENS to honor DISABLE_COMPACT when it is set.

See this entry in the whole of v2.1.98 →

Feedback