Source Intelligence

DisclaimerUnofficial, and not affiliated with Anthropic. Nearly all of this is read straight out of what ships: npm bundles, captured prompts, published docs. Anthropic's own notes go in verbatim, marked as theirs. The rest is my reading, and every entry carries the strings behind it. If one looks wrong, vote it down and say why.

All of v2.1.98 Home All releases olderv2.1.97 v2.1.100newer
Claude Code v2.1.98

CLAUDE_CODE_MAX_CONTEXT_TOKENS Environment Variable

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.

See this entry in the whole of v2.1.98 →