Background agent status stuck at "failed" after resume via SendMessage (tokens keep increasing)

Open 💬 1 comment Opened Jul 7, 2026 by dqdp

Environment: Claude Code desktop app (macOS, Darwin 24.6.0), main-loop model claude-fable-5, background subagents via the Agent tool.

Steps to reproduce:

  1. Launch a background subagent (Agent tool, default run_in_background).
  2. The agent dies mid-run with a transient API error: "Agent terminated early due to an API error: API Error: Server error mid-response" → a task-notification arrives with status: failed.
  3. Resume the same agent with SendMessage to its agentId (tool result confirms: "was stopped (failed); resumed it in the background").

Actual: The task/status chip in the UI keeps showing failed, while the resumed continuation is actively running — its token counter keeps growing. The status only updates on the next stop event.

Expected: On resume, the status should flip back to running (or a distinct "resumed" state), so a live agent is never displayed as failed.

Impact: Confusing ops signal — the user can't tell a dead agent from a resumed one without watching token counters.

🤖 Reported with Claude Code

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗