Skip to content

fix(subagents): delivered children stay pending while siblings run - #176701

Merged
roboclaw-bot merged 4 commits into
mainfrom
openclaw/ember-langoustine
Oct 19, 2026
Merged

roboclaw-bot merged 4 commits into
mainfrom
openclaw/ember-langoustine

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #166267

What Problem This Solves

Fixes: an already-delivered child remains listed as pending while an unrelated sibling keeps running.

User Impact

Busy requesters retire redundant single-child wakes without waiting for every worker to stop. Actual grouped and yielded continuations, unresolved deliveries, and their existing retry and source-custody protections remain owned. No configuration, schema, retention-policy, or operator data edits are required.

Why This Change Was Made

The existing no-continuation decision ran after descendant waiting. Move that decision before the wait and use the existing generation-aware lifecycle completion operation. This fixes the owner rather than hiding results in the renderer or expiring legitimate continuations. Recovery evaluates restored markers through the same owner.

Update affected integration fixtures to represent real completion debt and grouped work: required pending delivery for the liveness check; receipt holds installed only for the yielded cohort they exercise; released source bindings for consumed singletons; and two pending wave members before testing shared-slot rearm. The existing delivery, fault-injection, publication, and rearm assertions remain intact. Separately delivered non-yield singletons no longer produce a redundant aggregate turn.

The production change remains +5/-4 lines with no new state, timers, or policy helpers. The test setup reuses its existing visible-child fixture.

Thanks to @assimetria-ai for the report and @Oldrich333 for clarifying why delivered grouped results can still owe a continuation.

Contributors: @Marvinthebored and @shakkernerd.

Work sessions

Evidence

  • The new delivered-singleton regression failed on the original production source while its preservation controls passed. On the integrated candidate, 87 focused tests across six files passed, including private/yielded continuations, failed/suspended deliveries, liveness, runtime context, and lifecycle retries (121.27 seconds including shared preparation).
  • All 33 requester-wake E2E cases passed after repairing the affected fixtures (59.06 seconds Vitest, 65.98 seconds wrapper). This suite exercises real SQLite publication, queued receipt drift, failed writes, source release, restart/activation, and shared-scheduler rearm; those boundaries require more than a helper-only test. The final fixture simplification also passed a targeted rearm rerun (35.78 seconds Vitest, 42.71 seconds wrapper). Exact-head CI run 39335212550 passed, including all seven changed-node lanes and the required CI gate; per-file CI timing has not been aggregated here.
  • Targeted repository lint, core typecheck, formatting, prepared-base mock-export ratchet, and git diff whitespace checks passed. Independent Auto Review (GPT-6.1 Sol, P0–P2) identified the waiting-wave fixture issue; it was repaired and the follow-up assessment found no actionable findings. Reviews were static, not test execution.
  • Prior production-flow proof used an isolated real Gateway and scripted OpenAI-compatible model: actual parent tools spawned a long-running child and a short private-completion child; after delivery, SQLite retained the result without its wake, the long sibling still ran, and the next parent model request omitted the pending short-result row. This ran on the original production repair before the upstream integration, not the later integrated head. No live external provider or cold-process Gateway restart is claimed.

CI repair

The initial ready-head run 39182121588 failed on stale liveness/receipt fixture assumptions and an unrelated root-help mock-export ratchet. Main was integrated at afa7fcc specifically to consume the upstream mock-export repair. The liveness, receipt, and rearm failures were reproduced and fixed without longer test timeouts, skipped cases, weakened fault assertions, or baseline exceptions. A workspace synchronization interruption preserved the pending repairs and was resolved before work resumed. The earlier cold product-probe timeout and interrupted runtime-build attempts are setup gaps, not passing tests. The repaired head f891f6f passed fresh required CI and applicable security checks. Exact-head ClawSweeper re-review reports no actionable findings and no before-merge items. The managed squash action has not merged the PR: GitHub continues to report mergeability as unknown, so the guarded action refused before dispatch. No waiver or merge is claimed here.

Related: #166270 is renderer-only; this repair removes redundant lifecycle obligations instead.

Worked on by

Worked on by:
- @Marvinthebored

Co-authored-by: Marvinthebored <[email protected]>
OpenClaw-Publication: 222b951f-96dd-43af-b40b-f85c05d6fbe0
@clawsweeper

clawsweeper Bot commented Oct 19, 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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation agents Agent runtime and tooling size: S labels Oct 19, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review October 19, 2026 00:44
@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. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed 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 19, 2026
@clawsweeper

clawsweeper Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Retire redundant requester wakes for already-delivered single children before waiting for running descendants.

Example: Child A remains running after child B delivers its result without an explicit yield.

  • Before: B retains its pending requester wake and appears in later parent turns.
  • After: B’s redundant wake retires while A continues running.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, source-supported lifecycle fix with the prior finding resolved; inspectable evidence is strongest at the integration-harness boundary.
Proof confidence 🦐 gold shrimp (3/6) This collaborator-authored PR is outside the ordinary contributor-proof gate; its body reports an isolated Gateway with a scripted model showing singleton retirement behind a running sibling on the unchanged production repair, supported by post-integration registry tests, but supplies no inspectable runtime artifact.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Already-delivered child results remain pending in subsequent parent turns while other children keep running.
Reason: The maintainer-authored direction restores the original no-wake contract for delivered singletons using the existing lifecycle owner.

Merge readiness

✅ Ready for maintainer review

This PR addresses a current lifecycle bug with a small change to the existing owner; the previous liveness-fixture finding is fixed, and no actionable introduced defect remains.

Priority: P2
Reviewed head: f891f6f10762c924a1f8f343a420e8834ff9509b

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The reported Gateway scenario lacks an inspectable runtime trace, and no cold-process recovery run is supplied.
Agent review details

How this fits together

The subagent settlement owner reads completed child waves and descendant activity, then either retires their durable wake markers or submits an owed continuation to the requester’s session controller.

flowchart TD
  A[Child completion] --> B[Registry lifecycle]
  B --> C[Requester settlement owner]
  C --> D[Continuation obligation decision]
  D --> E[Retire redundant wake]
  D --> F[Wait for descendants]
  F --> G[Requester session controller]
Loading

Technical review

Best possible solution:

Use the existing lifecycle retirement operation before descendant waiting whenever the selected wave owes no requester continuation.

Do we have a high-confidence way to reproduce the issue?

Current-main ordering establishes the reported trigger: a running descendant prevents the delivered-singleton retirement branch from executing; no target code was run during this read-only review.

Is this the best way to solve the issue?

This is the smallest complete owner-level repair for redundant singleton wakes, preserving legitimate grouped and yielded continuation obligations rather than hiding their markers in presentation.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 18b9c7605ecf.

Provenance checked

  • Delivered-singleton no-continuation policy keeps the original intent (eb4f3d7: Wake top-level requesters after parallel work drains, with single already-delivered completions explicitly excluded from additional wakes.)
  • Event-driven descendant waiting keeps the original intent (4881c9b: Replace repeated settlement polling with completion events while preserving owed continuations and bounded terminal-delivery waiting.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source +1, Tests +71, Docs +4. Total +76 across 6 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 5 4 +1
Tests 4 97 26 +71
Docs 1 4 0 +4
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 106 30 +76

Root-cause cluster

Relationship: same_root_cause
Canonical: #166267
Summary: This PR repairs the lifecycle cause tracked by the canonical report; the renderer proposal addresses only presentation.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: Busy subagent requesters retain stale completion obligations and repeatedly expose already-delivered results, without an established core-runtime outage.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Attach a sanitized trace from the reported Gateway scenario showing the short child’s retained result, retired wake, running sibling, and subsequent parent context.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-19T01:00:58.757Z sha feeeb7a :: needs changes before merge. :: [P2] Update the liveness fixture to carry a real continuation obligation

Reviewed October 19, 2026, 6:33 PM ET / 22:33 UTC (Revision 2).

roboclaw-bot and others added 3 commits October 19, 2026 01:16
Co-authored-by: Marvinthebored <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
Co-authored-by: Marvinthebored <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
Worked on by:
- @Marvinthebored
- @shakkernerd

Co-authored-by: Marvinthebored <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
OpenClaw-Publication: 77251556-e95c-4429-9954-d4f490717327
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@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. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. 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 19, 2026
@roboclaw-bot
roboclaw-bot merged commit 850fdaf into main Oct 19, 2026
146 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

1 participant