Repository navigation
fix(agents): prevent duplicate yielded subagent fanout - #118703
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 10:18 AM ET / 14:18 UTC. ClawSweeper reviewWhat this changesThe PR settles native-harness accepted child spawns before a late dispatcher abort, parks completion delivery while Merge readinessKeep this MEMBER-authored, Priority: P1 Review scores
Verification
How this fits togetherEmbedded agent runs call a selected harness, record accepted child-session spawns, and use the subagent registry to decide when the requester can resume. Completion cleanup then either wakes that requester for synthesis or delivers a portable completion message through the channel path. flowchart LR
A[Requester turn] --> B[Embedded agent attempt]
B --> C[Selected native harness]
C --> D[Accepted child spawns]
D --> E[Subagent registry settlement]
E --> F[Requester wake decision]
F --> G[Final synthesis or completion delivery]
Decision needed
Why: The answer depends on the integrated ordering of current-main lifecycle changes and the Codex app-server turn contract, which could not be directly inspected because sibling Before merge
Agent review detailsSecurityNone. PR surfaceSource +32, Tests +63. Total +95 across 8 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Rebase onto current Do we have a high-confidence way to reproduce the issue? No independent high-confidence reproduction was established here: the PR supplies linked Testbox and runtime-pair claims, but this read-only environment could not inspect or rerun them and lacks the required sibling Codex source. Is this the best way to solve the issue? Unclear: settling at the harness boundary is consistent with the registry's explicit yielded-handoff owner, but current main has a later related repair and the upstream Codex turn contract could not be inspected directly. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ffcca757eb3a. 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
|
b0320be to
cfb7fd1
Compare
|
@clawsweeper re-review Exact head is |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
Merged via squash.
|
…checkpoint * origin/main: (46 commits) fix(agents): recover from invalid compaction summaries (#119137) fix(gateway): expose OAuth-backed tools to CLI agents (#119166) fix(plugins): preserve metadata reloads during models status (#119183) fix(test): bound direct gateway server runs (#119184) test(tui): prove command surfaces through PTY (#119165) fix(testbox): restore claims across path aliases (#119170) fix(message): preserve sends with incidental Telegram locations fix(perf): give each concurrency sample a full deadline (#119164) fix(testbox): remove changed-gate sync residue (#119163) fix(telegram): preserve later chunks after rejected sends fix(tui): block terminal controls in system messages (#118998) fix(auto-reply): suppress false no-reply fallback during continuations (#119154) fix(scripts): prevent gateway benchmarks from stalling on probes (#119063) test(channels): verify built sanitizer semantics (#119151) fix: prevent live updater from leaving Gateway offline indefinitely (#119116) test(qa): restore memory tools primary ownership (#119142) fix(agents): settle yielded fanout at harness boundary (#118703) fix(codex): cap compaction override warning cache via createDedupeCache (#101745) fix(daemon): skip unlabeled launchd plists (#119091) test(qa): repair QA catalog integrity (#119140) ...
* origin/main: fix: prevent live updater from leaving Gateway offline indefinitely (openclaw#119116) test(qa): restore memory tools primary ownership (openclaw#119142) fix(agents): settle yielded fanout at harness boundary (openclaw#118703) fix(codex): cap compaction override warning cache via createDedupeCache (openclaw#101745) fix(daemon): skip unlabeled launchd plists (openclaw#119091) test(qa): repair QA catalog integrity (openclaw#119140) fix(test): isolate shared state between test files (openclaw#118781) test(xai): cover delayed OAuth connection setup fix(voice): start socket timeout after auth preparation
* origin/main: fix: prevent live updater from leaving Gateway offline indefinitely (openclaw#119116) test(qa): restore memory tools primary ownership (openclaw#119142) fix(agents): settle yielded fanout at harness boundary (openclaw#118703) fix(codex): cap compaction override warning cache via createDedupeCache (openclaw#101745) fix(daemon): skip unlabeled launchd plists (openclaw#119091) test(qa): repair QA catalog integrity (openclaw#119140) fix(test): isolate shared state between test files (openclaw#118781) test(xai): cover delayed OAuth connection setup fix(voice): start socket timeout after auth preparation
What Problem This Solves
Fixes an issue where Codex-runtime sessions using
sessions_yieldfanout could replay the original child launches or never receive the final synthesized completion after the children finished.The release-grade runtime-pair lane reproduced this as duplicate
alpha/betalaunches followed by a timeout.Why This Change Was Made
Native harness results now settle accepted child spawns immediately after the harness releases active-run ownership, before dispatch can replace the successful result with a late abort. OpenClaw keeps its existing earlier settlement boundary.
Completion delivery remains parked while the yielded requester owns the handoff, and the requester wake is re-armed only after that turn settles. This avoids both duplicate steering/direct delivery and silent completion loss.
User Impact
Users can fan out subagents from the Codex runtime, yield for their completion, and receive one final synthesis without duplicate child launches.
Evidence
8895b0c28858caf9c45f4924bc27db281f672522: runtime-pair failure and release verifier failure.origin/main45643863d7132a2580864ac05d007dcc724a5dbf; exact signed headcfb7fd1b3660f3c19341a6761e5c87df12b3df9d.tbx_01kz5tscp2pewppczmrkfgbvky: workflow run.pnpm check:changed: passed.subagent-fanout-synthesis: OpenClaw1/1, Codex1/1, validator1/1.0.94.codex-rs/app-server/src/request_processors/turn_processor.rs,codex-rs/core/src/session/mod.rs,codex-rs/app-server/src/bespoke_event_handling.rs, andcodex-rs/app-server-protocol/src/protocol/v2/turn.rsfor expected-turn steering and turn completion behavior.Provenance: made visible by #118644, which added native accepted-spawn telemetry but did not yet settle it through the shared harness boundary.