Background subagent's final report arrives empty (0 bytes) when 5+ background agents run concurrently
Environment
- Claude Code desktop app (Windows), auto-updated, as of 2026-07-14
- OS: Windows 11 Pro (10.0.26200)
- Session model: claude-fable-5 (subagents on opus/sonnet)
Bug description
When several background agents (spawned via the Agent tool with run_in_background) run concurrently — observed with 6–7 at once — the agents complete their work successfully (all files they were asked to write appear on disk, correct and complete), but the final report/transcript returned to the orchestrating session is EMPTY. The task output file is 0 bytes.
With 1–2 concurrent background agents the reports arrive normally, so this looks load-related (a race or dropped write in transcript/report persistence under concurrent completion), not an agent failure.
Steps to reproduce
- In one session, spawn 6–7 background agents at roughly the same time, each with a long task (several minutes, producing large text output and writing files).
- Wait for completion notifications.
- Check the returned reports / task output.
Expected
Each background agent's final message is delivered to the parent session.
Actual
Work is done (files on disk are fine, e.g. a 36 KB generated text was written perfectly), but the final report arrives empty / output file is 0 bytes. Reproduced in two separate sessions on different tasks.
Impact / workaround
No work is actually lost if agents are instructed to write results to files. Workarounds we use: (a) always have subagents persist results to a file instead of relying on the final message, (b) verify by reading the target files, (c) cap concurrent background agents at 3–4. Still, silent empty reports are confusing — the orchestrator can misread a successful run as a failure.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗