Description
Area
apps/server
Summary
#17809 was closed on Oct 22 as not reproducible on main. It still happens on the v0.1.2 release (macOS desktop app, Claude CLI 2.1.310, claude-opus-5-5, Claude Agent provider).
Timeline (one thread, event log + provider log)
Four background Agent calls (run_in_background: true, spawn_depth: 1) were all launched inside run 1 (07:56:52Z to 08:00:50Z). For one of them, native id a2eda89e0e1e87a18:
task_startedat 07:59:22.379Z, in run 1. The firstsubagent.updated runningwas written at 07:59:22.415Z.- Run 1 ends with its
resultat 08:00:50Z. - Run 13 is a wake continuation, started at 08:54:25Z for another task's
task_notification. - During run 13, at 09:05:24.220Z, the SDK sends
task_notification {status: "completed"}fora2eda89e0e1e87a18, with its final summary. Notask_startedfor this task appears after run 1. - The row never goes terminal. Another
subagent.updatedwithstatus: runningwas written at 22:21:29Z, 13 hours after the completion. Server shutdown recovery at 01:21:55Z the next day finally cancelled it.
All four behaved the same way. Five more background subagents in three other threads on the same machine and day did too. They had all finished: each one's own transcript ends in a final end_turn answer or a user interrupt.
Background agents whose final notification was preceded by a fresh task_started (interim completions, SendMessage resumes) settled correctly.
Workarounds tried
subagent.stopon a stuck row is a no-op. The row stays running.thread.stopon the idle parent thread ends the stuck rows (as cancelled) and leaves the thread usable. We run that from a watcher as a stopgap.
Related
- Claude wake latch: a wake queued behind a held run swallows later wakes, so idle-launched subagents stay Running #22033 / PR fix(server): settle late-discovered Claude subagents #22049: subagents launched while the root is idle. That is a different path; these were launched inside an active run.
- [Bug]: Claude background subagent completion is overwritten by a late 'running' update, and Stop/cancel can't settle it #22279: a late
runningoverwrite, possibly what wrote the 22:21Z update. - [Bug]: Nested Claude subagent stays Running after the SDK reports it completed during a user turn #16355: nested subagents. We hit that too, separately.
Provider-log lifecycle frames for the thread are available on request.
Activity
juliusmarminge commentedon Oct 24, 2026
Tested 3cc31ed27c in the Linux web dev app with Claude CLI 2.1.310 and
claude-opus-5-5. Two native background agents launched during run 8. The first completion started wake run 9; the second completed while that wake was active, without anothertask_started, and its persisted row immediately became Completed. Lifecycle transcript.Please attach the redacted provider lifecycle frames you offered, from the original
task_startedthrough the completion during run 13, including interveningtask_progress,task_updated,task_notification, and rootresultframes, plus the correspondingsubagent.updatedevents. Those will let us compare the failing sequence with this successful overlap. Omit prompts, summaries, credentials, and unrelated transcript content.github-actions commentedon Nov 1, 2026
Closing: no reply in 7 days after we asked for more information. Comment with the missing details and we will reopen.