Fix: Sub-Agent Timeout or Hang
Error Message:
"Sub-agent execution timed out" "Waiting for agent..." (forever) "Partial results received"
The Cause
You launched a complex task using parallel sub-agents (e.g., "Research these 10 companies"), but one or more agents got stuck. This can happen due to:
- Infinite Loops: The agent is stuck trying to solve an impossible sub-task.
- Rate Limiting: The API blocked too many simultaneous requests.
- Network Issues: A temporary drop in connectivity.
The Fix
1. Reduce Parallelism
If you spawned 10 agents, try 3.
- Instead of: "Research these 20 companies at once."
- Try: "Research the first 5 companies."
2. Set Explicit Timeouts
When giving the prompt, define a "time budget".
- Prompt: "Research this company. If you cannot find the answer within 3 steps, stop and report 'Not Found'. Do not keep searching forever."
Note: Sub-agents consume a minimum of ~12,000 tokens per tool call overhead. Spawning too many can hit your rate limits faster than expected, causing timeouts.
3. Check the "Agent Logs"
Power users can see what the sub-agents are doing.
- Open the Console/Logs panel in Cowork (usually
Cmd+Opt+L). - Look for the stuck agent ID.
- Is it looping? (e.g., repeatedly searching for the same term).
- If looping, kill the task and refine your prompt to be more specific.
4. Switch Models
Sometimes the faster models (Haiku) get confused on complex tasks.
- In your prompt, specify: "Use the Opus model for this sub-task" (if your plan allows).
Share this article