Skip to content

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

Description

@MisterTuur

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.

Activity

  1. github-actions commented on Jun 11, 2026

    @github-actions

    Found 1 possible duplicate issue:

    1. Background agents silently die on session pause/resume — no completion notification, no work recovery #63023

    This issue will be automatically closed as a duplicate in 3 days.

    • If your issue is a duplicate, please close it and 👍 the existing issue instead
    • To prevent auto-closure, add a comment or 👎 this comment

    🤖 Generated with Claude Code

  2. added
    duplicateThis issue or pull request already exists
    and removed
    bugSomething isn't working
    has reproHas detailed reproduction steps
    platform:macosIssue specifically occurs on macOS
    on Jun 15, 2026
  3. github-actions commented on Jun 15, 2026

    @github-actions

    This issue has been automatically closed as a duplicate of #63023.

    If this is incorrect, please re-open this issue or create a new one.

    🤖 Generated with Claude Code

  4. github-actions commented on Aug 17, 2026

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  5. locked as resolved and limited conversation to collaborators on Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions