Repository navigation
fix: keep silent Codex turns healthy with running commands - #196062
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. What this changesExclude confirmed running Codex commands from missing-result failure selection and counting. Example: A Codex turn returns NO_REPLY while command retained-command remains running with handle 52627.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep this PR open: it repairs a concrete current-main bug with a focused change, and source review found no actionable code defects. Priority: P1 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe Codex plugin projects native app-server events into OpenClaw transcripts and terminal outcomes, using confirmed background-command inventory during turn settlement. flowchart LR
A[Codex app server] --> B[Native event projection]
A --> C[Background command inventory]
C --> D[Existing custody checks]
B --> E[Turn settlement]
D --> E
E --> F[Transcript and terminal outcome]
Technical reviewBest possible solution: Keep retained commands neutral and settle silent turns successfully while preserving failures for genuinely missing results. Do we have a high-confidence way to reproduce the issue? Current-main source deterministically returns a missing-result error for a silent NO_REPLY turn with a confirmed retained command; the contributor reports base-failing regressions, but this read-only review ran no target code. Is this the best way to solve the issue? The defect is inconsistent treatment of confirmed running IDs; the invariant is that only genuinely missing results cause missing-result failures, and filtering those IDs in the existing classification owner is the smallest complete repair. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a4a93bcb507c. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +5, Tests +33, Other +2. Total +40 across 3 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 9, 2026, 10:38 AM ET / 15:38 UTC. |
…outcome table Drop the test-line allocation record and keep one compact red-on-base case.
|
Gateway proof (built candidate vs main, secretless Docker, native Codex harness vs stand-in app-server). Thread ids are fixture UUIDs. |
|
Merged in 9e2de2c. Thanks @aatreya for the report in #196061 and the fix. A Codex turn that ends without visible text while a confirmed native command is still running is no longer marked failed with a missing-tool-result error, so the session stays live: follow-ups are answered and the command's result continues the task. Truly missing tool results still fail as before, and mixed turns report only the missing calls. |
* commit '92569e37ab84a8cb1e4a12c3dcbb45acb97977c9': fix: distinguish Desktop sources without wrapping their names or IDs (#203747) fix(ui): Greek sigma searches miss matches outside Sessions and Files (#189518) fix: keep agent skill names on one line beside their switches (#203734) test(cron): admit scheduled occurrences in cron fixtures and fix Node 24 toHex in Vitest (#205383) fix: keep the Agents menu usable after copying an ID (#203739) fix(whatsapp): preserve code table spaces across message chunks (#205327) refactor(cron): admit legacy scheduled requesters through operator admission (#205346) fix: keep silent Codex turns healthy with running commands (#196062) test(update): verify the recorded preparation failure (#205363) fix(test): prove sibling imports on the active update path fix(chat): complete mentions without leaving part of the name behind (#205326) fix(test): restore Side chat hydration and retry checks (#205376) refactor: plugin-run turns get owner status from commands.ownerAllowFrom, like text messages (#205373) chore(ui): refresh control ui locales (#205378) fix: keep Telegram rich <details> and list blocks in one message when replies stream in chunks (#205318) refactor(gateway): one refusal owner with a required next step (#205337) fix(discord): keep long table labels bold across messages (#205328) feat: invitation, sharing and participant controls in the Control UI (#204920) fix(test): distinguish stamped Skill Library upgrade policies fix(markdown): preserve trailing inline-code spaces in plain-text tables (#205317)
Root cause: extensions/codex/src/app-server/event-projector-tool-transcript.ts:601-608 (on main) `synthesizeMissingToolResults` already records confirmed retained command ids as neutral "still running" results, but still counts them as missing tool results, so a silent turn (no visible answer) with a confirmed running native command is failed with the missing-result error. Fixes #196061. Related: #156764 (added the neutral retained-command record), #194757 (separate continuation path). Thanks @aatreya for the report and the fix. ## What Problem This Solves A Codex turn that starts a native background command, gets it confirmed by `thread/backgroundTerminals/list`, and then ends silently (`NO_REPLY`) was marked failed with "OpenClaw recorded a native Codex tool.call without a matching tool.result before the turn completed." That failure skips the normal retention of the live thread, so the next user message is rejected with "Codex thread … still has background work after waiting for cleanup; stop its running work and retry", and the session stays stuck even after the command finishes. ## Fix Confirmed retained command ids are excluded from missing-result error selection and counting. Their neutral running records are unchanged. Genuinely missing results still fail, and a mix of running and missing calls reports only the missing ones. ## Evidence Built Gateway (secretless Docker) running the native Codex harness against a stand-in app-server that follows the Codex app-server protocol: the turn starts a background command that stays running, the inventory confirms it, the turn ends with `NO_REPLY`; then a follow-up message, the command's native completion, and a "continue" message. Main twice, this branch twice, plus controls. Observed lines: #196062 (comment) | Scenario | main | this PR | |---|---|---| | silent turn + running command (x2) | turn fails with missing-result error; follow-up rejected ("still has background work…"); after completion still rejected | turn not failed; follow-up answered on the same live thread; after completion the next message runs | | silent turn + truly missing result | missing-result error | same | | silent turn + running + missing | missing-result error, `missingToolResultCount=2` | missing-result error for the one missing call | | visible answer + running command | unchanged | unchanged | The proof drives the session through `openclaw agent`, which requires a result, so this PR's silent first turn shows that CLI's standard "No answer was returned" notice rather than the missing-result failure. Channel turns such as Discord accept the silence. Regression test: `native background outcome: silent retained` fails on main's projector and passes here. The takeover commit drops the test-line allocation file and folds the regression into the existing table (production +8/-3, tests +7/-3). ## Merge danger Two-way door: classification only, no stored state, config or contract changes; a revert fully undoes it. Blast radius: Codex harness turns that end without a visible answer while a confirmed native command is still running. Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit 9e2de2c) Co-authored-by: RomneyDa <[email protected]> Co-authored-by: vincentkoc <[email protected]>
…196062) Root cause: extensions/codex/src/app-server/event-projector-tool-transcript.ts:601-608 (on main) `synthesizeMissingToolResults` already records confirmed retained command ids as neutral "still running" results, but still counts them as missing tool results, so a silent turn (no visible answer) with a confirmed running native command is failed with the missing-result error. Fixes openclaw#196061. Related: openclaw#156764 (added the neutral retained-command record), openclaw#194757 (separate continuation path). Thanks @aatreya for the report and the fix. ## What Problem This Solves A Codex turn that starts a native background command, gets it confirmed by `thread/backgroundTerminals/list`, and then ends silently (`NO_REPLY`) was marked failed with "OpenClaw recorded a native Codex tool.call without a matching tool.result before the turn completed." That failure skips the normal retention of the live thread, so the next user message is rejected with "Codex thread … still has background work after waiting for cleanup; stop its running work and retry", and the session stays stuck even after the command finishes. ## Fix Confirmed retained command ids are excluded from missing-result error selection and counting. Their neutral running records are unchanged. Genuinely missing results still fail, and a mix of running and missing calls reports only the missing ones. ## Evidence Built Gateway (secretless Docker) running the native Codex harness against a stand-in app-server that follows the Codex app-server protocol: the turn starts a background command that stays running, the inventory confirms it, the turn ends with `NO_REPLY`; then a follow-up message, the command's native completion, and a "continue" message. Main twice, this branch twice, plus controls. Observed lines: openclaw#196062 (comment) | Scenario | main | this PR | |---|---|---| | silent turn + running command (x2) | turn fails with missing-result error; follow-up rejected ("still has background work…"); after completion still rejected | turn not failed; follow-up answered on the same live thread; after completion the next message runs | | silent turn + truly missing result | missing-result error | same | | silent turn + running + missing | missing-result error, `missingToolResultCount=2` | missing-result error for the one missing call | | visible answer + running command | unchanged | unchanged | The proof drives the session through `openclaw agent`, which requires a result, so this PR's silent first turn shows that CLI's standard "No answer was returned" notice rather than the missing-result failure. Channel turns such as Discord accept the silence. Regression test: `native background outcome: silent retained` fails on main's projector and passes here. The takeover commit drops the test-line allocation file and folds the regression into the existing table (production +8/-3, tests +7/-3). ## Merge danger Two-way door: classification only, no stored state, config or contract changes; a revert fully undoes it. Blast radius: Codex harness turns that end without a visible answer while a confirmed native command is still running. Co-authored-by: Ayaan Zaidi <[email protected]>
Root cause: extensions/codex/src/app-server/event-projector-tool-transcript.ts:601-608 (on main) `synthesizeMissingToolResults` already records confirmed retained command ids as neutral "still running" results, but still counts them as missing tool results, so a silent turn (no visible answer) with a confirmed running native command is failed with the missing-result error. Fixes #196061. Related: #156764 (added the neutral retained-command record), #194757 (separate continuation path). Thanks @aatreya for the report and the fix. ## What Problem This Solves A Codex turn that starts a native background command, gets it confirmed by `thread/backgroundTerminals/list`, and then ends silently (`NO_REPLY`) was marked failed with "OpenClaw recorded a native Codex tool.call without a matching tool.result before the turn completed." That failure skips the normal retention of the live thread, so the next user message is rejected with "Codex thread … still has background work after waiting for cleanup; stop its running work and retry", and the session stays stuck even after the command finishes. ## Fix Confirmed retained command ids are excluded from missing-result error selection and counting. Their neutral running records are unchanged. Genuinely missing results still fail, and a mix of running and missing calls reports only the missing ones. ## Evidence Built Gateway (secretless Docker) running the native Codex harness against a stand-in app-server that follows the Codex app-server protocol: the turn starts a background command that stays running, the inventory confirms it, the turn ends with `NO_REPLY`; then a follow-up message, the command's native completion, and a "continue" message. Main twice, this branch twice, plus controls. Observed lines: #196062 (comment) | Scenario | main | this PR | |---|---|---| | silent turn + running command (x2) | turn fails with missing-result error; follow-up rejected ("still has background work…"); after completion still rejected | turn not failed; follow-up answered on the same live thread; after completion the next message runs | | silent turn + truly missing result | missing-result error | same | | silent turn + running + missing | missing-result error, `missingToolResultCount=2` | missing-result error for the one missing call | | visible answer + running command | unchanged | unchanged | The proof drives the session through `openclaw agent`, which requires a result, so this PR's silent first turn shows that CLI's standard "No answer was returned" notice rather than the missing-result failure. Channel turns such as Discord accept the silence. Regression test: `native background outcome: silent retained` fails on main's projector and passes here. The takeover commit drops the test-line allocation file and folds the regression into the existing table (production +8/-3, tests +7/-3). ## Merge danger Two-way door: classification only, no stored state, config or contract changes; a revert fully undoes it. Blast radius: Codex harness turns that end without a visible answer while a confirmed native command is still running. Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit 9e2de2c) Co-authored-by: RomneyDa <[email protected]>
Root cause: extensions/codex/src/app-server/event-projector-tool-transcript.ts:601-608 (on main)
synthesizeMissingToolResultsalready records confirmed retained command ids as neutral "still running" results, but still counts them as missing tool results, so a silent turn (no visible answer) with a confirmed running native command is failed with the missing-result error.Fixes #196061. Related: #156764 (added the neutral retained-command record), #194757 (separate continuation path).
Thanks @aatreya for the report and the fix.
What Problem This Solves
A Codex turn that starts a native background command, gets it confirmed by
thread/backgroundTerminals/list, and then ends silently (NO_REPLY) was marked failed with "OpenClaw recorded a native Codex tool.call without a matching tool.result before the turn completed." That failure skips the normal retention of the live thread, so the next user message is rejected with "Codex thread … still has background work after waiting for cleanup; stop its running work and retry", and the session stays stuck even after the command finishes.Fix
Confirmed retained command ids are excluded from missing-result error selection and counting. Their neutral running records are unchanged. Genuinely missing results still fail, and a mix of running and missing calls reports only the missing ones.
Evidence
Built Gateway (secretless Docker) running the native Codex harness against a stand-in app-server that follows the Codex app-server protocol: the turn starts a background command that stays running, the inventory confirms it, the turn ends with
NO_REPLY; then a follow-up message, the command's native completion, and a "continue" message. Main twice, this branch twice, plus controls. Observed lines: #196062 (comment)missingToolResultCount=2The proof drives the session through
openclaw agent, which requires a result, so this PR's silent first turn shows that CLI's standard "No answer was returned" notice rather than the missing-result failure. Channel turns such as Discord accept the silence.Regression test:
native background outcome: silent retainedfails on main's projector and passes here.The takeover commit drops the test-line allocation file and folds the regression into the existing table (production +8/-3, tests +7/-3).
Merge danger
Two-way door: classification only, no stored state, config or contract changes; a revert fully undoes it. Blast radius: Codex harness turns that end without a visible answer while a confirmed native command is still running.