fix(codex): preserve native subagent completion results#91235
Conversation
|
Codex review: passed. Reviewed June 7, 2026, 10:21 PM ET / 02:21 UTC. Summary PR surface: Source +92, Tests +176. Total +268 across 4 files. Reproducibility: yes. at source level: current main maps successful null/blank Codex completions to Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the narrow Codex plugin delivery fix after required checks if maintainers accept module-level proof, and track the diagnostic/history acceptance criterion separately if it remains required. Do we have a high-confidence way to reproduce the issue? Yes at source level: current main maps successful null/blank Codex completions to Is this the best way to solve the issue? Yes for the parser/monitor mismatch: keeping the fix inside the Codex plugin boundary is the narrowest maintainable path and the tests cover the changed behavior. It is not a complete solution for the linked issue's separate diagnostic-history request. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 9caff5f873cd. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +92, Tests +176. Total +268 across 4 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
@clawsweeper automerge |
|
🦞🧹
Draft PRs stay fix-only until GitHub marks them ready for review. Pause with Automerge progress:
Re-review progress:
|
60edfe6 to
f9270c2
Compare
Summary: - The branch updates the Codex plugin native subagent parser, monitor, and tests so successful null or blank c ... final result and transcript reconciliation can override early empty notifications before fallback delivery. - PR surface: Source +92, Tests +176. Total +268 across 4 files. - Reproducibility: yes. at source level: current main maps successful null/blank Codex completions to `(no out ... n recover final text. I did not run a live current-main Telegram/Codex reproduction in this read-only pass. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(codex): preserve native subagent completion results Validation: - ClawSweeper review passed for head f9270c2. - Required merge gates passed before the squash merge. Prepared head SHA: f9270c2 Review: openclaw#91235 (comment) Co-authored-by: 宇宙熊Yzx <53250620+849261680@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary
Fixes #91120.
Refs #78656.
Codex native subagent notifications can report
status: { completed: null }when the child completed without a final assistant message. OpenClaw was collapsing that state to(no output)and, when a notification arrived before transcript reconciliation, marking the child terminal before the transcript path could recoverlast_agent_message.This PR keeps the change inside the Codex plugin surface:
completed:nulland blank completed strings ascompleted_without_final_messageinstead of(no output);codexHomeis configured;(no output)behavior.Dependency contract checked directly in sibling
../codex:../codex/codex-rs/protocol/src/protocol.rs:1574definesAgentStatus::Completed(Option<String>).../codex/codex-rs/core/src/context/subagent_notification.rs:33serializes subagent notifications withagent_pathandstatus.../codex/codex-rs/core/src/tools/handlers/multi_agents/wait.rs:178buildswait_agentresults from finalAgentStatusentries.Real behavior proof
wait_agent/transcript result can disagree when an earlycompleted:nullnotification is delivered as(no output)before a later transcript final is available.openclaw-91120, with repo dependencies installed and OpenClaw Codex plugin modules executed through Node/tsx.node --import tsx --input-type=moduleterminal run importingextensions/codex/src/app-server/native-subagent-notification.tsand parsing real Codex native<subagent_notification>payloads.node --import tsx --input-type=moduleterminal run importingextensions/codex/src/app-server/native-subagent-monitor.ts, creating a local Codex transcript under a tempcodexHome, sending a realrawResponseItem/completednotification withcompleted:null, and printing the monitor delivery payload.node scripts/run-vitest.mjs extensions/codex/src/app-server/native-subagent-notification.test.ts extensions/codex/src/app-server/native-subagent-monitor.test.ts; targetedoxfmt; targetedoxlint;pnpm tsgo:test:extensions;.agents/skills/autoreview/scripts/autoreview --mode local.Terminal capture from the monitor/transcript run:
Supplemental verification output:
completed:nullis no longer surfaced as(no output); it becomesstatusLabel: "completed_without_final_message". When a transcript final exists, the parent delivery uses the transcripttask_completeresult (transcript final beats early null notification) instead of the early empty notification. If transcript reconciliation is unavailable, bounded fallback delivers the typed no-final reason rather than leaving the parent without a completion wakeup.check:changedcould not be started because this environment has no usablecrabboxorblacksmithbinary;node scripts/crabbox-wrapper.mjs run --provider blacksmith-testbox ... pnpm check:changedfailed at wrapper sanity check before provisioning.