[BUG] slash comands conflits with MAX_THINKING_TOKENS environment
Resolved 💬 4 comments Opened Sep 15, 2025 by tjx666 Closed Jan 6, 2026
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?
After I set MAX_THINKING_TOKENS at ~/.claude/settings.json.
Then I run slash command which set model to claude-3-5-haiku-latest
Will cause api request failed:
<img width="1465" height="613" alt="Image" src="https://github.com/user-attachments/assets/0f429b55-7ae9-4b2d-8c37-1a1d49465d0c" />
What Should Happen?
No error
Error Messages/Logs
⎿ API Error: 400
{"type":"error","error":{"type":"invalid_request_error","message":"`max_tokens` must
be greater than `thinking.budget_tokens`. Please consult our documentation at
https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking#max-tokens-an
d-context-window-size"},"request_id":"req_011CT9vqErxMHDVi1AGMRNJd"}
Steps to Reproduce
- set "MAX_THINKING_TOKENS": "32000" to
~/.claude/settings.json - create a slash command and set model to
claude-3-5-haiku-latest - run the slash command
Claude Model
Other
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
1.0.113
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Cursor
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗