Repository navigation
fix(agents): resume channel and collector children after restart - #180227
Merged
steipete merged 1 commit intoOct 22, 2026
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
steipete
marked this pull request as ready for review
October 22, 2026 02:59
Contributor
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
steipete
deleted the
steipete/fix-detached-subagent-recovery-followup-20261022
branch
October 22, 2026 03:14
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 22, 2026
This was referenced Oct 24, 2026
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
Fixes detached channel-origin subagents and collector tasks remaining interrupted after a Gateway restart. Follow-up to #180090.
User Impact
Eligible children resume in their original session and retain their normal parent-completion or collector-result delivery. Session-scoped operators can resume their own child work. Explicit cancellation, replaced sessions, and revoked authority remain terminal.
This does not reconstruct deleted sessions or expired registry records. Previously settled work may need a fresh request in its retained parent or child session after checking for an existing follow-up. Collector retention is unchanged; no configuration or schema changes are required.
Why This Change Was Made
Recovery required an operator snapshot even for channel-origin children, and collector registration skipped capturing that snapshot entirely. The registry now restores channel requester identity from the child's existing exact-session private claim and captures the existing operator source for collectors. Recovery uses fresh admission with the host-owned exact-session binding, preserving the original result owner.
Startup timing counters sum overlapping requester groups; they can exceed activation wall time. This correctness fix makes no benchmark or startup-speed claim.
Evidence
The detached restart integration regression fails on the previous code: valid channel children and collectors never dispatch, and recovered operator requests lack the host session binding. It exercises persisted interruption, Gateway replacement, resumed registry custody, and late completion or collector settlement. Channel network delivery and a production deployment are outside this proof.
Validation: all 10 detached restart regression cases pass; changed-file formatting/lint and
pnpm tsgo:corepass. The isolated independent review found no actionable P0–P2 issues. Five focused neighboring files pass all 206 cases:subagent-registry.completion-authority.test.ts,subagent-registry-restart-recovery.test.ts,server.sessions.recover-in-place.test.ts,chat-send-subagent-custody.test.ts, andagent-tools.prefix-stability.test.ts. Broad validation is delegated to PR CI; no benchmark was needed.Production delta: +162 lines; test delta: +151 lines. The added code restores the existing channel requester contract with current parent/Gateway lifetime checks. It does not add a new recovery owner, persisted format, cache, or configuration option; collector launch now shares the existing source capture.