Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@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. |
|
🦞👀 Re-review progress:
|
|
Codex review: needs real behavior proof before merge. What this changesRoutes 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.
Review scores
ProductKind: Bug fix · Worth it: Needs a maintainer decision · Fix scope: Complete 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 Decision needed
Before merge
Findings
Tests
Agent review detailsHow this fits togetherSession 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
Technical reviewBest 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 optionsMaintainer options:
Provenance checked
TestingProof path: in-process harness. SecurityNeeds attention: The retained requester transfer needs final-effect evidence and current security-owner approval; source inspection established no concrete authorization bypass. EvidenceSecurity concerns:
What I checked:
Likely related people:
PR surfaceSource +258, Tests +1665, Docs +1, Other -1. Total +1923 across 35 files. Added test files: 3. View PR surface stats
LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (18 earlier review cycles; latest 8 shown)
Reviewed October 19, 2026, 11:55 AM ET / 15:55 UTC (Revision 19). |
|
@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. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review This head also repairs the demonstrated queue-only contract mismatch: 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. |
|
@clawsweeper re-review Please reassess current head 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. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review Please reassess 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. |
|
🦞👀 Re-review progress:
|
|
Closing after the consolidation in #177698 ( 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 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. |
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.
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 explicitfollowupkeep 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
2656d7eab75b472a642f2a261028bfd65617d236merges previous public heade2bdba716822faadd21508f8b0e2ff98fd425b18with pinned upstream0cd30da1a3483f7358a7364cba2f1f7133f25a06, 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-stepcaller 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
bed06fcbbbacc466799185b045611a023a633a89candidate, 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 currentfda7e371431bea0136c95f5a853fd1ceb7ad9b7dand reviewed2656d7eab75b472a642f2a261028bfd65617d236have 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 —
701a1decHead
701a1dec571ddc83135556d535d6bba81617694dmerges pinned upstream550c55a807016cef74550ef3ebfb788022056349into the published1faeec0fa56bf4212470fe98f84d3d4077cd04b5candidate. 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 anotheragentturn 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.