[BUG] API returns thinking-only response with no text block — tokens consumed but response lost
Resolved 💬 4 comments Opened Apr 19, 2026 by laplaque Closed May 28, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
After a subagent (search-specialist) returns results, the main assistant's relay response flashes briefly in the CLI then disappears. The JSONL session log records the assistant turn but it contains only an empty thinking block — no text block — despite output_tokens: 230 being consumed. The response is lost.
What Should Happen?
The assistant's text response should persist in the CLI and be written to the session JSONL with a text content block.
Error Messages/Logs
No error shown. The assistant turn in the JSONL has this structure:
{
"type": "assistant",
"message": {
"content": [{"type": "thinking", "thinking": "", "signature": "..."}],
"stop_reason": "end_turn",
"usage": {
"output_tokens": 230,
"server_tool_use": {"web_search_requests": 0, "web_fetch_requests": 0},
"speed": "standard",
"inference_geo": ""
}
}
}
Anomalous fields compared to every other assistant turn in the same session:
| Field | Normal turns (33 total) | Dropped turn |
|---|---|---|
| `context_management` | `{'applied_edits': []}` | **missing entirely** |
| `usage.server_tool_use` | absent | `{'web_search_requests': 0, 'web_fetch_requests': 0}` |
| `usage.speed` | absent | `"standard"` |
| `usage.inference_geo` | `"not_available"` | `""` (empty string) |
All other assistant turns in the session have consistent structure. Only the dropped turn has these anomalies, suggesting a different server-side code path.
Steps to Reproduce
- Start a Claude Code session with Opus
- Use the Agent tool to launch a subagent (e.g. search-specialist) that returns a substantial result (~800 words)
- When the agent result comes back, observe the assistant's relay response
- The response text flashes briefly then disappears
- Check the session JSONL — the assistant turn has only a
thinkingblock, notextblock
Not reliably reproducible on demand — intermittent.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.101 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
- This is distinct from the client-side persistence bugs (#47657, #50594 ) where no assistant JSONL entry is written at all. Here the entry exists but is structurally incomplete.
- The
server_tool_use,speed, and emptyinference_geofields are not present on any other turn in the session, indicating the response was routed through a different server-side path. - 230 output tokens were consumed but only an empty thinking block was persisted — the text content was generated (user saw it flash) but not included in the final response object.
- No reprimand, profanity, or ethics trigger involved — this was a normal agent result relay.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗