Skip to content

fix(agents): resume private completion turns after restart - #184145

Merged
steipete merged 1 commit into
mainfrom
steipete/perf-micro-subagent-settle-replay-test-20260919
Oct 26, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/perf-micro-subagent-settle-replay-test-20260919

Conversation

@steipete

@steipete steipete commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes private subagent completion turns remaining stuck after a Gateway restart. The original input retained its restart-cancellation receipt, but the resumed command never ran.

User Impact

An interrupted private completion resumes under its existing owner and records its successful processing receipt. Completed private results still reconcile without replay; public recovery, replaced-parent rejection, and source authority checks remain intact.

Why This Change Was Made

Regression introduced by #184041 (e356196d560488471261da982530396e382cb21d): expanding terminal-receipt reconciliation to private completions also classified their own pending recovery claim as another owner's queued work. That prevented the private registry from executing the input that would finish the claim.

Both receipt checks now consult the existing private recovery owner before treating a pending claim as competing work. Production LOC: +24 net (30 added, 6 removed). The shared check is needed at both receipt lookups so original private ownership is distinguished from competing recovery without removing terminal-result reconciliation. No new state, export, cache, or configuration is added.

The Gateway harness now waits for committed settlement of both batch members through registry publication, then retains its exact receipt, command-count, duplicate-replay, and authority assertions. It no longer polls or races batch settlement.

Evidence

  • Adjacent-revision reproduction under Bun: 464e3de2d953 passes; its immediate successor e356196d5604 fails with cancelled instead of completed. Current-main reproduction also fails (22 sibling cases pass).
  • Current-main Node reproduction: the same cancelled receipt; both preceding tombstone recovery cases pass.
  • Bun focused proof: all 23 Gateway replay cases and all 43 direct-delivery cases pass (66 total).
  • Node final proof: all 23 Gateway replay cases pass, including private recovery and parent replacement (144.64 seconds including wrapper).
  • Exact-head PR CI: Bun runtime-state hosted shard 3 passed all 23 replay cases in 90.22 seconds; direct-delivery coverage passed all 43 cases.
  • Changed-file formatting and lint passed; pnpm tsgo:core passed.
  • Independent subagent review (autoreview route unavailable): no remaining actionable P0/P1/P2 findings after fixing cancellation cleanup of the test observer.

The Gateway proof uses isolated synthetic state and mocked agent execution. This is a correctness repair, with no performance claim or live service changes.

Keep terminal receipt reconciliation while allowing the original private recovery owner to execute its pending input. Fix the self-wait introduced by #184041 and await batch settlement deterministically in the Gateway regression harness.
@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review October 26, 2026 03:14
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime agents Agent runtime and tooling size: S labels Oct 26, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-26T03:14:36.433718Z f35f666 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 26, 2026
@steipete
steipete merged commit 419616f into main Oct 26, 2026
210 of 214 checks passed
@steipete
steipete deleted the steipete/perf-micro-subagent-settle-replay-test-20260919 branch October 26, 2026 03:39
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 26, 2026
…184145)

Keep terminal receipt reconciliation while allowing the original private recovery owner to execute its pending input. Fix the self-wait introduced by openclaw#184041 and await batch settlement deterministically in the Gateway regression harness.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. docs Improvements or additions to documentation gateway Gateway runtime size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant