You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
core: restart drops the execution claim for a directly resumed child session #63414
When a user continues a child session directly after its subagent job has finished, a restart mid-execution silently drops that work. The child still has a durable execution claim at shutdown. At startup releaseChildClaims clears it because there is no running job, and the sweep only resumes top-level claims.
Create a parent and child in the core session-execution fixture. Call SessionExecution.resume(child) and hold the runner open.
Close the execution scope. The child's time_suspended is still set.
Build a fresh execution graph on the same database and run resumeSuspendedSessions. The child drains zero times, and its claim disappears. A claimed top-level session resumes in the same setup.
Expected: the child continues once, subject to the normal restart-attempt budget.
Not observed; this looks likely from reading the code.
Thanks. I confirmed this by reading the code on dev at 6b8c796, which is also the latest dev right now. I didn't run the fixture.
In packages/core/src/session/execution/restart.ts, resumeSuspendedSessions builds children only from pending background jobs that are running subagent jobs. It then calls store.releaseChildClaims(children).
In packages/core/src/session/store.ts, releaseChildClaims clears time_suspended and resume_attempts on every child (parent_id set) not in that list. A child resumed directly with SessionExecution.resume(child) after its job finished loses its claim there.
The resume loop only covers store.listSuspended(), which filters on isNull(SessionTable.parent_id). Children are otherwise started only through recoverable subagent jobs, so nothing picks the directly resumed child back up.
That matches what you describe: zero drains for the child and a vanished claim, while a claimed top-level session resumes in the same setup.
Activity
opencodejr commentedon Nov 11, 2026
Not observed; this looks likely from reading the code.
Thanks. I confirmed this by reading the code on
devat 6b8c796, which is also the latestdevright now. I didn't run the fixture.packages/core/src/session/execution/restart.ts,resumeSuspendedSessionsbuildschildrenonly from pending background jobs that arerunningsubagent jobs. It then callsstore.releaseChildClaims(children).packages/core/src/session/store.ts,releaseChildClaimsclearstime_suspendedandresume_attemptson every child (parent_idset) not in that list. A child resumed directly withSessionExecution.resume(child)after its job finished loses its claim there.store.listSuspended(), which filters onisNull(SessionTable.parent_id). Children are otherwise started only through recoverable subagent jobs, so nothing picks the directly resumed child back up.That matches what you describe: zero drains for the child and a vanished claim, while a claimed top-level session resumes in the same setup.