claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] CLAUDE_CODE_MAX_OUTPUT_TOKENS: Capped from 64000 to 32000 on v2.0.14

Open LorenzoNava99 opened this issue 1 year ago • 8 comments

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:

Image

And when I run doctor, it actually shows that it is capping the env variable from the 64K set to 32K output token.

Image

While on Claude official docs it states 64K:

Image

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

LorenzoNava99 avatar Oct 11 '25 14:10 LorenzoNava99

Found 2 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/4510
  2. https://github.com/anthropics/claude-code/issues/4255

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

github-actions[bot] avatar Oct 11 '25 14:10 github-actions[bot]

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.

LorenzoNava99 avatar Oct 11 '25 14:10 LorenzoNava99

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

"env": {
    "CLAUDE_CODE_MAX_OUTPUT_TOKENS": "64000"
  }

Claude version 2.0.25

mariusatstarlims avatar Oct 23 '25 19:10 mariusatstarlims

Version 2.0.29 - still there

antonlvovych avatar Oct 30 '25 16:10 antonlvovych

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.

github-actions[bot] avatar Dec 10 '25 10:12 github-actions[bot]

Still here in Windows claude app Claude 1.0.2339 (1782e2) 2025-12-16T19:35:52.000Z

iamkingsleyf avatar Dec 29 '25 05:12 iamkingsleyf

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.

github-actions[bot] avatar Jan 29 '26 10:01 github-actions[bot]

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.

github-actions[bot] avatar Feb 06 '26 14:02 github-actions[bot]