[DOCS] Environment variables page has outdated max output token limits

Resolved 💬 2 comments Opened Mar 17, 2026 by coygeek Closed Mar 18, 2026

Documentation Type

Incorrect/outdated documentation

Documentation Location

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

Section/Topic

CLAUDE_CODE_MAX_OUTPUT_TOKENS

Current Documentation

The docs currently say:

CLAUDE_CODE_MAX_OUTPUT_TOKENS | Set the maximum number of output tokens for most requests. Default: 32,000. Maximum: 64,000. Increasing this value reduces the effective context window available before auto-compaction triggers.

What's Wrong or Missing?

Claude Code v2.1.77 increased the default maximum output token limit for Claude Opus 4.6 to 64k tokens and raised the upper bound for Opus 4.6 and Sonnet 4.6 to 128k tokens.

The env var reference still advertises a 32,000 default and 64,000 maximum, so users get outdated guidance about response length and the context-window tradeoff from higher output limits.

Suggested Improvement

Update the CLAUDE_CODE_MAX_OUTPUT_TOKENS row to reflect the new model-specific limits.

Suggested coverage:

  • default behavior on Opus 4.6
  • maximum supported value on Opus 4.6 and Sonnet 4.6
  • whether other models still use different limits
  • the existing note that higher output limits reduce the effective context window before compaction

Impact

Medium - Makes feature difficult to understand

Additional Context

Affected Pages:

| Page | Context |
|------|---------|
| https://code.claude.com/docs/en/env-vars | CLAUDE_CODE_MAX_OUTPUT_TOKENS reference still says default 32,000 and maximum 64,000 |

Total scope: 1 page affected

Source: Claude Code v2.1.77 release notes

Exact release entry:

Increased default maximum output token limits for Claude Opus 4.6 to 64k tokens, and the upper bound for Opus 4.6 and Sonnet 4.6 models to 128k tokens

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗