Repository navigation
fix(agents): preserve child handoffs after completed-task cleanup - #187270
Conversation
OpenClaw-Publication: e2d8ba55-8992-4b58-9dd8-a8668b00e786
|
🦞👀 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. |
|
Codex review: needs maintainer review before merge. What this changesThis PR preserves delivered child-result records while their exact live parent still needs them to settle its accepted work. Example: A parent receives RECEIPT-1, continues working for six minutes, then yields while awaiting three more child results.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it fixes a current child-handoff failure, and the previous import-cycle finding is resolved; no new actionable defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherSession tools register accepted child work in the subagent registry, which owns completion delivery, parent settlement, and eventual record cleanup. flowchart TD
A[Parent session] --> B[Sessions send]
B --> C[Subagent registry]
C --> D[Child completion]
D --> E[Parent settlement]
C --> F[Retention sweeper]
G[Live requester receipts] --> F
F --> C
Technical reviewBest possible solution: Keep the existing registry as the sole completion owner and retain only the delivered rows required by exact live requester receipts. Do we have a high-confidence way to reproduce the issue? Current-main source establishes the failure path: cleanup removes a delivered row after five minutes, then complete-batch settlement refuses its surviving receipt; the PR reports three intended base failures and passing head coverage, which this read-only review did not execute. Is this the best way to solve the issue? The repair addresses premature deletion at its existing owner, preserves fail-closed settlement, and uses in-process accounting metadata without introducing another store or changing completion permissions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 1032118cede1. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +78, Tests +563. Total +641 across 10 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 29, 2026, 1:51 AM ET / 05:51 UTC (Revision 2). |
OpenClaw-Publication: 77499449-ffa3-453f-b6d2-3bd0b44e2a36
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
What Problem This Solves
Fixes child-result handoffs failing when completed-task cleanup removes a delivered result still needed by the active parent task.
User Impact
Parents can finish collecting their child results after the cleanup interval, including a paused child resumed within the same task. No user action or configuration change is required.
Why This Change Was Made
Keep only the canonical delivered row needed by its exact live, accepting requester instance and matching task/child receipt. Preserve the existing accounting metadata during actual same-task paused resumption, while binding fresh completion permission—not retaining old permission.
Normal TTL cleanup resumes after the requester closes. Missing receipts still fail closed; no stored schema, configuration, or TTL setting changes.
Scope
This fixes the demonstrated live-instance retention and paused-resumption paths. It does not establish or fix the unproved historical compaction cause, general requester-claim changes, or delayed waiting-status callbacks.
Evidence