Repository navigation
fix(subagents): hand quiet interrupted children to revisionless requesters - #175278
Merged
Merged
Conversation
…sters The #169144 backport converts a non-announcing child interrupted by a Gateway restart into a private parent continuation only when the captured requester has both a session id and a lifecycle revision. Sessions created implicitly by the `agent` RPC (and other paths that never patch a new session) carry no lifecycle revision, so the orphan settled terminal with no completionTarget or requester settle wake and the parent never received the "Reconcile every listed unfinished child" turn. Every downstream requester identity check already compares the captured revision by equality (absent matches absent, and a reset assigns a new revision), and private spawn only requires a requester session id. Apply the same requirement here. The native live subagent restart proof starts its parents through `agent`, which is why its parent-handoff assertion timed out; the crash-loop breaker only delayed settlement. A quiet-child e2e twin started via `agent` failed with and without the breaker before this change and receives the parent reconcile turn within a second of settlement after it.
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
RomneyDa
added a commit
that referenced
this pull request
Oct 17, 2026
…sters (#175278) The #169144 backport converts a non-announcing child interrupted by a Gateway restart into a private parent continuation only when the captured requester has both a session id and a lifecycle revision. Sessions created implicitly by the `agent` RPC (and other paths that never patch a new session) carry no lifecycle revision, so the orphan settled terminal with no completionTarget or requester settle wake and the parent never received the "Reconcile every listed unfinished child" turn. Every downstream requester identity check already compares the captured revision by equality (absent matches absent, and a reset assigns a new revision), and private spawn only requires a requester session id. Apply the same requirement here. The native live subagent restart proof starts its parents through `agent`, which is why its parent-handoff assertion timed out; the crash-loop breaker only delayed settlement. A quiet-child e2e twin started via `agent` failed with and without the breaker before this change and receives the parent reconcile turn within a second of settlement after it. (cherry picked from commit 8d4591a)
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 18, 2026
…sters (openclaw#175278) The openclaw#169144 backport converts a non-announcing child interrupted by a Gateway restart into a private parent continuation only when the captured requester has both a session id and a lifecycle revision. Sessions created implicitly by the `agent` RPC (and other paths that never patch a new session) carry no lifecycle revision, so the orphan settled terminal with no completionTarget or requester settle wake and the parent never received the "Reconcile every listed unfinished child" turn. Every downstream requester identity check already compares the captured revision by equality (absent matches absent, and a reset assigns a new revision), and private spawn only requires a requester session id. Apply the same requirement here. The native live subagent restart proof starts its parents through `agent`, which is why its parent-handoff assertion timed out; the crash-loop breaker only delayed settlement. A quiet-child e2e twin started via `agent` failed with and without the breaker before this change and receives the parent reconcile turn within a second of settlement after it.
wheakerd
pushed a commit
to wheakerd/clawdbot
that referenced
this pull request
Oct 22, 2026
Co-authored-by: RomneyDa <[email protected]>
RomneyDa
added a commit
that referenced
this pull request
Oct 27, 2026
…sters (#175278) The #169144 backport converts a non-announcing child interrupted by a Gateway restart into a private parent continuation only when the captured requester has both a session id and a lifecycle revision. Sessions created implicitly by the `agent` RPC (and other paths that never patch a new session) carry no lifecycle revision, so the orphan settled terminal with no completionTarget or requester settle wake and the parent never received the "Reconcile every listed unfinished child" turn. Every downstream requester identity check already compares the captured revision by equality (absent matches absent, and a reset assigns a new revision), and private spawn only requires a requester session id. Apply the same requirement here. The native live subagent restart proof starts its parents through `agent`, which is why its parent-handoff assertion timed out; the crash-loop breaker only delayed settlement. A quiet-child e2e twin started via `agent` failed with and without the breaker before this change and receives the parent reconcile turn within a second of settlement after it. (cherry picked from commit 8d4591a)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
A non-announcing subagent (
expectsCompletionMessage: false) interrupted by a Gateway restart is marked interrupted, but its parent never gets the reconcile turn when the parent session has no lifecycle revision. Sessions created directly by theagentRPC (nosessions.create/chat.send) never receive one, so the child's work is silently dropped until a user asks. After three unclean restarts in five minutes the restart-loop breaker adds up to five minutes of delay before the same silent outcome.This fails
test/gateway-subagent-restart.live.test.ts(Native live test harnesses), a 2026.10.5 release blocker; main has the same gate and the same live assertion.Why This Change Was Made
The quiet-completion handoff required both
completionRequesterSessionIdandcompletionRequesterLifecycleRevision. Every later requester identity check compares the revision by equality, so an absent revision binds as absent, and a reset assigns a new revision, which still rejects a replaced requester. Private spawn already requires only a session id. Drop the revision requirement at this one gate.User Impact
Interrupted quiet subagents now hand their unfinished work back to the parent after restart recovery regardless of how the parent session was created. No change for sessions that already carry a lifecycle revision.
Evidence
Deterministic repro (scratch copy of the subagent-restart e2e twin with SIGKILL restarts):
chat.sendagentagentagentagentsubagent-registry-lifecycle.test.ts(requester with and without a revision); the revisionless case fails before the fix.pnpm test src/agents/subagents/registry/subagent-registry-lifecycle.test.ts --maxWorkers=1: 238 passed on main (243 on the release line, ~36s).