[BUG] max_tokens: 64001 > 64000 error on Opus 4.5 - broken since v2.1.9
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?
With any prompt even if it's just a "Hi" i get this error showing in the screenshot, I went through all my files to check if i missed up with the max output tokens, i even try to hard code it to 64000, but looks like a bug happening by incremting the max token output by one always, I think this happened when i tried to prompt with "ultrathink" and saw a tip that ultrathink have no effect now etc .. finally i love you guys and all the excellence u deliver.
<img width="1484" height="185" alt="Image" src="https://github.com/user-attachments/assets/f0f4648e-2f22-4955-8937-1ea31f8d9fcc" />
What Should Happen?
Max token output controlled by the cli it self since it have a built in limit.
Error Messages/Logs
Steps to Reproduce
With any prompt even if it's just a "Hi" i get this error showing in the screenshot, I went through all my files to check if i missed up with the max output tokens, i even try to hard code it to 64000, but looks like a bug happening by incremting the max token output by one always, I think this happened when i tried to prompt with "ultrathink" and saw a tip that ultrathink have no effect now etc .. finally i love you guys and all the excellence u deliver.
<img width="1484" height="185" alt="Image" src="https://github.com/user-attachments/assets/f0f4648e-2f22-4955-8937-1ea31f8d9fcc" />
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.9
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Warp
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗