[BUG] CLAUDE_CODE_MAX_OUTPUT_TOKENS: Capped from 64000 to 32000 on v2.0.14
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
CLAUDE_CODE_MAX_OUTPUT_TOKENS was set to 64K to match Sonnet 4.5 output limit, but as soon as I go over 32K, I get:
<img width="808" height="24" alt="Image" src="https://github.com/user-attachments/assets/8854b025-59fd-4b8a-bc50-ffe9a7ac6eac" />
And when I run doctor, it actually shows that it is capping the env variable from the 64K set to 32K output token.
<img width="325" height="248" alt="Image" src="https://github.com/user-attachments/assets/1f8373a6-aeff-4bbd-8c37-4af25ffa4aad" />
While on Claude official docs it states 64K:
<img width="201" height="305" alt="Image" src="https://github.com/user-attachments/assets/3e72204c-c1cd-4d26-b2f9-2aa22c7de707" />
What Should Happen?
The value of the env variable should be set to 64K, not capped to 32K.
export CLAUDE_CODE_MAX_OUTPUT_TOKENS = 64000
Error Messages/Logs
Steps to Reproduce
Set the variable:
export CLAUDE_CODE_MAX_OUTPUT_TOKENS = 64000
Run /doctor on Claude Code:
/doctor
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.0.14
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗