⌨️CLAUDE_CODE_MAX_OUTPUT_TOKENS
Also known as CLAUDE_CODE_MAX_OUTPUT_TOKENS environment variable
It sets how many tokens Claude may write in one reply.
Think of it like
It is like a page limit. One answer can only fill so much.
Example
Jack's gateway model is not one Claude Code knows, so replies stop at 32,000 tokens. He raises this, and long files come out whole.
Why it matters
Too low and long work stops halfway. Too high and the chat fills up sooner.
Definition
Example code
bash
export CLAUDE_CODE_MAX_OUTPUT_TOKENS=64000
claudeCommon mistake
Key takeaways
- 1Per reply. Tokens Claude writes.
- 2Cut to the model's top. No error.
- 3Costs chat room. Compacts sooner.