Skip to content

fix(codex): recover final text after prompt timeout#84993

Merged
vincentkoc merged 1 commit into
mainfrom
fix/codex-final-assistant-delivery
May 22, 2026
Merged

fix(codex): recover final text after prompt timeout#84993
vincentkoc merged 1 commit into
mainfrom
fix/codex-final-assistant-delivery

Conversation

@vincentkoc

@vincentkoc vincentkoc commented May 21, 2026

Copy link
Copy Markdown
Member

Summary

Verification

  • git diff --check
  • GitHub checks on current rebased head e926a5eede0bb7e7e094f5a1c24eab6ab4d35206: passing, including Real behavior proof, check-lint, check-test-types, changed-path shards, Critical Quality agent-runtime-boundary/network-runtime-boundary, and Security High shards. Merge state is CLEAN.
  • Local focused Vitest attempt after rebase was blocked by the shared local node_modules missing @rolldown/binding-darwin-arm64; I did not repair deps from this Codex worktree.
  • Pre-rebase local proof on the same code path: 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.
  • Pre-rebase local full incomplete-turn suite: CI=1 timeout 300s node scripts/run-vitest.mjs run src/agents/pi-embedded-runner/run.incomplete-turn.test.ts passed.
  • AWS Crabbox fresh PR focused regression on c4f3de33346b0c5bf8120ec473f0ee08d9d811b9: run_04d5b2255fed / cbx_c13825905dfc passed.
  • AWS Crabbox fresh PR changed gate on c4f3de33346b0c5bf8120ec473f0ee08d9d811b9: run_75e05edd563a / cbx_db171cdf8b82 passed pnpm check:changed -- CHANGELOG.md src/agents/pi-embedded-runner/run.ts src/agents/pi-embedded-runner/run.incomplete-turn.test.ts.
  • Post-rebase Crabbox retry run_3bd54ab0e602 / cbx_e2f1ea4c2d88 failed in rsync transport before running tests; no code failure was observed there.
  • Blacksmith Testbox: first run tbx_01ks5hcrs4fr53ebnn8thsybqd found a lint issue before the amend; after the amend, tbx_01ks5hmhf173mzsmrjgz3f5h0p, tbx_01ks5hwd53t9dj88d6q2075sr3, and tbx_01ks5j3h0rrdxn3yd2f3b3y9n4 failed 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/completed finish, 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:changed on the touched files, then rebased and verified current-head GitHub checks.
Evidence after fix: the new regression returns payloads: [{ text: finalText }], preserves finalAssistantVisibleText/finalAssistantRawText, reports liveness working, 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.

@vincentkoc vincentkoc self-assigned this May 21, 2026
@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: S maintainer Maintainer-authored PR labels May 21, 2026
@clawsweeper

clawsweeper Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

Workflow note: Future ClawSweeper reviews update this same comment in place.

How this review workflow works
  • 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.

Summary
Review failed before ClawSweeper could summarize the requested change.

Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path.

PR rating
Overall: 🌊 off-meta tidepool
Proof: 🌊 off-meta tidepool
Patch quality: 🌊 off-meta tidepool
Summary: PR readiness rating was not assessed because the Codex review failed.

What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
Not applicable: Real behavior proof was not assessed because the Codex review failed.

Risk before merge

  • No close action taken because the review did not complete.

Maintainer options:

  1. Decide the mitigation before merge
    Retry the Codex review after fixing the execution failure.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge
Review did not complete, so no work-lane recommendation was made.

Review details

Best 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:

  • add rating: 🌊 off-meta tidepool: Current PR rating is 🌊 off-meta tidepool because proof is 🌊 off-meta tidepool, patch quality is 🌊 off-meta tidepool, and PR readiness rating was not assessed because the Codex review failed.
  • remove P1: Current review triage priority is none.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🌊 off-meta tidepool, so this older rating label is no longer current.
  • remove merge-risk: 🚨 message-delivery: Current PR review selected no merge-risk labels.
  • remove status: ⏳ waiting on author: Current PR status no longer selects a status label.

Label justifications:

  • rating: 🌊 off-meta tidepool: Current PR rating is 🌊 off-meta tidepool because proof is 🌊 off-meta tidepool, patch quality is 🌊 off-meta tidepool, and PR readiness rating was not assessed because the Codex review failed.

What I checked:

  • failure reason: timeout.
  • codex failure detail: Codex review failed for this PR: spawnSync codex ETIMEDOUT.
  • codex stdout: Per-item Codex failure; continuing with the rest of the shard.

Likely related people:

  • unknown: Codex failed before it could trace repository history. (role: review did not complete; confidence: low)

Codex review notes: model gpt-5.5, reasoning high; reviewed against 60d200f79719.

@vincentkoc
vincentkoc force-pushed the fix/codex-final-assistant-delivery branch from 802da91 to c4f3de3 Compare May 21, 2026 15:14
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. labels May 21, 2026
@clawsweeper

clawsweeper Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper PR egg

🥚 Incubating: this PR egg is tucked into the review nest.

Hatch command

Comment @clawsweeper hatch when this PR is hatchable.

Hatchability rules:

  • Merged PRs are hatchable.
  • Open PRs are hatchable when they are status: 👀 ready for maintainer look, status: 🚀 automerge armed, or labeled clawsweeper:automerge.
  • Closed unmerged PRs are hatchable only when one of those hatchable labels is still present in the durable record.
What is this egg doing here?
  • Eggs appear after the PR passes real-behavior proof. It is here for vibes, not verdicts: it does not change labels, ratings, merge decisions, or automation.
  • The shell reacts to review momentum: open follow-up work warms it up, re-review makes it wobble, and a clean final review lets it hatch.
  • Hatchability usually comes from sufficient real-behavior proof, no blocking P0/P1/P2 findings, no security attention needed, and clean correctness. A merged PR is already final, so merge makes the egg hatchable independently.
  • The hatch is seeded from this repository and PR number, so the same PR keeps the same creature; the reviewed head SHA can only change safe visual details.
  • Rarity is just collectible sparkle: 🥚 common, 🌱 uncommon, 💎 rare, ✨ glimmer, and 🌈 legendary.

@vincentkoc
vincentkoc force-pushed the fix/codex-final-assistant-delivery branch from e926a5e to 355f0e9 Compare May 22, 2026 01:26
@vincentkoc
vincentkoc force-pushed the fix/codex-final-assistant-delivery branch from 355f0e9 to 34f2ec3 Compare May 22, 2026 01:41
@clawsweeper clawsweeper Bot added rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels May 22, 2026
@vincentkoc
vincentkoc merged commit a4c81c6 into main May 22, 2026
110 of 114 checks passed
@vincentkoc
vincentkoc deleted the fix/codex-final-assistant-delivery branch May 22, 2026 03:02
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 24, 2026
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 24, 2026
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 24, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
galiniliev pushed a commit to galiniliev/openclaw that referenced this pull request May 25, 2026
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 26, 2026
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 26, 2026
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 26, 2026
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
SYU8384 pushed a commit to SYU8384/openclaw that referenced this pull request Jun 3, 2026
sablehead pushed a commit to sablehead/openclaw that referenced this pull request Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling maintainer Maintainer-authored PR merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants