Background subagents (Agent tool) die silently on session pause/resume — no failure notification, no way to re-activate

Resolved 💬 2 comments Opened Jun 11, 2026 by MisterTuur Closed Jun 15, 2026

Environment

  • Claude Code 2.1.97 (desktop app session, macOS / Darwin 25.5.0)
  • Orchestrator session dispatching subagents via the Agent tool with run_in_background: true

What happened

An orchestrator session dispatched 4 background subagents (general-purpose, run_in_background: true). Each got a self-contained implementation brief; all four started fine (worktrees created, commits pushed, PRs opened, review polls running).

The user then interrupted the session mid-turn ("tool use rejected" + a pause) and resumed it ~5 hours later.

After resume, ground-truth checking (PR/branch/worktree footprints) showed 3 of the 4 subagents were dead:

  • two died mid-flight after pushing a fix commit — they were waiting on an external review-poll subprocess and never produced activity again;
  • one died before producing any output at all (no worktree, no branch, no PR);
  • the 4th had completed before the pause.

No <task-notification> with a failed/interrupted status was ever delivered for any of the three. The orchestrator (and the human) believed they were still running for hours — the absence of a completion notification is indistinguishable from "still working". The agents' JSONL transcripts under the session's tasks/ directory simply stop.

Expected behavior (any of these would help, in order of value)

  1. Death/interrupt notification: if a background subagent is killed by a session pause/interrupt (or dies for any reason), deliver a task-notification with status: failed/interrupted on resume — silence should always mean "running", never "dead".
  2. Resume/re-activate: the subagent transcripts exist on disk; an API to resume an interrupted subagent with its context intact (the way SendMessage continues a live agent) would make interruptions lossless instead of forcing a from-scratch re-dispatch.
  3. Liveness query: a way for the orchestrator to enumerate its background agents with an actual alive/dead status. (TaskList returns "No tasks found" for Agent-tool subagents.)

Workarounds we use now

  • Brief every subagent to commit+push after every self-contained unit (made the two mid-flight deaths lossless — the orchestrator took over their open PRs);
  • liveness via artifact footprints (branch/PR/worktree mtimes), never via notification-absence.

Impact

Multi-hour silent loss of parallel work per pause; orchestrator context wasted on re-dispatch; misleading "still running" state reported to the user until ground-truth checks are run.

View original on GitHub ↗

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