[BUG] Transient server errors MUST NOT kill subagents

Open 💬 3 comments Opened Jun 6, 2026 by sirati

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Currently if any server error happens, e.g. Overloaded, Rate limited (not your usage limit) or weekly limit etc will delete ALL subagents (that currently do not have a monitor running)

This is a massive problem because upon restarting the agent, they have to start from scratch, which wastes 200k-500k tokens.

In the case of Overloaded or Rate limited (not your usage limit) these are genuinely not the Users fault. The former is Anthropic's fault, the latter is Claude code being programmed badly and tripping its own backends rate limit during regular usage.

Wasting large token budgets on this is just unacceptable.

Further problem: these subagents are wrongfully shown to the main agent as "Completed" creating much confusion.

What Should Happen?

Subagents that get stopped due to a API or Network error are NOT completed. They must NOT be deleted from the list of subagents/tasks. Instead they should be PAUSED.

The user should have a hotkey to revive a subagent that got paused, this way no work is lost. The user should also get a hotkey to revive ALL subagents that are currently paused, importantly this should be done with a 10 second delay between each agent, as otherwise this will just cause another Rate limited (not your usage limit) error.

Further a paused agent should not be shown to the main agent as completed. Instead they should be shown as paused due to the error. The main agent should have their own function they can call in order to revive a paused subagent

In general the same applies for usage limits. Once the user has authorised extra usage, having to restart multiple subagents that each already worked for 500k tokens, does incur significant, and unfair cost.

Steps to Reproduce

requires Anthropic's to be overloaded, or a rate or usage limit to be reached while a subagent is active.

Claude Model

All models

Is this a regression?

No, this never worked

Claude Code Version

2.1.165 (Claude Code)

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

some linux terminal app e.g. gnome Console or Konsole

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗