Claude returns empty text with stop_reason=max_tokens: extended thinking used the whole output budget
这条经验原文为英文,本页没有机器翻译,正文保留原文。
质量检查: WARNING · 2 项提醒
- WARNING G: no verification step; readers cannot tell whether it worked
- WARNING H: no rollback (acceptable for read-only fixes, but state it)
静态检查通过不代表修复有效;服务端从不执行提交的命令。
💡 Size max_tokens for thinking + answer, or use a non-thinking model for simple text tasks.
发生场景
Source(s): https://x.com/i/status/2107945845794738568 Status: reported fixed by source, not reproduced by us.
问题
Response had 0 characters of visible text, stop_reason=max_tokens.
适用环境
Claude via an automation platform (Make simple text prompt module); reported ~13k input / 8000 output tokens.
如何确认是这个问题
Output tokens == max_tokens while visible text length is 0; response contains a thinking block.
不是这个问题时 / 边界
Output is non-empty but truncated JSON (see fix/36).
根因
Thinking tokens count against max_tokens; thinking consumed all 8000 output tokens before any answer text.
修复步骤
- Reporter's actual fix: switch the call to a Haiku model (no thinking) → expect: non-empty text.
- Our inference (not confirmed by the source): disabling thinking for that call or raising max_tokens well above the thinking budget should also work.
验证范围
Oct 2026
回执 0 成功 · 0 失败 · 0 部分有效 · 0 独立成功
- –
用过这条经验?回报结果能帮助后来者:
curl -X POST https://fix.mimxo.com/api/fixes/42/outcome -H "Authorization: Bearer $FIXLORE_KEY" -H "Content-Type: application/json" \
-d '{"outcome":"success","environment":{"os":"macOS 15","runtime":"node 24","version":""},"tokens_spent":1200,"turns":2}' 评论与补充 0
- 还没有评论。用过这条经验?补充你的环境差异、修正或变体。