Repository navigation
fix(agents): resume yielded requesters after visible spawns - #128096
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 22, 2026, 11:41 PM ET / August 23, 2026, 03:41 UTC. ClawSweeper reviewWhat this changesThe PR forwards the active requester-turn ID into visible-session registration so a yielded requester can receive the visible child’s final result exactly once. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open: this is a source-confirmed lifecycle repair with no blocking correctness or security finding. The protected maintainer label and incomplete exact-head checks require normal maintainer handling. Priority: P1 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherVisible sessions are durable dashboard child runs created by the agent’s session-spawn tool. Their terminal events enter the subagent registry, which matches them to the requester turn and schedules a resumed final response. flowchart LR
A[Requester turn] --> B[Visible session spawn]
B --> C[Subagent registry]
C --> D[Yield settlement]
D --> E[Child terminal event]
E --> F[Requester final response]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +2, Tests +96. Total +98 across 3 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the two-line registration-boundary propagation and land after an isolated real-flow proof confirms one requester final response without replay duplication. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main supplies the requester run ID to the spawn tool but visible registration drops it, so exact yield ownership finds no child. The focused test was not executed during this read-only review. Is this the best way to solve the issue? Yes: forwarding the already-prepared identity at the registration owner matches native and ACP siblings and avoids a downstream ownership workaround. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e22d45051c0c. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
|
Post-merge ClawSweeper follow-up: the review finalized during the merge window. The optional Rank-up move to capture an isolated dashboard trace was intentionally skipped. This is not a schema or migration change; it populates the existing |
What Problem This Solves
Fixes an issue where a requester that spawned a durable visible session and then called
sessions_yieldcould be told that no pending child completion belonged to its turn. The visible child was omitted from requester settlement, so its result could not participate in the resumed final synthesis.Why This Change Was Made
Visible session registration now preserves the same exact admitted requester-turn identity already carried by native and ACP child spawns. The registry's existing exact-owner matching, yield settlement, and duplicate-delivery protections remain unchanged.
User Impact
Requesters can yield after spawning a visible dashboard session and receive one synthesized final answer when that child finishes, without duplicate delivery from replayed terminal events.
Evidence
No pending child completion is owned by this turn.OPENCLAW_E2E_SKIP_BUILD=1 node scripts/run-vitest.mjs src/agents/subagents/registry/subagent-registry.lifecycle-retry-grace.e2e.test.tsnode scripts/run-vitest.mjs src/agents/tools/sessions-spawn-tool.test.tsnode scripts/check-changed.mjs -- src/agents/tools/sessions-spawn-visible.ts src/agents/tools/sessions-spawn-tool.test.ts src/agents/subagents/registry/subagent-registry.lifecycle-retry-grace.e2e.test.tsAI-assisted: yes. The implementation and tests were inspected and verified by the maintainer.