[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_
8 Comments
Found 2 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
On the bugs filed, there's nothing stating value capped on
/doctor, also that's an older version with a different model. Also the patching quick fix is completely different from the other bugs.I can reproduce this too. Using Sonnet 4.5, getting this message (CLAUDE_CODE_MAX_OUTPUT_TOKENS Capped from 64000 to 32000) when I set
Claude version 2.0.25
Version 2.0.29 - still there
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
Still here in Windows claude app Claude 1.0.2339 (1782e2) 2025-12-16T19:35:52.000Z
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.