[Bug]: Agents panel keeps a finished delegated child as Working when it was started before the parent's MCP session changed; stop and task_cancel don't clear it#32235
What happens
A delegated child that finished hours ago stays in the parent's Agents panel as Working, with its timer still counting (11h 16m when I noticed). Pressing the row's stop button does nothing. The row stays.
Agents panel showing Sol review #471 round 1 as Working for 11h 16m 18s, with a stop buttonThe child itself is done:
t3_thread_readon the child showsstatus: "completed",activeRunId: null.- Its single run reports
completed,completedAt: 12:06Z, about 2.5 minutes after it started. - The parent read its final verdict and acted on it.
How it got there
- A Claude Code parent thread called
delegate_task(Codex child,isolation: "worktree"). The returned ids carried the parent's MCP command namespace at the time:node:delegated-task:command%3Amcp%3Ae607eb0f-…%3Adelegate-task%3A69f75109-…. - The parent's context was compacted (
/compact), and the parent's later tool calls came from a new MCP command namespace (…mcp%3Ad05dd328-…). - The child finished. No completion wake reached the parent.
- From the new session,
task_statuswith the original task id (bare uuid,delegate-task:<uuid>) returnstask_not_found: Delegated task … does not belong to thread <parent>, although the child'sparentThreadIdis that same parent thread. task_cancelwith the fullnode:delegated-task:command%3Amcp%3Ae607eb0f-…id returnsstatus: "completed"and bumps the child'supdatedAt, but the Agents row stays Working.- Tapping the row's stop button in the iOS app doesn't remove it either.
The parent also showed "waiting on 1 subagent" for the rest of the session, while every other delegated task had finished and been delivered.
Expected
- A child's row settles when its run completes, whether or not the parent's MCP session that started it is still current.
- Task ids stay resolvable from the same parent thread after compaction or an MCP reconnect.
- Stop, or
task_cancelreturningcompleted, removes a stale Working row.
Impact
The panel says a Codex agent has been working for 11+ hours, so it looks like tokens are being spent. Nothing clears it.
Related
#30911 shows a similar symptom, with extra Working rows after a stopped child is resumed. This report is a different path: the child was never stopped or resumed, the parent's MCP session changed, and stop can't clear the row.
Environment
macOS host; Claude Code parent thread on Opus; Codex (GPT-6.1-Sol) child; viewed in the T3 iOS app; observed 2026-11-06.