Background agents stay shown as "alive" after their work (and the whole session task) is done; main session has no accurate awareness of sub-agent/background-task state

Open 💬 0 comments Opened Jul 4, 2026 by afram123

Description

When the main agent spawns work in the background — background agents/sub-agents and run_in_background tasks — those agents keep showing as alive/active in the UI even after (a) their own work has finished and (b) the overall task for the entire session is complete. Nothing is actually running, but a still-"alive" agent strongly implies work is still in flight.

Compounding it: the main session has no accurate, live view of its own sub-agents / background tasks. When I see an agent still listed as active and ask the main agent about it, it says something like "oh, that's done — that's old." So the UI shows the agent as alive while the main agent believes it finished long ago. I'm left not knowing which signal to trust.

Current behavior

  • A background/sub-agent finishes its task but continues to appear alive/active in the agent view.
  • The session's overall task also completes, yet the agent is still shown as alive.
  • Asking the main agent yields "that's done/old" — it has no awareness that the sub-agent is still displayed as running, nor an accurate read of its lifecycle state.

Why this is confusing (impact)

  • I repeatedly think work is still happening when it isn't — so I wait, or hesitate to close the session.
  • The only way to check is to ask the main agent, which then contradicts the UI, eroding trust in both signals.
  • Across multiple sessions it becomes hard to tell what's genuinely still running.

Requested behavior

  • When a background/sub-agent reaches a terminal state, reflect that in the UI (mark it done/collapsed) instead of leaving it indistinguishable from active.
  • Give the main session accurate, live awareness of its sub-agents' and background tasks' status, so that when asked it can truthfully say which are running vs. finished — and ideally surface "all background work complete" when the session fully quiesces.
  • At minimum, visually distinguish "agent still running" from "agent finished but still listed."

Related

  • #73557 — terminal title should distinguish idle-with-background-work from truly idle (same underlying gap).
  • #59691 (closed) — run_in_background child lifecycle vs. session reaping.
  • #7479 (closed) — phantom bash-session notifications persisting after completion.

Environment

  • Claude Code desktop app, Windows 11.

View original on GitHub ↗