[Bug] Multi-agent workflows terminate on transient server errors instead of retrying with backoff
Bug Description
Subject: Multi-agent workflows die on transient server-side errors instead of retrying — forcing token-costly manual re-runs
What happens: When a Claude Code workflow agent hits a server-side error — "500 Internal server error", "529 Overloaded", or "Server is temporarily limiting requests (not your usage limit) · Rate limited" — the agent terminates and can take the whole workflow run down with it. The partial work is discarded and the run must be relaunched manually, re-consuming tokens already spent on work that completed.
Observed in a single session (2026-06-23/24):
- One server-side rate-limit event killed two concurrent workflows at once — one after ~94k agent tokens, the other after ~278k — both returning zero usable output and requiring full re-launch (~372k tokens redone).
- A review workflow hit "529 Overloaded" and failed. Re-running via resume reused the cached build agents (good — so the partial work is recoverable), but the review re-ran.
- A main-loop "500 Internal server error" interrupted the session (recovered via --continue).
Suggested fix: Treat transient server-side errors (5xx / overload / server-side rate-limit — i.e. not the user's usage limit) as retryable inside the workflow — auto-retry the failing agent with backoff rather than terminating the run. The resume-with-cache mechanism already proves the completed agents are recoverable; making that retry automatic on transient server failures would eliminate the wasted tokens and the manual relaunches.
Frequency: Several times per day.
Environment Info
- Platform: darwin
- Terminal: Apple_Terminal
- Version: 2.1.183
- Feedback ID: fe491fd7-66cf-4cfc-95bc-8e972b962544
Errors
[{"error":"Error: 500 {\"type\":\"error\",\"error\":{\"type\":\"api_error\",\"message\":\"Internal server error\"},\"request_id\":\"req_011CcLLHygLxG7ZGPje9BEDR\"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:12:69182)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:52:7688)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-06-23T14:16:21.038Z"},{"error":"Error: 500 {\"type\":\"error\",\"error\":{\"type\":\"api_error\",\"message\":\"Internal server error\"},\"request_id\":\"req_011CcLLTCodbPpeR6R4hhaPW\"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:12:69182)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:52:7688)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-06-23T14:18:26.209Z"},{"error":"Error: 500 {\"type\":\"error\",\"error\":{\"type\":\"api_error\",\"message\":\"Internal server error\"},\"request_id\":\"req_011CcLLVRTgzvu92tp3EeLPw\"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:12:69182)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:52:7688)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-06-23T14:18:56.258Z"}]This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗