⌨️MAX_THINKING_TOKENS
Also known as MAX_THINKING_TOKENS=0
It sets how many tokens Claude may spend thinking.
Think of it like
It is like you give a child a few minutes to think. Then they must speak.
Example
Lucy runs an older model through a gateway and wants short, cheap answers. She sets a small thinking budget, and replies come back faster.
Why it matters
Thinking costs tokens and time. A fixed budget keeps both in check on models that use one.
Definition
Example code
bash
export MAX_THINKING_TOKENS=8000
claudeCommon mistake
Key takeaways
- 1Fixed budget. Tokens to think.
- 2At least 1,024. Below the output cap.
- 30 turns it off. Where allowed.