[BUG] Tool-call results empty in live UI then flush late/out-of-order (Bash, Read, MCP, advisor) — macOS, Opus 4.8, parallel batches
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet (see related: #63797, #63859, #63538)
- [x] This is a single bug report
- [x] Reproduced on 2.1.158 (
claude --version, 2026-05-30)
What's Wrong?
Claude Code intermittently shows empty or missing tool output in the live session for Bash, Read, MCP tools, ToolSearch, and advisor — even though:
- The command ran (exit 0, files written, side effects on disk/network).
- The JSONL transcript eventually contains a full
tool_resultfor most calls (after delay). - Held results often flush several tool-calls later, out of order — a backlog of “empty” calls arrives in one batch after later
echoprobes or unrelated tools.
UI / model: empty tool panel, (No content), or once literal "start..."; model retries or fabricates when parallel batches appear empty (#63538). During bad stretches, Read of multi-KB /tmp files is empty in-session while wc -c shows the file is populated — payload delivery failure, not execution failure.
JSONL forensics (background subagent a5375c57101b89d34, session ab652a80, CC 2.1.158):
- 88/88
tool_use↔tool_resultpaired — 0 orphantool_useblocks. - No literal
"Tool result missing due to internal error"in JSONL (may be UI-only per #46767). - Exception:
server_tool_useadvisor— 1 use, notool_resultin 187 lines.
Hooks: same PreToolUse stack worked before; observability curl already uses > /dev/null 2>&1 &. Not filed as broken user hook scripts — possible harness regression under parallel load (#54128 family).
What Should Happen?
Each tool delivers its full payload to the model in the turn it completes, in order, once. UI matches model input. Parallel batches return all results or fail cleanly — no silent subset or delayed stale replay.
Error Messages / Logs
- UI: empty output; occasionally “Tool result missing due to internal error” (not always in JSONL).
- MCP:
mcp__claude_ai_jina__search_web→Unauthorized(same session). - Disk proof despite empty tools:
/tmp/gh-detail-1.txt18123 B,gh-research-1.txt3467 B, etc. /private/tmp/claude-502only 32K — #51814 unlikely on this host.
Session artifacts (can provide gzip on request):
~/.claude/projects/-Users-Martin-Tresors-Projects-GenesisTools/ab652a80-e33f-48c7-9c5a-3f9863180455.jsonl…/subagents/agent-a5375c57101b89d34.jsonl(629352 bytes, 187 lines)
Steps to Reproduce
- macOS 26.x, zsh, CC 2.1.154–2.1.158,
claude-opus-4-8, Anthropic API. ENABLE_TOOL_SEARCH=true, experimental agent teams,CLAUDE_CODE_NO_FLICKER=1.- Multiple MCP servers (some flaky).
- Fire 10–30 parallel
Bash/Read/ MCP calls (e.g.gh search/gh issue view→/tmp). - Observe: first N empty in UI;
echo PROBEmay flush backlog;Readempty while file on disk is correct. - JSONL: large gap between
tool_useand matchingtool_result(e.g. 15 intervening tool uses for oneRead).
Workaround: cmd > /tmp/x 2>&1, then Read + retry; small echo to unstick queue.
Environment
| | |
|---|---|
| Model | Opus (claude-opus-4-8) |
| Regression | Yes — worked before; past ~24–48h on macOS |
| CC version | 2.1.158 (also 2.1.154 at session start) |
| Platform | Anthropic API |
| OS | macOS darwin 25.3.0 |
| Terminal | Claude Code CLI |
| Shell | zsh |
Related: #63797 #63859 #63538 #46767 #51814 #39830 #42290 #38201
Additional Information
Delayed Read example: Read /tmp/gh-research-1.txt at 13:30:00Z → tool_result 18s later with 3487 B, after 15 other tool uses.
Out-of-order flush: echo probes P1–P4 dispatched together; results returned P1, P3, P4, P2.
Full write-up with transcript excerpts in issue body above; happy to attach a5375c57101b89d34.output if useful.
This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗