Skip to content

fix: keep silent Codex turns healthy with running commands - #196062

Merged
obviyus merged 3 commits into
openclaw:mainfrom
aatreya:fix/codex-retained-command-yield
Nov 25, 2026
Merged

obviyus merged 3 commits into
openclaw:mainfrom
aatreya:fix/codex-retained-command-yield

Conversation

@aatreya

@aatreya aatreya commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

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.

@clawsweeper

clawsweeper Bot commented Nov 9, 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.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 9, 2026
@clawsweeper

clawsweeper Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

Exclude 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.

  • Before: The command is recorded as still running, but the turn receives a missing-tool-result error.
  • After: The turn settles without that error; an unrelated missing command still causes failure.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The patch is focused and source-correct, but supplied validation does not satisfy the required real-behavior proof gate.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: An intentional silent pause can fail an otherwise healthy Codex task while its command remains running, disrupting later continuation.
Reason: The change restores the established neutral-running contract without adding policy, configuration, state, or a competing owner.

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
Reviewed head: ec76b32e9b03110ebd2d77d6a6e0aee954e303ea

Before merge

  • Add real behavior proof - The contributor should provide redacted logs, live output, or terminal screenshots from the patched Gateway and real Codex app-server showing a confirmed running command, successful silent settlement, and same-thread continuation; redact IPs, API keys, phone numbers, and non-public endpoints. The supplied adapter tests use synthetic protocol events, and the inspected historical screenshots show a visible-answer scenario from the earlier repair. After adding proof, update the PR body, then request a new review with @clawsweeper re-review. The PR author or someone with repository write access can request it.

Findings

None.

Tests

  • Missing end-to-end proof: Missing a real Gateway/Codex run showing a silent turn with a retained command settling successfully and accepting a follow-up on the same thread.
Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

  • Retained-command terminal classification keeps the original intent (1c7c6fb: Preserve an unknown outcome for commands confirmed running rather than manufacture failed results; the later 1ea1552 refactor explicitly preserved transcript contracts.)
  • Native background outcome regression suite keeps the original intent (200c4f5: The supplied provenance records consolidation during low-value-test cleanup; this PR extends the retained suite with distinct silent-turn and missing-result failures.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 1c7c6fb adds extensions/codex/src/app-server/event-projector-tool-transcript.ts:548 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 1c7c6fb3d575; files: extensions/codex/src/app-server/event-projector-tool-transcript.ts)

PR surface

Source +5, Tests +33, Other +2. Total +40 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 8 3 +5
Tests 1 44 11 +33
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 0 +2
Total 3 54 14 +40

Preflight source

Source 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

Metric Value Why it matters
Production versus regression growth Production +8/-3 lines; tests +44/-11 lines The small classification repair reuses its existing owner; regression growth covers silent settlement, continuation, and genuine-missing negative controls.

Root-cause cluster

Relationship: same_root_cause
Canonical: #196061
Summary: This PR repairs the paired report's classification defect, extending the earlier neutral-running repair without replacing the separate completion-delivery work.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

No label changes.

Label justifications:

  • P1: The reported false failure interrupts an active Codex workflow and can prevent follow-ups while legitimate background work remains running.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 9, 2026, 10:38 AM ET / 15:38 UTC.

@obviyus

obviyus commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

Gateway proof (built candidate vs main, secretless Docker, native Codex harness vs stand-in app-server). Thread ids are fixture UUIDs.

#196062 proof: built Gateway (secretless node:24.22.1 Docker, pnpm build of exact SHAs) running the native Codex harness (openai/gpt-6.1-sol, runtime codex) against stand-in app-server harness/app-server.fixture.mjs (Codex protocol shapes cited from ../codex ddfaef91: InitializeResponse codexHome, rollout session_meta, thread/backgroundTerminals/list, unified-exec exit watcher item/completed on the original turn).
base=31a4d60036b68b59cb1511eafa6435e83f28659e (origin/main)  cand=c7381fe36b7c (PR head ec76b32e9b + merge of that main + takeover commit)
command: harness/run.sh <base|cand> <pass> <scenario>; one session agent:main:p196062 via 'openclaw agent' (Gateway RPC):
  step1 start build (native command keeps running; turn ends NO_REPLY) | step2 follow-up while running | (command completes natively) | step3 continue

base-missing-1-184615: app=thread/start,turn/start,thread/backgroundTerminals/list,thread/unsubscribe | s1 rc=1  OpenClaw recorded a native Codex tool.call without a matching tool.result before the turn completed. | s2 rc=1  Codex did not confirm unloading its previous configuration. The thread is preserved; stop competing native work and reconnect before retrying. | s3 rc=1  Codex app-server connection changed during thread preparation; reconnect before continuing
base-mixed-1-184654: app=thread/start,turn/start,thread/backgroundTerminals/list,thread/unsubscribe | s1 rc=1  OpenClaw recorded a native Codex tool.call without a matching tool.result before the turn completed. missingToolResultCount=2 | s2 rc=1  Codex thread <thread> still has background work after waiting for cleanup; stop its running work and retry. | s3 rc=1  Codex did not confirm unloading its previous configuration. The thread is preserved; stop competing native work and reconnect before retrying.
base-plain-1-184538: app=thread/start,turn/start,turn/start,turn/start,turn/start | s1 rc=0 P196062_TURN2_OK build=done  | s2 rc=0 P196062_TURN3_OK build=done  | s3 rc=0 P196062_TURN4_OK build=done 
base-retained-1-184339: app=thread/start,turn/start,thread/backgroundTerminals/list,thread/unsubscribe | s1 rc=1  OpenClaw recorded a native Codex tool.call without a matching tool.result before the turn completed. | s2 rc=1  Codex thread <thread> still has background work after waiting for cleanup; stop its running work and retry. | s3 rc=1  Codex did not confirm unloading its previous configuration. The thread is preserved; stop competing native work and reconnect before retrying.
base-retained-2-184454: app=thread/start,turn/start,thread/backgroundTerminals/list,thread/unsubscribe | s1 rc=1  OpenClaw recorded a native Codex tool.call without a matching tool.result before the turn completed. | s2 rc=1  Codex thread <thread> still has background work after waiting for cleanup; stop its running work and retry. | s3 rc=1  Codex did not confirm unloading its previous configuration. The thread is preserved; stop competing native work and reconnect before retrying.
base-visible-1-184742: app=thread/start,turn/start,thread/backgroundTerminals/list,turn/start,turn/start | s1 rc=0 Build started; it is still running in the background.  | s2 rc=0 P196062_TURN2_OK build=running  | s3 rc=0 P196062_TURN3_OK build=done 
cand-missing-1-184615: app=thread/start,turn/start,thread/backgroundTerminals/list,thread/unsubscribe | s1 rc=1  OpenClaw recorded a native Codex tool.call without a matching tool.result before the turn completed. | s2 rc=1  Codex did not confirm unloading its previous configuration. The thread is preserved; stop competing native work and reconnect before retrying. | s3 rc=1  Codex app-server connection changed during thread preparation; reconnect before continuing
cand-mixed-1-184654: app=thread/start,turn/start,thread/backgroundTerminals/list,thread/unsubscribe | s1 rc=1  OpenClaw recorded a native Codex tool.call without a matching tool.result before the turn completed. | s2 rc=1  Codex thread <thread> still has background work after waiting for cleanup; stop its running work and retry. | s3 rc=1  Codex did not confirm unloading its previous configuration. The thread is preserved; stop competing native work and reconnect before retrying.
cand-plain-1-184538: app=thread/start,turn/start,thread/unsubscribe,thread/start,turn/start,turn/start,turn/start | s1 rc=0 P196062_TURN2_OK build=done  | s2 rc=0 P196062_TURN3_OK build=done  | s3 rc=0 P196062_TURN4_OK build=done 
cand-retained-1-184339: app=thread/start,turn/start,thread/backgroundTerminals/list,turn/start,turn/start | s1 rc=1  No answer was returned. Ask again if you still need one. | s2 rc=0 P196062_TURN2_OK build=running  | s3 rc=0 P196062_TURN3_OK build=done 
cand-retained-2-184454: app=thread/start,turn/start,thread/backgroundTerminals/list,turn/start,turn/start | s1 rc=1  No answer was returned. Ask again if you still need one. | s2 rc=0 P196062_TURN2_OK build=running  | s3 rc=0 P196062_TURN3_OK build=done 
cand-visible-1-184742: app=thread/start,turn/start,thread/backgroundTerminals/list,turn/start,turn/start | s1 rc=0 Build started; it is still running in the background.  | s2 rc=0 P196062_TURN2_OK build=running  | s3 rc=0 P196062_TURN3_OK build=done 

Notes: 'No answer was returned' on cand step1 is the openclaw agent CLI's result-required notice for authored silence (src/agents/reply-completion.ts resolveReplyExpectation: non-deliverable channel -> result-required); channel turns (Discord) resolve optional. Base step1 is the false missing-result failure instead.
plain = NO_REPLY with no command: CLI empty-response retry on both sides (identical), not affected by this change.

Unit red-on-base (ocx test run-attempt.native-background-outcome.test.ts with event-projector-tool-transcript.ts from origin/main): silent retained (52627) FAILED 'expected OpenClaw recorded a native Codex tool… to be null'; 10 others pass. On cand: 11/11 pass; terminal-errors + native-audit suites pass.

@obviyus obviyus closed this Nov 25, 2026
@obviyus obviyus reopened this Nov 25, 2026
@obviyus
obviyus merged commit 9e2de2c into openclaw:main Nov 25, 2026
162 of 167 checks passed
@obviyus

obviyus commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

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.

vincentkoc added a commit that referenced this pull request Nov 25, 2026
* 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)
tideclaw-bot pushed a commit that referenced this pull request Nov 26, 2026
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]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 26, 2026
…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]>
tideclaw-bot pushed a commit that referenced this pull request Nov 29, 2026
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: codex P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XS status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Running Codex tasks stall after silent pauses; follow-ups and helper results are rejected

2 participants