Silent empty response when stop_reason: max_tokens with extended thinking and no text block
Open 💬 1 comment Opened Jun 16, 2026 by MonicaFinn
When extended thinking is enabled and the model's output token budget is exhausted entirely by the thinking block (leaving zero tokens for a text response), Claude Code renders nothing to the user — no response text, no error, no indication that anything happened. The session just returns to the prompt as if the request completed successfully.
Steps to reproduce:
- Use Claude Code with extended thinking enabled (e.g.
claude-opus-4-8via a LiteLLM proxy) - Send a prompt that causes the thinking block to consume the entire
max_tokensbudget - Observe: no output is shown; the session silently returns to the prompt
What the debug log shows:
- HTTP 200 response
stop_reason: max_tokenscontent: [ [Object] ]— a single content item (the thinking block), no text block
Expected behavior: Claude Code should detect the case where stop_reason: max_tokens and the content array contains no text-type blocks, and surface a message like:
"Response truncated: the thinking budget consumed all available output tokens."
Environment: Claude Code 2.1.139, claude-opus-4-8, extended thinking enabled
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗