Task agent resume fails silently when transcript ends with API error
Resolved 💬 6 comments Opened Jan 8, 2026 by MarcinDudekDev Closed Feb 27, 2026
Bug: Task agent resume fails silently when transcript ends with API error
Summary
When a subagent's conversation ends with an API error (e.g., 400 due to tool use concurrency), attempting to resume that agent fails silently - returning 0 tool uses · 0 tokens · 1s with no error message.
Steps to Reproduce
- Spawn a subagent via
Task()tool - Let the agent work until it hits an API 400 error (e.g., "tool use concurrency issues")
- The agent returns to parent with error state
- Try to resume the agent with
Task(resume: "agent-id") - Result: Resume completes instantly with
0 tool uses · 0 tokens · 1s - Expected: Error message like "Cannot resume agent: transcript ended with error"
Evidence
Agent transcript (agent-aa2fcb9.jsonl) ends with:
{
"error": "invalid_request",
"isApiErrorMessage": true,
"content": [{"text": "API Error: 400 due to tool use concurrency issues. Run /rewind to recover the conversation."}]
}
Screenshot shows the silent failure:
● batman(Apply font edit fix) resuming aa2fcb9
└ Done (0 tool uses · 0 tokens · 1s)
● Agent resume failed. I'll apply the fix directly.
Environment
- Claude Code version: 2.1.0
- Model: claude-opus-4-5-20251101
- OS: macOS
Impact
- Users get no feedback about why resume failed
- Claude detects failure only by observing 0 tokens returned
- Makes debugging agent issues difficult
- Wastes user time trying to resume unrecoverable agents
Suggested Fix
When Task(resume: "id") is called:
- Check if transcript's last message has
"error"or"isApiErrorMessage": true - If so, return clear error: "Cannot resume agent {id}: transcript ended with API error: {error_message}"
- Optionally suggest: "Start a new agent or use /rewind"
Related
This may also affect the general "tool use concurrency" error handling - perhaps there should be automatic recovery instead of corrupting the transcript.
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗