fix(codex): recover final text after prompt timeout#84993
Conversation
|
Codex review: needs maintainer review before merge. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path. PR rating 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. Real behavior proof Risk before merge
Maintainer options:
Next step before merge Review detailsBest possible solution: Retry the Codex review after fixing the execution failure. Do we have a high-confidence way to reproduce the issue? Unclear. The review failed before ClawSweeper could establish a reproduction path. Is this the best way to solve the issue? Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction. Label changes:
Label justifications:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 60d200f79719. |
802da91 to
c4f3de3
Compare
|
ClawSweeper PR egg 🥚 Incubating: this PR egg is tucked into the review nest. Hatch commandComment Hatchability rules:
What is this egg doing here?
|
024e8ed to
e926a5e
Compare
e926a5e to
355f0e9
Compare
355f0e9 to
34f2ec3
Compare
Summary
stop/end_turn/completedassistant text.Verification
git diff --checke926a5eede0bb7e7e094f5a1c24eab6ab4d35206: passing, includingReal behavior proof,check-lint,check-test-types, changed-path shards, Critical Qualityagent-runtime-boundary/network-runtime-boundary, and Security High shards. Merge state isCLEAN.node_modulesmissing@rolldown/binding-darwin-arm64; I did not repair deps from this Codex worktree.CI=1 timeout 300s node scripts/run-vitest.mjs run src/agents/pi-embedded-runner/run.incomplete-turn.test.ts -t "prompt timeout races completion|strict-agentic blocked exit|empty assistant"passed.CI=1 timeout 300s node scripts/run-vitest.mjs run src/agents/pi-embedded-runner/run.incomplete-turn.test.tspassed.c4f3de33346b0c5bf8120ec473f0ee08d9d811b9:run_04d5b2255fed/cbx_c13825905dfcpassed.c4f3de33346b0c5bf8120ec473f0ee08d9d811b9:run_75e05edd563a/cbx_db171cdf8b82passedpnpm check:changed -- CHANGELOG.md src/agents/pi-embedded-runner/run.ts src/agents/pi-embedded-runner/run.incomplete-turn.test.ts.run_3bd54ab0e602/cbx_e2f1ea4c2d88failed in rsync transport before running tests; no code failure was observed there.tbx_01ks5hcrs4fr53ebnn8thsybqdfound a lint issue before the amend; after the amend,tbx_01ks5hmhf173mzsmrjgz3f5h0p,tbx_01ks5hwd53t9dj88d6q2075sr3, andtbx_01ks5j3h0rrdxn3yd2f3b3y9n4failed in the Blacksmith rsync/sync layer before running the gate.Real behavior proof
Behavior addressed: Codex app-server timeout race where final assistant text is captured with a successful
stop/end_turn/completedfinish, but payload projection is empty and downstream channels receive an empty timeout envelope.Real environment tested: local OpenClaw focused runner tests before rebase; AWS Crabbox fresh PR Linux runs before rebase; GitHub CI on current rebased head.
Exact steps or command run after this patch: ran the focused timeout-race regression, the full incomplete-turn runner suite, AWS Crabbox fresh-PR focused regression, AWS Crabbox fresh-PR
pnpm check:changedon the touched files, then rebased and verified current-head GitHub checks.Evidence after fix: the new regression returns
payloads: [{ text: finalText }], preservesfinalAssistantVisibleText/finalAssistantRawText, reports livenessworking, and records the execution attempt as assistant-stage success.Observed result after fix: completed final assistant text is promoted into the terminal payload path instead of being replaced by a timeout error when completion and prompt timeout race.
What was not tested: live reporter gpt-5.5 OAuth long reply / Telegram outbound; fresh post-rebase Crabbox/Testbox execution because both remote sync layers failed before executing commands. The Form A pure-silence case with no assistant text remains timeout behavior by design.
Refs #84516.