Repository navigation
fix: finish yielded tasks and identify failed child sessions - #149261
Conversation
|
🦞👀 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. Reviewed September 15, 2026, 2:35 PM ET / 18:35 UTC (Revision 6). ClawSweeper reviewWhat this changesThe PR repairs nested task completion during yield, identifies failed child sessions in sidebar warnings, documents recovery, and stabilizes a Codex attribution test. Merge readiness✅ Ready for maintainer review This remains a useful, distinct repair absent from the fetched main revision. No actionable introduced defect was found, and the related merged fixes do not supersede it. Priority: P2 Review scores
Verification
How this fits togetherThe subagent registry carries delegated tasks across paused execution and asks the Gateway to admit their continuations. The Control UI projects session outcomes into sidebar warnings for users. flowchart TD
A[Child finishes] --> B[Requester yields]
B --> C[Persist pause and child batch]
C --> D[Gateway admits continuation]
D --> E[Original task completes]
F[Session outcomes] --> G[Sidebar attributes child failure]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +45, Tests +350, Docs +16. Total +411 across 21 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep one durable task across yield and continuation, preserve cancellation and original-requester delivery, and attribute inherited warnings through the existing sidebar projection. Do we have a high-confidence way to reproduce the issue? Yes: source and the focused Gateway regression establish the completed-child-before-yield-end ordering that misses paused-task adoption. This review inspected that path without executing it. Is this the best way to solve the issue? Yes: moving the existing pause operation into the batch's durable settlement fixes the ordering at its owner, while sidebar attribution remains a derived presentation fact. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d363685cab9f. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
8428bde to
61441c5
Compare
Adopt the test-only cleanup repair from #149274 and assert the canonical timeout result. Production deadlines and cleanup behavior are unchanged.
eb02a1d to
41ebfb3
Compare
|
Merged via squash.
|
…48988) * fix: keep environment inventory responsive during pairing cleanup * test: include pairing snapshot in isolated gateway expectations * fix: let profiler help drain pending cleanup * test: preserve process events in runtime identity fixtures * test: avoid loading QA runtime in receipt producers * fix: repair native PR repository identity fixtures (#149294) (cherry picked from commit 7dc8a1e) * fix: keep Codex model attribution fixture focused (#149301) (cherry picked from commit 273b6c5) * test: align canonical model attribution fixture Adopt the complete fixture from #149349 and #149261 so merging the inventory branch retains one terminal-list response. Preserve the controlled completion/timeout cases and the original runtime budget. * test: provide dependencies for PR alias fixtures Keep alias delegation cases on their intended supervisor boundary after code-only linked checkouts gained dependency materialization. Preserve exact arguments, exit status, and trust refusals; retain separate materializer coverage. * test: retire superseded PR alias fixture setup Canonical main already owns linked dependency setup before checkout. Remove the branch-local later setup so the merged fixture matches #149477 exactly, without changing the inventory or lifecycle implementation.
…w#149261) * fix: finish yielded tasks and attribute child failures * test(codex): control model attribution timeout and cleanup Adopt the test-only cleanup repair from openclaw#149274 and assert the canonical timeout result. Production deadlines and cleanup behavior are unchanged.
…enclaw#148988) * fix: keep environment inventory responsive during pairing cleanup * test: include pairing snapshot in isolated gateway expectations * fix: let profiler help drain pending cleanup * test: preserve process events in runtime identity fixtures * test: avoid loading QA runtime in receipt producers * fix: repair native PR repository identity fixtures (openclaw#149294) (cherry picked from commit 3df0afa) * fix: keep Codex model attribution fixture focused (openclaw#149301) (cherry picked from commit f778132) * test: align canonical model attribution fixture Adopt the complete fixture from openclaw#149349 and openclaw#149261 so merging the inventory branch retains one terminal-list response. Preserve the controlled completion/timeout cases and the original runtime budget. * test: provide dependencies for PR alias fixtures Keep alias delegation cases on their intended supervisor boundary after code-only linked checkouts gained dependency materialization. Preserve exact arguments, exit status, and trust refusals; retain separate materializer coverage. * test: retire superseded PR alias fixture setup Canonical main already owns linked dependency setup before checkout. Remove the branch-local later setup so the merged fixture matches openclaw#149477 exactly, without changing the inventory or lifecycle implementation.
Related: #147871, #140137.
What Problem This Solves
A nested subagent could finish its work but remain listed as running when its child completed just as it yielded. The sidebar also labeled an ancestor “Run failed” when only a descendant had failed.
User Impact
Yielded continuations finish the original task and deliver its result to the original requester. Parent warnings identify the failed child, while reading that child clears the inherited attention normally. Existing waits stranded by older versions require an explicit continuation through
sessions.sendto reconcile their retained results.Why This Change Was Made
Requester settlement now persists the paused requester together with its child wake batch before dispatch. Gateway admission can therefore adopt the original task even when its predecessor's lifecycle-end event arrives later. Persistence rollback, cancellation, and newer-generation guards remain intact. The sidebar carries the descendant label through its existing attention projection without changing stored error state. A CI follow-up supplies deterministic time and the native cleanup response in a Codex attribution fixture; production deadlines are unchanged.
Evidence
pnpm buildpassed, including production UI asset budgets;node scripts/check-changed.mjspassed all typechecks, lint, schema, dependency and import guards.