Skip to content

fix(codex): unblock replies after native children finish - #175246

Merged
steipete merged 4 commits into
openclaw:mainfrom
quqi1599:fix/codex-parent-claim-recovery
Oct 19, 2026
Merged

steipete merged 4 commits into
openclaw:mainfrom
quqi1599:fix/codex-parent-claim-recovery

Conversation

@quqi1599

@quqi1599 quqi1599 commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Related: #172837

What Problem This Solves

Replies can fail with “Codex thread … is claimed by active work; stop it first” after every native child has finished, because pending completion delivery still protects the parent against the cold resume needed to receive the result.

User Impact

The parent can resume after all child results have been captured. Pending results retain delivery ownership and retry; running and resumable children, accepted submissions, and current foreground owners keep their existing protection. No configuration or migration is required.

Why This Change Was Made

Release the existing parent execution pin when every registered child is terminal, and reuse that rule when unregistering a child. Completion custody, receipts, retry budgets, successful delivery, and durable abandonment remain with their existing owners. #173018 already handles exact-assignment retirement on give-up; #173563 preserves it. This PR fixes the separate pin-timing gap, not historical exhaustion lacking durable evidence.

The human review identified three contention tests that treated the execution pin as a proxy for delivery custody. They now verify delivery admission and pending-result retention directly, including receipt arrival, retired-turn receipts, retry, and retirement while a handoff is in flight. No protection-holder taxonomy or additional lifecycle state is needed.

Original fix by @quqi1599; maintainer cleanup updates the contention contract, regression cleanup, and documentation. The focused contention-test repair is adapted from @Stronggenetics's #176177. That PR's broader catalog and completion-context changes are not superseded; #174900 also integrates this pin fix in a broader contributor proposal.

Deferred-effect facts: the pin-release decision reads the monitor's current child states and retention map synchronously, with no intervening await. Completion status/result and child/parent identities are the captured terminal facts; existing delivery checks revalidate monitor identity, requester binding, and completion custody at admission and after awaited delivery. This change adds no deferred configuration, path, limit, or authority snapshot.

Evidence

Candidate 4aa2c5c1635fa318957c02fbb2200353ffb87473 cleanly merges main 64e9443af525212642b0406fbc454727f267a68a, including CLI ratchet repair e63269c28a22a6eec7c0758d54dc6dbe674e2886. The four PR files are byte-identical to the reviewed previous head. Changed-file oxlint/oxfmt pass after the merge. Fresh exact-head CI run 39183982150 is successful: 32 jobs passed, 30 skipped, zero failures. The baseline ratchet, both changed-extension bundles, production/test types, and lint pass. No inherited-failure exception is needed. The completed ClawSweeper review covers this exact head (2026-10-19 01:42:52 UTC), reports findings=0, and retains only a proof hold. Verbatim verdict: “Codex review: needs real behavior proof before merge.” PR CI is the proof per maintainer policy; live proof and negative controls were intentionally skipped.

  • Source and history confirm the remaining pin-timing defect on main bc529a16db05b80e3baca5455e9ff6e263aed3be; no additional durable-assignment implementation is added. Native source inspected at be2951ea34f0d295ed0becf97079f92fa5f6950e: codex-rs/core/src/agent/control.rs::maybe_start_completion_watcher and multi_agent_v2_followup_task_completion_notifies_parent_on_every_turn in codex-rs/core/src/tools/handlers/multi_agents_tests.rs.
  • Regression: permits parent cold resume once every child is terminal, while preserving undelivered results. It reaches the production release guard, retains protection with a running sibling, then permits release and preserves both result retries.
  • Updated regressions: rechecks receipt while completion delivery is in flight, rechecks retired-turn-receipt while completion delivery is in flight, and rechecks retirement while completion delivery is in flight.
  • Previous-head (9b2a9c9dd64d) PR CI ran 609 tests across 39 extension test files, all passing. The parent cold-resume regression passed in 19 ms; the receipt / retired-turn-receipt / retirement contention cases passed in 16 / 9 / 3 ms. Bundle 1 ran 271 tests across 21 files (228 s job wall time); bundle 2 ran 338 tests across 18 files (243 s). CI invoked time -p node --import tsx scripts/ci-run-node-test-shard.mts with its selected plans. Production types, test types, and lint passed in jobs 117834769707, 117834769756, and 117834769748. Local tests, typechecks, live Gateway/Crabbox/Testbox proof, and production negative controls were intentionally skipped per maintainer policy. No leases were created. The case timings above are CI-reported test time, not isolated full-file wall time; no local runtime duration is claimed.
  • Changed-file oxlint passes (3 files, 231 rules, zero diagnostics), oxfmt passes (4 files), and the standard commit content/format hook passes. The borrowed formatter is 0.68.0; CI owns validation with the pinned 0.72.0 formatter. Lint uses the existing repository core rules with the unrelated UI-only Solid override omitted because the borrowed install lacks that plugin. No Codex rule is disabled. git diff --check is included.
  • Isolated Codex precommit and prescribed committed-branch autoreviews are both scoped-clean through P2, with no accepted/actionable findings. Reviews executed no repository code or tests.
  • The exact-head ClawSweeper re-review acknowledges the contention repair and successful CI, with no actionable code findings. Exactly one re-review request was posted for this head after the 20-minute post-CI window. Its live/negative-control proof request is intentionally not acted on under the explicit maintainer proof policy; the bot still displays that proof hold.

Exact numstat against the merged main base: production +15/−5, tests +104/−4, docs +5/−0 (total +124/−9). The necessary production growth is one shared terminal-aware release rule replacing the unregister-only rule; no new owner, state, exported helper, schema, or configuration was added. Unrelated deletions would obscure the fix.

Previous CI failure repaired on main

Previous-head run 39181207427 passed the Codex tests, types, lint, and docs but failed the unrelated root-help.test.ts mock-export ratchet. Main repaired it in e63269c28a22 by preserving real sub-CLI exports and removing the obsolete baseline row. The new merge commit includes that repair and triggers fresh CI; the old merge-ref run was not rerun.

@clawsweeper

clawsweeper Bot commented Oct 17, 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.

@quqi1599
quqi1599 marked this pull request as ready for review October 17, 2026 06:37
@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: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. 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 Oct 17, 2026
@clawsweeper

clawsweeper Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

Release parent execution protection once all native children finish while retaining their results for delivery and retry.

Example: Both child-a and child-b finish while their results await delivery.

  • Before: Parent cold resume fails with “claimed by active work; stop it first.”
  • After: The parent can resume while both pending results remain available for retry.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The focused patch and exact-head CI support correctness, but the required production behavior remains incompletely demonstrated.
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: Replies fail after native children finish because their pending results still prevent the parent from cold-resuming.
Reason: The focused repair restores progress while preserving protection for running and resumable children and retaining existing delivery ownership.

Merge readiness

⛔ Blocked before merge - 1 item remains

This PR fixes a current-main parent-resume deadlock with a focused change; no actionable code findings remain.

Priority: P1
Reviewed head: 4aa2c5c1635fa318957c02fbb2200353ffb87473

Before merge

  • Add real behavior proof - The regression composes the real monitor, protection registry, and release guard with mocked native transport and delivery. The Telegram backport report explicitly stops short of automatic pending-result cold-resume success, and broader-branch captures exercise additional repairs. The CI-only statement does not waive this external PR’s proof gate. Attach redacted Gateway logs, terminal output, or a recording showing terminal results retained, automatic parent cold resume succeeding, and those results consumed; redact credentials, IPs, phone numbers, and private endpoints, then request @clawsweeper re-review.

Findings

None.

Tests

  • Missing end-to-end proof: Missing production-entry-point evidence showing automatic cold resume and retained-result consumption; a red-on-base run of the new regression is also not supplied.
Agent review details

How this fits together

The Codex native-subagent monitor receives child completion notifications, manages parent subscription protection, and hands captured results to the existing completion-delivery owner.

flowchart TD
  A[Native child completion] --> B[Subagent monitor]
  B --> C[Captured pending result]
  B --> D[Parent execution protection]
  C --> E[Completion delivery and retry]
  D --> F[Parent cold resume]
  E --> F
Loading

Technical review

Best possible solution:

Keep the terminal-aware release rule in the existing monitor while preserving the existing completion-custody and retry owners.

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

Source inspection establishes the circular dependency between pending child delivery and the protected-parent cold-resume guard; no target code was executed during this read-only review.

Is this the best way to solve the issue?

The patch is the smallest complete repair for pin timing: it uses existing terminal state and protection ownership without introducing a protection taxonomy or changing delivery authority.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 28212a985c15.

Provenance checked

  • Parent subscription protection changes intended behavior with a stated reason (5a79d19: Keep parent subscriptions alive while unfinished native children can announce completion after the foreground turn ends.)
  • Completion custody and recovery keeps the original intent (41784ac: Preserve distinct assignment results and delivery ownership through parent rotation, recovery, receipts, and asynchronous cleanup.)
  • In-flight contention assertions changes intended behavior with a stated reason (6652f7e: Retain native execution and completion ownership after removing the Tasks runtime; the previous assertions used the parent pin as a custody proxy.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source +10, Tests +100, Docs +5. Total +115 across 4 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 1 15 5 +10
Tests 2 104 4 +100
Docs 1 5 0 +5
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 124 9 +115

Labels

Label changes:

No label changes.

Label justifications:

  • P1: A real Codex parent workflow can remain blocked after all native children finish, preventing subsequent replies.
  • 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.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Provide a production-entry-point capture of automatic parent cold resume consuming the retained child result.

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.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-17T06:55:44.194Z sha 30f0b3a :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-19T00:39:21.368Z sha 9b2a9c9 :: needs real behavior proof before merge. :: none

Reviewed October 18, 2026, 9:42 PM ET / October 19, 2026, 01:42 UTC (Revision 3).

Copy link
Copy Markdown

Field report: we applied a minimal local backport of this PR's monitor change (head 30f0b3a6b17e65641872aba27f3c9eb3f219716e) to OpenClaw 2026.10.10-beta.1, using the native Codex harness with Telegram, and restarted the Gateway.

It appears to be helping in normal use. The previously affected agent has resumed work. Its subsequent report confirmed receipt and consumption of a native child's result, and a later read-only check showed it actively executing code inspections and browser checks, rather than remaining stuck at the previous claimed by active work boundary.

Validation and limits:

  • An isolated harness using the installed monitor/registry/release-guard bodies passed 13 cases, including preservation of pending results and protection of unfinished siblings. Transport and delivery were simulated.
  • A real automatic completion probe successfully started the parent runtime without the previous claim rejection, but subsequently failed with agent harness host capability is no longer active. Its expected final output was therefore not verified.
  • The initial recovery of the affected agent's saved review was an explicit manual follow-up; that recovery is not proof of automatic cold-resume delivery.
  • This installation also has a separate context-forwarding hotfix discussed in Session controller: carry subagent completion results into plugin-harness turns #167276, so this is not a clean single-change A/B result.

Thanks for the focused fix. Our current assessment is positive operational feedback, not yet a complete end-to-end pass for pending-result cold resume.

@alfredjbclaw

Copy link
Copy Markdown
Contributor

Thanks for the focused fix. One concern before merge: this change appears to break an existing custody contract, and PR CI did not run the test that guards it.

What fails. extensions/codex/src/app-server/native-subagent-completion-delivery.contention.test.ts → native completion settlement > rechecks {receipt, retired-turn-receipt, retirement} while completion delivery is in flight. All three cases fail on the first expect(releasePin).not.toHaveBeenCalled():

× rechecks receipt while completion delivery is in flight
  → expected "vi.fn()" to not be called at all, but actually been called 1 times
× rechecks retired-turn-receipt while completion delivery is in flight
× rechecks retirement while completion delivery is in flight
Tests  3 failed | 1 passed (4)

The test states the invariant directly: "A receipt cannot release custody still owned by the accepted delivery." With this patch, processCompletion releases the parent pin before deliverPending. The pin is gone while the accepted delivery is still in flight and while its retry is pending.

Why CI was green. The changed-extensions bundles (jobs 117332412490 / 117332412463 in run 39010615187) did not select the contention test file. The codex app-server files they ran are listed in the job logs; native-subagent-completion-delivery.contention.test.ts is not among them.

Scope of this evidence. I ran the test on the 2026.10.3 source with this PR's exact monitor change transplanted in (the asserted block is unchanged on current main). I have not run it on the PR head. Running the file on the PR head should confirm or refute it quickly.

Possible direction. The circular wait is real: the parent pin waits for delivery to settle, and the delivery's own cold resume is refused because of that pin. One way to break it without dropping custody is to type each protection holder:

  • native-work, which blocks replacement as today;
  • delivery-custody, which keeps the pin but does not block the parent's own next turn.

The monitor would mark its pin as delivery-custody only when every child for that parent is terminal and an accepted completion is being delivered. It would unmark if a new child registers. Admission would then require no native-work holder, plus no claim or the exact finished foreground owner's deferred release. Generation would be rechecked after each await. That is in the same spirit as #172145, which separates child subscription custody from foreground turn authority. I have a working version of this against 2026.10.3, with real-module regressions, and can share it if useful.

Related: a large share of these cold resumes seem to come from spurious warm-reuse misses on completion turns (#153354, #171954). Fixing those reduces how often the guard is reached at all.

steipete and others added 2 commits October 18, 2026 17:20
Keep the focused terminal-child parent-pin fix and update contention
regressions to verify live delivery admission and retained results directly.
Clean up the new boundary fixture and document parent resume behavior.

Related: openclaw#172837
Original parent-pin fix by @quqi1599 in openclaw#175246. Contention assertions
adapted from @Stronggenetics in openclaw#176177. Durable abandonment from openclaw#173018
remains unchanged. Live proof intentionally skipped; PR CI owns runtime proof.

Co-authored-by: quqi1599 <[email protected]>
Co-authored-by: Stronggenetics <[email protected]>
@steipete

Copy link
Copy Markdown
Contributor

Updated at 9b2a9c9dd64d324e480ab006e47ebd13aa36ba0e after merging current main. The human contention finding is addressed: the three cases now assert live delivery admission, pending result retention, retries, and retirement independently from parent execution protection. The focused test adaptation credits @Stronggenetics; @quqi1599's production fix remains intact.

Changed-file lint/format and isolated P0–P2 autoreviews pass. The body records exact scope, LOC, remaining issue aspects, and validation limits. PR CI is the proof per maintainer policy; live Gateway, leases, local suites/typechecks, and production negative controls were intentionally skipped.

@clawsweeper re-review

@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Oct 19, 2026
@clawsweeper

clawsweeper Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@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. labels Oct 19, 2026
@steipete

Copy link
Copy Markdown
Contributor

Main typecheck regression found while attributing Gateway PR #176814:

native-subagent-monitor.parent-retention.test.ts:37 passes
completionDeliveryRetryDelaysMs, but that private MonitorOptions member was
removed in #176686. The newly added test in this PR still contains the old option.

Exact CI job 117862036438
reports TS2353 on that literal. A focused native typecheck on clean main checkout
aeeed69e7d46a6b5c85304f63a382e3966e53969 reproduces exactly that diagnostic
(23.17 seconds), retaining the extension lane's existing ambient declarations and
selecting only this test root. The test and monitor-type inputs are byte-identical
to the CI main baseline fecdb0fb6aa265dba8cb6277bb5f190079debad7, tested merge,
and observed main 4317598f2fb1ec0ff3e7dc25ffb3be02d0261962.

Reporting to the owning Codex area; the Gateway cleanup changes none of these
extension files. No retry option is being restored and no test assertion weakened.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 19, 2026
…5246)

* fix(codex): resume replies while child results await delivery

* fix(codex): preserve delivery custody after parent pin release

Keep the focused terminal-child parent-pin fix and update contention
regressions to verify live delivery admission and retained results directly.
Clean up the new boundary fixture and document parent resume behavior.

Related: openclaw#172837
Original parent-pin fix by @quqi1599 in openclaw#175246. Contention assertions
adapted from @Stronggenetics in openclaw#176177. Durable abandonment from openclaw#173018
remains unchanged. Live proof intentionally skipped; PR CI owns runtime proof.

Co-authored-by: quqi1599 <[email protected]>
Co-authored-by: Stronggenetics <[email protected]>

---------

Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Stronggenetics <[email protected]>
Co-authored-by: quqi1599 <[email protected]>
enki added a commit to enki/openclaw-public that referenced this pull request Oct 19, 2026
Adapt the focused fix and two-child cold-resume regression from openclaw#175246. Keep pending completion custody and verify it through admitted child execution.

Co-authored-by: quqi1599 <[email protected]>
steipete added a commit that referenced this pull request Oct 25, 2026
* fix(codex): preserve parents across private core-tool transitions

* fix(codex): defer tool catalog changes under native work

* test(codex): align lifecycle fixtures with stable tool declarations

* fix(codex): validate retained catalog executors and receipts

* fix(codex): keep catalog adapters typed and cycle free

* test(codex): assert completion guards at invocation

* test(codex): launch isolated adapter fixture with Node under Bun

* fix(codex): validate accepted catalog execution and receipts

* fix(codex): preserve complete per-turn conversation context

* fix(codex): preserve steering media roots and handoff fixtures

* test(codex): consolidate accepted catalog executor regressions

* fix(codex): repair accepted catalog recovery and preparation

Adapt the scoped fingerprint and surviving executor cohort corrections from #176177 while retaining in-place projection and receipt guards.

Co-authored-by: Stronggenetics <[email protected]>

* fix(agents): preserve native completion input admission

Adapt completion context projection and optional System native hooks from #176177. Preserve required admission and strict lifecycle fixture assertions.

Co-authored-by: Stronggenetics <[email protected]>

* fix(codex): release parent protection after children finish

Adapt the focused fix and two-child cold-resume regression from #175246. Keep pending completion custody and verify it through admitted child execution.

Co-authored-by: quqi1599 <[email protected]>

* fix(codex): preserve clients after busy preflight refusal

Use the existing preflight rejection contract for claimed or protected threads, as proposed in #176177. Preserve abort and transport retirement.

Co-authored-by: Stronggenetics <[email protected]>

* test(codex): answer repeated settlement policy reads

* fix(codex): join assignment publication before completion delivery

* docs(codex): clarify nonrelay creation-policy retention

* fix(codex): preserve first reply after app discovery

Leave tool-disabled discovery transitions with the existing lifecycle owner and preserve strict native catalog validation. Align continuity fixtures with persisted native metadata and the optional hook-policy preflight.

* test(codex): keep the preflight cursor local

---------

Co-authored-by: Ricardo Almeida <[email protected]>
Co-authored-by: Stronggenetics <[email protected]>
Co-authored-by: quqi1599 <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: Paul Bohm <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 26, 2026
…aw#174900)

* fix(codex): preserve parents across private core-tool transitions

* fix(codex): defer tool catalog changes under native work

* test(codex): align lifecycle fixtures with stable tool declarations

* fix(codex): validate retained catalog executors and receipts

* fix(codex): keep catalog adapters typed and cycle free

* test(codex): assert completion guards at invocation

* test(codex): launch isolated adapter fixture with Node under Bun

* fix(codex): validate accepted catalog execution and receipts

* fix(codex): preserve complete per-turn conversation context

* fix(codex): preserve steering media roots and handoff fixtures

* test(codex): consolidate accepted catalog executor regressions

* fix(codex): repair accepted catalog recovery and preparation

Adapt the scoped fingerprint and surviving executor cohort corrections from openclaw#176177 while retaining in-place projection and receipt guards.

Co-authored-by: Stronggenetics <[email protected]>

* fix(agents): preserve native completion input admission

Adapt completion context projection and optional System native hooks from openclaw#176177. Preserve required admission and strict lifecycle fixture assertions.

Co-authored-by: Stronggenetics <[email protected]>

* fix(codex): release parent protection after children finish

Adapt the focused fix and two-child cold-resume regression from openclaw#175246. Keep pending completion custody and verify it through admitted child execution.

Co-authored-by: quqi1599 <[email protected]>

* fix(codex): preserve clients after busy preflight refusal

Use the existing preflight rejection contract for claimed or protected threads, as proposed in openclaw#176177. Preserve abort and transport retirement.

Co-authored-by: Stronggenetics <[email protected]>

* test(codex): answer repeated settlement policy reads

* fix(codex): join assignment publication before completion delivery

* docs(codex): clarify nonrelay creation-policy retention

* fix(codex): preserve first reply after app discovery

Leave tool-disabled discovery transitions with the existing lifecycle owner and preserve strict native catalog validation. Align continuity fixtures with persisted native metadata and the optional hook-policy preflight.

* test(codex): keep the preflight cursor local

---------

Co-authored-by: Ricardo Almeida <[email protected]>
Co-authored-by: Stronggenetics <[email protected]>
Co-authored-by: quqi1599 <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: Paul Bohm <[email protected]>
RomneyDa pushed a commit that referenced this pull request Oct 26, 2026
* fix(codex): resume replies while child results await delivery

* fix(codex): preserve delivery custody after parent pin release

Keep the focused terminal-child parent-pin fix and update contention
regressions to verify live delivery admission and retained results directly.
Clean up the new boundary fixture and document parent resume behavior.

Related: #172837
Original parent-pin fix by @quqi1599 in #175246. Contention assertions
adapted from @Stronggenetics in #176177. Durable abandonment from #173018
remains unchanged. Live proof intentionally skipped; PR CI owns runtime proof.

Co-authored-by: quqi1599 <[email protected]>
Co-authored-by: Stronggenetics <[email protected]>

---------

Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Stronggenetics <[email protected]>
Co-authored-by: quqi1599 <[email protected]>
(cherry picked from commit 4caee42)
RomneyDa pushed a commit that referenced this pull request Oct 26, 2026
* fix(codex): resume replies while child results await delivery

* fix(codex): preserve delivery custody after parent pin release

Keep the focused terminal-child parent-pin fix and update contention
regressions to verify live delivery admission and retained results directly.
Clean up the new boundary fixture and document parent resume behavior.

Related: #172837
Original parent-pin fix by @quqi1599 in #175246. Contention assertions
adapted from @Stronggenetics in #176177. Durable abandonment from #173018
remains unchanged. Live proof intentionally skipped; PR CI owns runtime proof.

Co-authored-by: quqi1599 <[email protected]>
Co-authored-by: Stronggenetics <[email protected]>

---------

Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Stronggenetics <[email protected]>
Co-authored-by: quqi1599 <[email protected]>

Release adaptation: the stable child-unregister path keeps its thread-status revision collection after the shared terminal-children release helper. Tests drop the main-only listPendingChildren probes; delivery results still prove retained completions.

(cherry picked from commit 4caee42)
RomneyDa pushed a commit that referenced this pull request Oct 26, 2026
* fix(codex): resume replies while child results await delivery

* fix(codex): preserve delivery custody after parent pin release

Keep the focused terminal-child parent-pin fix and update contention
regressions to verify live delivery admission and retained results directly.
Clean up the new boundary fixture and document parent resume behavior.

Related: #172837
Original parent-pin fix by @quqi1599 in #175246. Contention assertions
adapted from @Stronggenetics in #176177. Durable abandonment from #173018
remains unchanged. Live proof intentionally skipped; PR CI owns runtime proof.

Co-authored-by: quqi1599 <[email protected]>
Co-authored-by: Stronggenetics <[email protected]>

---------

Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Stronggenetics <[email protected]>
Co-authored-by: quqi1599 <[email protected]>

(cherry picked from commit 4caee42)

Adapted for 2026.9.x: the terminal-child parent-pin release is applied to 9.x's applyNativeReceipts call site and unregisterChild, keeping 9.x's collectThreadStatusRevision call. listPendingChildren assertions are dropped from the contention and parent-retention tests (no such 9.x API); the retained-result and delivery assertions remain. The f9da044 test follow-up is not needed because 9.x still accepts completionDeliveryRetryDelaysMs.
RomneyDa added a commit that referenced this pull request Oct 28, 2026
* fix(codex): preserve parents across private core-tool transitions

* fix(codex): defer tool catalog changes under native work

* test(codex): align lifecycle fixtures with stable tool declarations

* fix(codex): validate retained catalog executors and receipts

* fix(codex): keep catalog adapters typed and cycle free

* test(codex): assert completion guards at invocation

* test(codex): launch isolated adapter fixture with Node under Bun

* fix(codex): validate accepted catalog execution and receipts

* fix(codex): preserve complete per-turn conversation context

* fix(codex): preserve steering media roots and handoff fixtures

* test(codex): consolidate accepted catalog executor regressions

* fix(codex): repair accepted catalog recovery and preparation

Adapt the scoped fingerprint and surviving executor cohort corrections from #176177 while retaining in-place projection and receipt guards.

Co-authored-by: Stronggenetics <[email protected]>

* fix(agents): preserve native completion input admission

Adapt completion context projection and optional System native hooks from #176177. Preserve required admission and strict lifecycle fixture assertions.

Co-authored-by: Stronggenetics <[email protected]>

* fix(codex): release parent protection after children finish

Adapt the focused fix and two-child cold-resume regression from #175246. Keep pending completion custody and verify it through admitted child execution.

Co-authored-by: quqi1599 <[email protected]>

* fix(codex): preserve clients after busy preflight refusal

Use the existing preflight rejection contract for claimed or protected threads, as proposed in #176177. Preserve abort and transport retirement.

Co-authored-by: Stronggenetics <[email protected]>

* test(codex): answer repeated settlement policy reads

* fix(codex): join assignment publication before completion delivery

* docs(codex): clarify nonrelay creation-policy retention

* fix(codex): preserve first reply after app discovery

Leave tool-disabled discovery transitions with the existing lifecycle owner and preserve strict native catalog validation. Align continuity fixtures with persisted native metadata and the optional hook-policy preflight.

* test(codex): keep the preflight cursor local

---------

Co-authored-by: Ricardo Almeida <[email protected]>
Co-authored-by: Stronggenetics <[email protected]>
Co-authored-by: quqi1599 <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: Paul Bohm <[email protected]>

(cherry picked from commit c853069)

Co-authored-by: Stronggenetics <[email protected]>
Co-authored-by: quqi1599 <[email protected]>
Co-authored-by: Ricardo Almeida <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: Paul Bohm <[email protected]>
(cherry picked from commit fc45a245649396b047de614842c5ec72cda3bc43)
RomneyDa pushed a commit that referenced this pull request Oct 28, 2026
* fix(codex): preserve parents across private core-tool transitions

* fix(codex): defer tool catalog changes under native work

* test(codex): align lifecycle fixtures with stable tool declarations

* fix(codex): validate retained catalog executors and receipts

* fix(codex): keep catalog adapters typed and cycle free

* test(codex): assert completion guards at invocation

* test(codex): launch isolated adapter fixture with Node under Bun

* fix(codex): validate accepted catalog execution and receipts

* fix(codex): preserve complete per-turn conversation context

* fix(codex): preserve steering media roots and handoff fixtures

* test(codex): consolidate accepted catalog executor regressions

* fix(codex): repair accepted catalog recovery and preparation

Adapt the scoped fingerprint and surviving executor cohort corrections from #176177 while retaining in-place projection and receipt guards.

Co-authored-by: Stronggenetics <[email protected]>

* fix(agents): preserve native completion input admission

Adapt completion context projection and optional System native hooks from #176177. Preserve required admission and strict lifecycle fixture assertions.

Co-authored-by: Stronggenetics <[email protected]>

* fix(codex): release parent protection after children finish

Adapt the focused fix and two-child cold-resume regression from #175246. Keep pending completion custody and verify it through admitted child execution.

Co-authored-by: quqi1599 <[email protected]>

* fix(codex): preserve clients after busy preflight refusal

Use the existing preflight rejection contract for claimed or protected threads, as proposed in #176177. Preserve abort and transport retirement.

Co-authored-by: Stronggenetics <[email protected]>

* test(codex): answer repeated settlement policy reads

* fix(codex): join assignment publication before completion delivery

* docs(codex): clarify nonrelay creation-policy retention

* fix(codex): preserve first reply after app discovery

Leave tool-disabled discovery transitions with the existing lifecycle owner and preserve strict native catalog validation. Align continuity fixtures with persisted native metadata and the optional hook-policy preflight.

* test(codex): keep the preflight cursor local

---------

Co-authored-by: Ricardo Almeida <[email protected]>
Co-authored-by: Stronggenetics <[email protected]>
Co-authored-by: quqi1599 <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: Paul Bohm <[email protected]>

Bounded adaptation: six strict run-attempt ordering expectations only (eight physical-client sequences); split invalid-image expectations adapted. No production, catalog or private-context hunks replayed. Canonical final-p1-r0-c85306952ac7 remains NOT fully implemented.

Adapted-from: c853069
yehezkel-assistant Bot pushed a commit to razshlomo/openclaw that referenced this pull request Nov 2, 2026
…5246)

Backport quqi1599 and maintainer changes from openclaw#175246 (4caee42). Adapt the terminal transition to the 2026.10.7 markTerminalRevision owner and prove retained results through delivery because this release has no listPendingChildren API.

Preserve running and interrupted child protection, release terminal parent execution pins, and retain pending result delivery custody. Focused source and built-artifact regression checks pass. Independent review reported no actionable findings.
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 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: S 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.

4 participants