Parallel Task agents intermittently lose output content
---
Description
When launching multiple Task agents in parallel, some agents intermittently return only their agentId without any output content. The TaskOutput tool also fails to retrieve results for these agents, reporting "No task found with ID".
Environment
- Claude Code version: 2.0.69
- OS: macOS (Darwin 24.6.0)
- Model: claude-opus-4-5-20251101
Steps to Reproduce
- Launch 3+ Task agents in parallel using a single message with multiple Task tool calls:
Task 1: { prompt: "Test 1: Respond with 'Parallel test 1 complete'", subagent_type: "researcher", model: "haiku" }
Task 2: { prompt: "Test 2: Respond with 'Parallel test 2 complete'", subagent_type: "researcher", model: "haiku" }
Task 3: { prompt: "Test 3: Respond with 'Parallel test 3 complete'", subagent_type: "researcher", model: "haiku" }
- Observe that some agents return output while others only return agentId
- Attempt to retrieve missing outputs using TaskOutput with the returned agentIds
Expected Behavior
All parallel Task agents should return their complete output content along with their agentId.
Actual Behavior
Intermittent results when running 3 parallel agents:
| Agent | Result |
|-------|--------|
| Agent 1 | Partial/garbled output |
| Agent 2 | Only agentId returned - NO content |
| Agent 3 | Correct output |
TaskOutput retrieval also fails:
TaskOutput { task_id: "a63b616" }
→ Error: No task found with ID: a63b616
Additional Context
- Issue appears to be a race condition when multiple agents complete around the same time
- Single agents work reliably
- Two parallel agents seem more stable than 3-4
- The issue is intermittent - sometimes all agents return correctly, sometimes 1-2 lose their output
- When output is lost, the agentId is still returned but cannot be used to retrieve results
- Tested with both
researcherandgeneral-purposesubagent types
Workarounds
- Run agents sequentially instead of in parallel
- Fall back to direct tool use (WebSearch/WebFetch) when agent output is missing
- Limit parallel agents to 2 at a time
Impact
This affects workflows that benefit from parallel research/investigation tasks, forcing users to either accept intermittent failures or sacrifice the performance benefits of parallelization.
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗