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:

  1. Use Claude Code with extended thinking enabled (e.g. claude-opus-4-8 via a LiteLLM proxy)
  2. Send a prompt that causes the thinking block to consume the entire max_tokens budget
  3. Observe: no output is shown; the session silently returns to the prompt

What the debug log shows:

  • HTTP 200 response
  • stop_reason: max_tokens
  • content: [ [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

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗