Skip to content

fix(codex): steer busy sessions and unblock thread handoffs - #174967

Closed
enki wants to merge 19 commits into
openclaw:mainfrom
enki:fix/codex-steering-consumption-timeout
Closed

enki wants to merge 19 commits into
openclaw:mainfrom
enki:fix/codex-steering-consumption-timeout

Conversation

@enki

@enki enki commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Closed after consolidation: the useful lifecycle repairs landed in #177698; its human-steering/current-peer-scheduling boundary is the selected direction. The broader peer-routing proposal in this historical branch is not being pursued. Exact-thread closure remains tracked separately in open #180204. This closure does not claim the broader peer proposal was implemented.

Messages and peer results sent to a busy agent can wait behind the work that needs them, while an exact-thread handoff can wait indefinitely for a Codex process retained by another session. This routes busy peer input through the existing active queue, preserves its original source identity across recovery, and waits for the retired thread rather than requiring its entire process to exit.

User Impact

An eligible busy recipient accepts compatible ordinary messages and explicit followup into its active input queue and confirms transcript persistence, without promising a separate completion. Origin or destination-policy mismatches retain separately authorized new-turn admission; explicit steering still rejects mismatches. An idle recipient starts a turn and can return a correlated completion. Self-send, paused-child resume, provenance/display, generation checks, and native writer locking retain their existing owners. Accepted input stays in receiver custody; RPC acknowledgment is not transcript-consumption proof, and confirmation waits settle within their existing request budget.

Two related delivery failures are also repaired: a captured receiver that finishes before admission can retain the ordinary follow-up path after source revalidation, and fresh native child input uses internal completion rather than requiring the child to have a messaging tool.

Why This Change Was Made

Reuse the recipient’s active queue for dependency input, preserve the original source identity during recovery, and release only the exact retired native thread before handoff. Known receiver settlement before admission must remain distinct from an authority refusal; native child follow-ups must retain their existing internal completion owner.

Settled post-consolidation direction

#177698 merged as f83b7ade15f3aefad7b367bef084ea5ffdbd9f8b. The selected direction is supported Codex-style human steering, preserving current peer-mail behavior because the native app-server API does not expose Codex’s peer mailbox. Ordinary peer sends, returned results and explicit followup keep separate-turn scheduling and correlated replies. Peers are not relabeled as human input.

The consolidation includes this branch’s original-source, native child/result routing and ACK/custody fixes. Its accepted bounded completion-context policy permits compatible same-requester human input while retaining execution policy and independently checking the incoming authority. The separate exact-thread closure follow-up is #180204.

The broader busy-peer/followup behavior described in this historical branch is not the selected follow-up direction. It is not being presented as a missing human-steering repair or requested as another scheduling decision. A local conflict-repair candidate was prepared but remains unpublished because it changes that peer contract. The implementation and evidence below describe the historical proposal, not the policy landed by #177698.

Current human-steering follow-ups are #180228, #176972 and the separately scoped optional embedded-work proposal #176245. Their exact scopes, runtime limits and review gates remain in their own descriptions.

Evidence

Current upstream integration and durable steering

Head 2656d7eab75b472a642f2a261028bfd65617d236 merges previous public head e2bdba716822faadd21508f8b0e2ff98fd425b18 with pinned upstream 0cd30da1a3483f7358a7364cba2f1f7133f25a06, preserving both histories and resolving all five conflicts. It adopts #176587's durable steering/restart contract while retaining the proposed busy ordinary/explicit-followup routing. Active sends wait for transcript persistence; the sender's reply-wait budget does not weaken the admission deadline. Unsupported durable steering is rejected before injection and takes exactly one durable queued path.

The additional agent-step caller now carries the existing durable Gateway operation into active delivery and uses the returned fallback operation. Its regression traverses the actual communication, continuation and controller owners: zero volatile injections, one durable returned-result admission, original source/recipient generations, selected requester identity, provenance and one input idempotency key. Removing that production propagation makes the regression fail at the missing returned admission; restoring it passes. Accepted-unconfirmed input still never replays.

The real-loop steering matrix holds a provider response past the reply-wait budget, proves no premature durable acknowledgement, then releases it and verifies one persisted attributed input without another turn. It covers explicit followup as well as ordinary/explicit steering and own-child delivery. The earlier Codex confirmation timer fix remains unchanged: caller waiting can expire while accepted batches retain receiver custody until late consumption or exact run closure.

177 focused checks across nine suites pass, including native confirmation/late-consumption custody and the corrected retained-peer fixture. Core production and four owning test type graphs, scoped typed lint/format, unchanged mock/assertion/line-limit ratchets, the production build, and fresh independent P0–P2 review pass. The fixture counts transcript messages separately from their session header; no assertion or baseline is weakened. No new queue, store or authority grant is introduced.

The following is historical validation of the broader peer proposal, not evidence for the selected post-consolidation direction. Real final-native-effect proof for the selected retained requester, unselected identity and revocation during awaited preparation, exact-candidate upgrade and security-owner approval were not completed. Historical runtime captures remain revision-qualified; no new peer-scheduling deployment or upstream merge is claimed.

Shared storage and upgrade evidence (source-qualified)

The ordinary latest-stable upgrade recorded for #174900 executed its separately packed bed06fcbbbacc466799185b045611a023a633a89 candidate, not this standalone binary. Official v2026.10.5 state crossed agent schema 25→31 and shared schema 20→28, preserving 23 checked identity fields across two sessions, all six prior transcript rows, and the named settings through the documented model-reference migration. Forty-seven inspected migration, session, history and configuration files are byte-identical here. All 48 existing inspected files match this PR's actual upstream parent; its current fda7e371431bea0136c95f5a853fd1ceb7ad9b7d and reviewed 2656d7eab75b472a642f2a261028bfd65617d236 have identical complete source trees.

The different native record codec and this branch's absent catalog-v3 feature are excluded from reuse. This is named-owner compatibility evidence, not complete transitive or compiled-artifact equivalence. It does not establish this standalone's active authority, pending recovery, steering, native handoff or whole-binary upgrade. The linked capture's failed attempts, Doctor warnings, uninstrumented individual native exit statuses, backup limitations and model/provider-identity qualifications remain; no semantic model or external-provider compatibility is inferred. Those historical authority scenarios were not completed; the broader peer proposal is outside the selected direction.

Prior upstream integration — 701a1dec

Head 701a1dec571ddc83135556d535d6bba81617694d merges pinned upstream 550c55a807016cef74550ef3ebfb788022056349 into the published 1faeec0fa56bf4212470fe98f84d3d4077cd04b5 candidate. This specifically integrates the overlapping original-request reply-admission changes from #176697 and independent continuation custody from #176769. It does not restore retired queue maps, old target modules, finished tool authority, or a parent recovery claim that upstream deliberately separated from independent continuation ownership.

A completed peer's result now uses the original accepted send's host-held reply admission, exact source and recipient session incarnations/lifecycle revisions, current communication policy, and independently retained live operator authority. The busy-recipient path consumes that prepared admission through the existing active queue. Delivery routing continues to use the canonical logical store identity; the communication reader's physical database path is not reused as a controller scheduling scope. Only the selected requester identity survives the sender's finished invocation; operational run, receipt, full-permission override, approval handles and tool grants do not. Default cleanup and private child completion keep their existing owners. Selected participant scope intersection, device/source revocation, release and Gateway replacement remain enforced.

The actual detached reply-flow regression is red with the pinned upstream runAgentStep: after a genuine accepted original request, it dispatches another agent turn instead of steering the busy requester. With the fix, accepted and unconfirmed results enter the busy requester's input once, and the receiver can persist its attributed transcript record after forwarding custody ends. Replaced recipients and lifecycle changes remain rejected. The new focused spec uses real endpoint reads, storage, communication admission, original acceptance and continuation ownership; only the Gateway transport response, backend queue and participant observation are fixtures. The upstream five-route original-endpoint/reply-policy matrix remains intact. Two redundant whole-sentence description assertions were removed; generated prompt snapshots still own exact wording.

409 focused tests pass across 26 files. Coverage includes native accepted-versus-consumed steering, exact-thread release, native child completion, recovery source preservation, original-send admission, requester/source/receiver revocation, independent continuation custody, selected participants, FIFO settlement and persistence after sender release. Acceptance is not consumption, and indeterminate delivery is never replayed.

Production core, Codex and owning agent/Gateway test type graphs pass, as do scoped typed lint, formatting, changed-source line-cap growth, generated prompt snapshots and import-cycle checks. The canonical production build passes (3m 10.3s). Fresh independent P0–P2 review found no actionable code defect. Exact current-head native/provider consumption and stable upgrade were not rerun. Earlier captures below remain revision-qualified; these synthetic owner tests do not close that runtime gap or confer enforced security approval.

The change retains the existing delivery, communication, continuation and lifecycle owners, with no new manager, schema, cache or public configuration. The broader busy-peer proposal remains outside the selected post-consolidation direction described above. Exact-head hosted CI and the required security-owner approval remain separate gates; prior-head CI is not substituted.

Earlier synthetic runtime evidence and its limits

Earlier matching combined local builds, rather than this exact public binary, exercised an isolated authenticated Gateway with real Codex 0.163.0 and an external provider. They observed a busy recipient consuming a followup marker in its own provider final, an attributed worker result reaching the busy requester before its provider final, and receiver settlement falling back once to the same physical conversation. Reset after generation preparation rejected the stale delivery, with no marker written to the original transcript or steered into the original native turn.

An exact native handoff capture closed the retired target thread, then resumed it in the successor process while the old process retained a readable idle sibling. A stable-version synthetic upgrade used the stable CLI to write state, stopped that Gateway, ran canonical candidate Doctor migration, and preserved the session ID, transcript count and marker. This PR adds no schema. These remain revision-qualified historical proofs; they were not rerun on this integration.

A separate observed-ready saved-child run resumed the same physical child on a distinct run and returned its fresh provider-final marker through the parent's real sessions_send result. It did not enumerate the child's dynamic catalog or directly map the child session to a native thread. Exact message-less catalog/availability behavior remains supported by the separate controlled owner tests, not that external-provider capture.

All examples and test receipts are synthetic. No private logs, credentials, connection details, native identifiers, or real user data are published. The operator's combined local deployment and its RPC/plugin health checks are operational evidence, not proof of this exact PR binary or every historical queueing failure. This integration's real external-provider consumption and upgrade paths remain unrun.

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

@enki
enki marked this pull request as ready for review October 17, 2026 02:02
@enki

enki commented Oct 17, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper review

The current head is ready for review. The PR body records the failing-before/passing-after synthetic production-client regression, targeted checks, and independent review. This bounds acknowledgement-without-consumption waiting while retaining accepted custody; it does not claim to repair native-app pending-state recovery.

@clawsweeper

clawsweeper Bot commented Oct 17, 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. P2 Normal backlog priority with limited blast radius. 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. 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

Routes compatible busy-session messages and peer results into active input queues, bounds Codex confirmation waits, and releases handoffs after exact-thread closure.

Example: Send sessions_send with mode="followup", timeoutSeconds=30, and message="Dependency is ready" to a compatible busy session.

  • Before: A separate turn waits behind the recipient's current work and can return its own correlated completion.
  • After: The input joins the active run, acknowledges transcript persistence, and promises no separate completion.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful repairs with substantial owner-level regression coverage and no definite code finding, limited by an unresolved product contract and unproven final authority effects.
Proof confidence 🦐 gold shrimp (3/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Product

Kind: Bug fix · Worth it: Needs a maintainer decision · Fix scope: Complete
User problem: Dependency messages and returned peer results can wait behind the work that needs them, and a retained sibling process can stall a native thread handoff.
Reason: The liveness repairs have concrete value, but busy explicit followup deliberately overrides an established completion contract without owner approval.

Merge readiness

⛔ Blocked before merge - 5 items remain

This PR contains useful delivery and handoff repairs that remain absent from current main; no definite introduced code defect was found, but the explicit-followup contract needs an owner decision.

Priority: P2
Reviewed head: 2656d7eab75b472a642f2a261028bfd65617d236
Owner decision: Required. See Decision needed.

Decision needed

  • Question: Should busy explicit followup lose its separate-turn and correlated-completion guarantee in favor of active input admission?
  • Recommendation: Preserve explicit followup: Keep followup as a separately admitted turn and retain the focused busy-message, returned-result, confirmation, and handoff repairs.
  • Why: The earlier owner decision preserved this escape hatch; the PR acknowledges the compatibility cost and supplies a rationale, but no owner has accepted the new contract.

Before merge

  • Add real behavior proof - Authority-chain proof required: show selected Bob delivering a detached peer result through communication, continuation, controller, and Codex owners into native/provider input; reject unselected Alice and revoke Bob during awaited preparation before native I/O. Current owner tests stop at mocked queues or callbacks, and historical combined-build captures predate this authority transfer. Include delayed consumption after confirmation expiry and fresh-install/latest-stable upgrade evidence preserving existing sessions and settings; provide redacted terminal output or logs without IPs, API keys, phone numbers, or non-public endpoints. 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.
  • Resolve security concern: Verify retained identity at native delivery - The new runWithRequester path survives the original invocation. Existing tests establish selection and revocation at intermediate owners, but do not demonstrate that unselected Alice or Bob revoked during awaited preparation is rejected before native/provider input.
  • Resolve merge risk - Obtain current-revision security-owner approval for retaining selected requester identity beyond the originating tool invocation.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.

Findings

  • [medium] Verify retained identity at native delivery — src/gateway/server-plugin-in-process-authority.ts:241

Tests

  • Missing end-to-end proof: Supply production-native allowed, unselected, and mid-preparation revocation controls for retained requester delivery, delayed-consumption custody, and fresh-install/latest-stable upgrade validation with existing sessions and settings preserved.
Agent review details

How this fits together

Session tools pass attributed messages through communication admission, retained requester authority, and the session controller to embedded or Codex execution; receivers own persistence and consumption, while native thread lifecycle controls handoffs.

flowchart TD
A[Session message or peer result] --> B[Communication admission]
B --> C[Retained requester authority]
C --> D[Session controller]
D --> E[Active receiver input]
D --> F[Durable queued turn]
E --> G[Transcript and native input]
F --> G
Loading

Technical review

Best possible solution:

Repair busy peer delivery, confirmation settlement, and exact-thread handoff through existing owners while preserving separate-turn explicit followup unless its owner approves the contract change.

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

Current-main source shows returned peer results starting another turn and cross-client handoff awaiting process exit despite sibling leases; the supplied regressions target those paths, but this read-only review ran no target code.

Is this the best way to solve the issue?

The repairs reuse communication, controller, continuation, and native lifecycle owners; changing explicit followup is broader than the liveness fix and should remain a separate owner choice.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 11d0c854192d.

Merge-risk options

Maintainer options:

  1. Complete security review on this revision (recommended)
    Have the security owner assess the retained-requester transfer and approve the current revision after the required authority evidence is supplied.
  2. Separate the authority transfer
    Pause the retained-requester portion and present independently useful Codex confirmation and handoff repairs as a narrower change.

Provenance checked

  • Busy-session routing and explicit followup changes intended behavior with a stated reason (9b5b439: Default zero-wait own-child guidance gained steering while explicit followup remained the separate-turn escape hatch.)
  • Returned peer-result delivery keeps the original intent (bf76b0c: Returned results use original accepted-request admission, exact endpoint generations, and optional reply expectations rather than new reverse-direction permission.)
  • Requester continuation authority keeps the original intent (d0dcc9d: Multi-person turns must act for the selected participant under that person's authority; later continuation work must retain current policy independently of the finished invocation.)
  • Retired native owner handoff changes intended behavior with a stated reason (94fc081: Process-exit waiting protected native writer ownership; cancellation released a stranded wait without authorizing a successor write.)
  • Codex steering deadlines keeps the original intent (5e2fec2: An unanswered turn/steer RPC must not strand the control lane; this PR additionally bounds post-acknowledgment confirmation without withdrawing receiver custody.)
  • Durable steering acknowledgment keeps the original intent (2d9033c: Acknowledged guidance must be persisted, with unsupported backends using the existing durable queued-delivery owner.)

Testing

Proof path: in-process harness.

Security

Needs attention: The retained requester transfer needs final-effect evidence and current security-owner approval; source inspection established no concrete authorization bypass.

Evidence

Security concerns:

  • [medium] Verify retained identity at native delivery — src/gateway/server-plugin-in-process-authority.ts:241
    The new runWithRequester path survives the original invocation. Existing tests establish selection and revocation at intermediate owners, but do not demonstrate that unselected Alice or Bob revoked during awaited preparation is rejected before native/provider input.
    Confidence: 0.96

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit e3ce08c adds extensions/codex/src/app-server/attempt-steering.ts:223 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: e3ce08cd5ec1; files: extensions/codex/src/app-server/attempt-steering.ts)

PR surface

Source +258, Tests +1665, Docs +1, Other -1. Total +1923 across 35 files. Added test files: 3.

View PR surface stats
Area Files Added Removed Net
Source 13 342 84 +258
Tests 20 1940 275 +1665
Docs 1 13 12 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 1 -1
Total 35 2295 372 +1923

Labels

Label changes:

No label changes.

Label justifications:

  • P2: Repairs bounded coordination and native handoff failures without evidence of a current widespread outage.
  • merge-risk: 🚨 compatibility: Busy explicit followup no longer guarantees a separate turn or correlated completion, contrary to the earlier owner decision.
  • merge-risk: 🚨 security-boundary: Selected requester identity survives the original invocation and authorizes later delivery; final-native negative controls and enforced security approval remain unresolved.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • 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.

  • Add final-effect proof that selected Bob can deliver, unselected Alice cannot, and revocation during awaited preparation prevents native/provider input.

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 (18 earlier review cycles; latest 8 shown)
  • reviewed 2026-10-17T21:07:05.155Z sha f71dd46d8304da701c73a5ca852de478e27a81c1 :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-17T21:55:05.650Z sha f71dd46d8304da701c73a5ca852de478e27a81c1 :: blocked before merge. :: none
  • reviewed 2026-10-17T22:20:27.486Z sha 62078dfa6ee15ae944ab00c70f6567d363508d1e :: blocked before merge. :: none
  • reviewed 2026-10-18T06:27:16.093Z sha 441b87882afcd725acff2e3137d50fa3fca64b8e :: blocked before merge. :: none
  • reviewed 2026-10-19T06:51:09.740Z sha 1faeec0fa56bf4212470fe98f84d3d4077cd04b5 :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-19T07:39:50.313Z sha 701a1dec571ddc83135556d535d6bba81617694d :: needs real behavior proof before merge. :: [P2] Preserve real exports in the new participant-recording mock
  • reviewed 2026-10-19T11:13:08.385Z sha b9b6d777bccee4249a7c6d5bafb4cc93c1bdc1f2 :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-19T11:29:17.932Z sha e2bdba716822faadd21508f8b0e2ff98fd425b18 :: needs real behavior proof before merge. :: none

Reviewed October 19, 2026, 11:55 AM ET / 15:55 UTC (Revision 19).

@enki

enki commented Oct 17, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The body now records the real isolated Gateway/Codex fault-injection run: one real acknowledgement, exactly one deliberately withheld consumption event, unconfirmed settlement after 5.647 seconds, continued native work, and no replay during the observation window. Only allowlisted synthetic facts are published. The failed ratchet is attributed using identical failure signatures and linked PR/main job logs.

@clawsweeper

clawsweeper Bot commented Oct 17, 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. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed 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. 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
@enki enki changed the title fix: steered messages wait forever after Codex acknowledges them fix(codex): separate steering acceptance from consumption Oct 17, 2026
@enki

enki commented Oct 17, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

This head also repairs the demonstrated queue-only contract mismatch: waitForTranscriptCommit: false now returns after a successful steering acknowledgement, while receiver custody and bounded consumption settlement continue. Cancellation before acknowledgement still returns uncertainty. The new synthetic regression fails before the fix and passes afterward; all 36 selected queue/client and production steering/settlement tests pass, as do targeted types, type-aware lint, formatting and independent P0–P2 review.

The body distinguishes the prior real Gateway/Codex confirmation-deadline proof from the new queue-only branch's synthetic transport proof. No private session content or real mail data is included, and no claim is made that this fixes every startup/interruption hang.

@enki

enki commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Please reassess current head e2bdba716822faadd21508f8b0e2ff98fd425b18, merged with pinned upstream c0498d39fbb9c67cd9d4a256d2d8979e578a0e4c. The merge conflict is repaired with upstream's current test holder, and the retained-peer fixture now imports the canonical endpoint reader. The participant mock/error-detail corrections remain intact.

Independent review also found a genuine confirmation-timer bug: expiry settled already accepted receiver custody and discarded late consumption tracking. The timer now ends only a waiting caller's confirmation promise; the existing receiver retains accepted input until consumption or run closure. Queue-only batches need no confirmation timer. Three regression cases fail on the old code and pass after this repair; original input may already be persisted, so no universal transcript-loss claim is made.

All 148 focused cases across 10 files, affected production/test types, scoped typed lint/format, mock/assertion/line-cap ratchets, import-cycle checks and fresh P0–P2 review pass. The body keeps prior-head build/runtime observations qualified. Real selected-requester final-native-effect proof, stable upgrade evidence, security-owner approval and the explicit-followup decision remain outstanding. No broad CI or maintainer-approval success is claimed.

@clawsweeper

clawsweeper Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@enki

enki commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Please reassess 2656d7eab75b472a642f2a261028bfd65617d236. All five conflicts are resolved against pinned main 0cd30da1a3483f7358a7364cba2f1f7133f25a06. The integration preserves #176587 durable steering: successful active delivery waits for transcript persistence, unsupported backends receive no volatile injection, and a single durable queued admission keeps the original input identity. agent-step now threads that same fallback operation; removing its propagation makes the new retained-peer regression fail on the absent durable return, while the repair passes. Accepted-unconfirmed input never replays; existing late-consumption custody remains intact.

177 focused checks across nine suites, core and owning test types, scoped typed lint/format, unchanged line/mock/assertion ratchets, production build and independent P0–P2 review pass. The PR body distinguishes durable admission from model consumption and keeps existing native/upgrade captures revision-qualified.

Selected-requester final-native/negative and upgrade evidence, current security approval, and the explicit-followup owner decision remain separate open gates. No deployment or upstream merge is claimed.

@clawsweeper

clawsweeper Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@enki

enki commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor Author

Closing after the consolidation in #177698 (f83b7ade15f3aefad7b367bef084ea5ffdbd9f8b).

The useful original-source, native child/result routing and ACK/custody repairs landed there. The remaining exact-thread closure follow-up is tracked in #180204.

The broader busy-peer/followup proposal is not being pursued. The settled direction approximates Codex through supported human steering, while preserving current peer-mail scheduling because the native app-server API does not expose Codex’s peer mailbox. Ordinary peer messages, returned results and explicit followup keep their separate-turn scheduling and correlated replies, with the existing narrow child/run-scoped exceptions.

This closure does not claim the broader peer proposal landed or that #180204 is merged. Human-steering follow-ups remain #180228, #176972 and the separately scoped optional embedded-work proposal #176245. No local peer-scheduling repair was pushed or deployed.

enki added 19 commits October 19, 2026 19:22
Keep known receiver settlement distinct from authority refusal and preserve the existing completion owner for native child follow-ups.
Retain the real participant wait helper in both observation mocks and
remove the now-obsolete mock baseline entry. Narrow unknown steering
error details through the existing record coercion before reading errors.
End only the caller confirmation wait at its deadline. Keep accepted input
in receiver custody until consumption or the exact run closes, including
queue-only input, without replay or a parallel queue.

Merge pinned upstream c0498d3 and adopt its held-response test fixture and
canonical communication endpoint reader while retaining both-mode admission
assertions and the participant mock/error narrowing CI corrections.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation extensions: codex gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. security-review-required security-sensitive-changed size: XL 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.

1 participant