[DOCS] Environment variable reference does not document scientific notation for numeric limits

Open 💬 0 comments Opened Jul 15, 2026 by coygeek

Documentation Type

Missing documentation (feature not documented)

Documentation Location

https://code.claude.com/docs/en/env-vars

Section/Topic

The “Variables” reference table, especially the CLAUDE_CODE_MAX_OUTPUT_TOKENS entry and other numeric environment variables.

Current Documentation

The environment-variable setup section gives a decimal example:

export API_TIMEOUT_MS="1200000"

The CLAUDE_CODE_MAX_OUTPUT_TOKENS reference entry says:

“Set the maximum number of output tokens for most requests. Defaults and caps vary by model; see max output tokens. Increasing this value reduces the effective context window available before auto-compaction triggers”

It does not specify the accepted numeric syntax or show a scientific-notation example.

What's Wrong or Missing?

Claude Code v2.1.208 fixed CLAUDE_CODE_MAX_OUTPUT_TOKENS and similar numeric environment variables so scientific-notation values are no longer silently reduced to their mantissa. Before the fix, setting CLAUDE_CODE_MAX_OUTPUT_TOKENS=1e6 resulted in 1 rather than 1,000,000.

The reference documents what the variable controls but does not tell users whether numeric values may use scientific notation, how those values are interpreted, or which other numeric environment variables share the behavior. Users configuring large token limits or millisecond values can therefore miss the version-dependent parsing behavior and misdiagnose unexpectedly small limits.

Suggested Improvement

Add a short “Numeric values” note to the environment-variable reference. Document that, as of v2.1.208, numeric environment variables accept scientific notation and are interpreted as numbers, with an example such as:

export CLAUDE_CODE_MAX_OUTPUT_TOKENS="1e6"  # 1,000,000 tokens

Clarify whether decimals, signs, whitespace, and values outside a variable’s allowed range are accepted or rejected. Identify the affected numeric variables, or link to a common parsing rule, so users know whether the same guidance applies to timeout and token-limit variables.

Impact

Medium - Makes feature difficult to understand

Additional Context

Affected Pages:

| Page | Section | Context |
|------|---------|---------|
| https://code.claude.com/docs/en/env-vars | Set environment variables | The setup examples show only decimal strings and do not explain numeric parsing |
| https://code.claude.com/docs/en/env-vars | Variables → CLAUDE_CODE_MAX_OUTPUT_TOKENS | The token-limit entry describes the setting but not accepted numeric formats |

Total scope: 1 page affected across 2 sections

The behavior change was released in v2.1.208. The documentation should distinguish the parsing fix from the variable’s model-dependent defaults and caps.

View original on GitHub ↗