Skip to content

fix(codex): show completed and failed Wait outcomes - #160450

Closed
steipete wants to merge 1 commit into
mainfrom
codex/qa1022-wait-outcome
Closed

steipete wants to merge 1 commit into
mainfrom
codex/qa1022-wait-outcome

Conversation

@steipete

@steipete steipete commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes completed native Codex Wait tool rows showing Outcome unknown, and failed Wait results missing their error state.

User Impact

Completed and failed Wait results display the outcome reported by Codex. Yielded or unrecognized responses remain unknown. Earlier yielded Exec rows retain their original outcome and output. No configuration, schema, or stored-history rewrite is required.

Why This Change Was Made

Exec and Wait use the same native result formatter, but the transcript adapter applied its strict result parser only to Exec. This extends that existing parser to Wait at the provider-event boundary, preserving call identity and the original output.

Evidence

Live browser QA reproduced a completed Wait result displaying “Script completed” alongside “Outcome unknown.” Before editing, the registered-notification regression reproduced both the completed and failed Wait defects; the other 15 cases passed. With the fix, all 17 cases pass using the actual custom/function call shapes and structured Wait output, including yielded, malformed, empty, and long output controls.

The one-worker file passes in 22.941 seconds wall, with 80 milliseconds summed test time. The initial failing run took 190.643 seconds, including 115.180 seconds of compiled-worker preparation. Selected production/test types, lint, guards and documentation checks pass in 645.255 seconds. Independent managed review found no actionable findings. Hosted CI timing is pending.

Live verification on candidate 240373da89cb, incorporating main 9d233c860cea, now passes. Through the browser, a fresh asynchronous Exec yielded cell 3, then native Wait returned the structured “Script completed” result and QA1023_WAIT_DONE. The expanded Wait row visibly shows Completed, and the final answer is QA1023_WAIT_VERIFIED. The neighboring Unicode draft remains intact. The before capture shows the original completed Wait incorrectly labeled Outcome unknown. Both captures were inspected and delivered in the originating chat.

The canonical full build passes in 469.238 seconds and the strict UI bundle check passes without exceptions. All 45 preserved workflow groups pass after updating the isolated QA runtime. A missing baseline alias in the local proof harness interrupted the first run after 29 groups; its packaging fix preserves that failure and the 29 valid results, then verifies the remaining 16. Hosted CI and native review/landing gates remain required.

Before: completed native Wait incorrectly shows Outcome unknown

After: fresh native Wait shows Completed and preserves output

Apply the existing strict code-mode result parser to Wait as well as Exec. Preserve unknown outcomes for yielded and malformed responses and keep the original provider output bytes.

The registered notification regression fails on completed and failed Wait results before the fix. All17cases pass22.94s with80ms total test time; selected static gates pass645.25s and independent review is clean.
@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation extensions: codex size: S labels Sep 28, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 28, 2026
@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 28, 2026, 7:12 PM ET / 23:12 UTC (Revision 2).

ClawSweeper review

What this changes

The Codex plugin classifies final native Wait results in tool transcripts, adds regression cases for final and nonfinal responses, and documents the displayed outcomes.

Merge readiness

✅ Ready for maintainer review

Keep open. Current main still applies the final-result parser only to Exec, while the inspected live captures show the completed Wait outcome corrected. The prior review’s screenshot request is now satisfied.

Priority: P2
Reviewed head: aef658021074521850d75e34db97b47f86c8d157

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A narrow owner-boundary fix has direct before-and-after UI proof, relevant regression coverage, and no identified merge defect.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): The changed Codex transcript projector consumes native Wait response notifications. Inspected live browser captures show a completed Wait row changing from “Outcome unknown” to “Completed,” with output and the final reply visible; failed Wait classification is covered by the response-boundary regression test. No stored-data contract or historical rewrite changes.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): The changed Codex transcript projector consumes native Wait response notifications. Inspected live browser captures show a completed Wait row changing from “Outcome unknown” to “Completed,” with output and the final reply visible; failed Wait classification is covered by the response-boundary regression test. No stored-data contract or historical rewrite changes.
Evidence reviewed 8 items Introduced parser change: The introduced hunk extends the existing strict result-envelope check from Exec to Wait before recording the tool result.
Current-main necessity: Current main still runs this parser only when the raw call name is Exec, leaving final Wait responses unclassified.
Codex result contract: Codex formats yielded, completed, and failed code-mode results with distinct headers and a wall-time/output envelope; its protocol describes Wait as continuation of a yielded Exec cell.
Findings None None.
Security None None.

How this fits together

The bundled Codex plugin turns app-server tool notifications into OpenClaw transcript rows. Native Exec and Wait responses enter this projection, which supplies outcome and output details to session history and the chat UI.

flowchart LR
A[Native Exec or Wait] --> B[App-server response]
B --> C{Final script result?}
C -->|Yes| D[Completed or failed]
C -->|No| E[Unknown outcome]
D --> F[Transcript row]
E --> F
F --> G[Session UI and history]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +3, Tests +35, Docs +5. Total +43 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 4 1 +3
Tests 1 69 34 +35
Docs 1 5 0 +5
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 78 35 +43

Review metrics

Metric Value Why it matters
Focused regression cost 17 cases; 22.941 seconds wall reported The PR body supplies the one-worker test cost required for changed per-PR coverage.

Technical review

Best possible solution:

Use the plugin’s existing strict result parser for final Exec and Wait responses while preserving unknown outcomes for yielded responses and retaining the provider’s original output.

Do we have a high-confidence way to reproduce the issue?

Yes. A final native Wait response reaches the Exec-only parser on current main, and the inspected before capture shows the resulting incorrect label; this review did not execute current main.

Is this the best way to solve the issue?

Yes. Reusing the plugin’s existing result parser at the response boundary is a narrow fix that preserves unknown yielded responses.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 2a7642919ecc.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The changed Codex transcript projector consumes native Wait response notifications. Inspected live browser captures show a completed Wait row changing from “Outcome unknown” to “Completed,” with output and the final reply visible; failed Wait classification is covered by the response-boundary regression test. No stored-data contract or historical rewrite changes.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The changed Codex transcript projector consumes native Wait response notifications. Inspected live browser captures show a completed Wait row changing from “Outcome unknown” to “Completed,” with output and the final reply visible; failed Wait classification is covered by the response-boundary regression test. No stored-data contract or historical rewrite changes.

Label justifications:

  • P2: The fix corrects misleading Codex tool outcomes with a limited transcript-display impact.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The changed Codex transcript projector consumes native Wait response notifications. Inspected live browser captures show a completed Wait row changing from “Outcome unknown” to “Completed,” with output and the final reply visible; failed Wait classification is covered by the response-boundary regression test. No stored-data contract or historical rewrite changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed Codex transcript projector consumes native Wait response notifications. Inspected live browser captures show a completed Wait row changing from “Outcome unknown” to “Completed,” with output and the final reply visible; failed Wait classification is covered by the response-boundary regression test. No stored-data contract or historical rewrite changes.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The changed Codex transcript projector consumes native Wait response notifications. Inspected live browser captures show a completed Wait row changing from “Outcome unknown” to “Completed,” with output and the final reply visible; failed Wait classification is covered by the response-boundary regression test. No stored-data contract or historical rewrite changes.

Evidence

What I checked:

  • Introduced parser change: The introduced hunk extends the existing strict result-envelope check from Exec to Wait before recording the tool result. (extensions/codex/src/app-server/event-projector-tool-transcript.ts:299, aef658021074)
  • Current-main necessity: Current main still runs this parser only when the raw call name is Exec, leaving final Wait responses unclassified. (extensions/codex/src/app-server/event-projector-tool-transcript.ts:299, 2a7642919ecc)
  • Codex result contract: Codex formats yielded, completed, and failed code-mode results with distinct headers and a wall-time/output envelope; its protocol describes Wait as continuation of a yielded Exec cell. (codex-rs/core/src/tools/code_mode/mod.rs:297, be2951ea34f0)
  • Boundary regression coverage: Registered response-notification tests cover Exec and Wait with empty, yielded, unrecognized, completed, and failed output, checking call identity, error state, outcome, and retained output. (extensions/codex/src/app-server/event-projector.output-fidelity.test.ts:120, aef658021074)
  • Inspected live behavior proof: The PR body snapshot embeds before and after images. The downloaded images were inspected: the before image shows a completed native Wait row labeled “Outcome unknown”; the after image shows a fresh Wait row labeled “Completed” with its output and final reply visible.
  • Prior-review continuity: The completed review of this same head recorded no findings and requested before-and-after screenshots. Both are now embedded in the PR body and were inspectable.

Likely related people:

  • sjf-oa: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-28T12:40:12.567Z sha aef6580 :: needs changes before merge. :: none

@steipete
steipete marked this pull request as ready for review September 28, 2026 23:04
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. labels Sep 28, 2026
@RomneyDa

RomneyDa commented Oct 2, 2026

Copy link
Copy Markdown
Member

superceded by #163545

@RomneyDa RomneyDa closed this Oct 2, 2026
@RomneyDa
RomneyDa deleted the codex/qa1022-wait-outcome branch October 22, 2026 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation extensions: codex P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants