Repository navigation
Conversation
Check retired completion authority before following yielded child waits so restart recovery can resume the parent and reconcile saved child tasks. Preserve durable rejection outcomes and cover graceful restart ordering and cross-agent children.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@clawsweeper review Please review the restart recovery owner change and the graceful restart regression at head c00ed96. The completion authority must remain retired; the parent must enter current restart recovery instead of parking behind an unreachable message wait. Local Codex review and production-path regression proof are recorded in the PR body. |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThe PR resumes yielded parents when their children's previous-process completion authority has retired. Example: The dashboard parent agent:main:dashboard:yield-restart awaits a message-waiting child during a graceful Gateway restart.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review This PR repairs a current-main restart deadlock through the existing recovery owner. No actionable correctness or security findings were identified. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe subagent registry classifies recorded child waits for Gateway restart recovery, which either preserves a reachable pause or admits a fresh parent recovery turn. flowchart TD
A[Gateway restart] --> B[Restore subagent registry]
B --> C[Retire previous completion authority]
C --> D[Classify parent yield source]
D --> E[Preserve reachable wait]
D --> F[Current restart admission]
F --> G[Parent reconciles retained child]
Technical reviewBest possible solution: Keep retirement authoritative and use the existing restart admission owner to reconcile affected parents. Do we have a high-confidence way to reproduce the issue? Source establishes the failure: restore retires child completion custody, but main follows the yielded child's message wait and parks the parent; no target code was executed during this read-only review. Is this the best way to solve the issue? Moving the existing check ahead of traversal is the smallest complete repair, preserving identity filters, reachable current waits, child retention, and fresh admission. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6ff27cbe1fd0. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource 0, Tests +103, Docs +5, Other +101. Total +209 across 8 files. Added test files: 1. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 13, 2026, 11:17 PM ET / November 14, 2026, 04:17 UTC. |
|
ClawSweeper reviewed final head That temporary replay uses the same lifecycle and final-result assertions as the committed regression: original parent retained across shutdown, fresh parent recovery, and final parent transcript contains REQUESTER_RECEIVED_CHILD_COMPLETION. The final transcript assertion passed; the excerpt above does not itself print transcript content. The identical committed deterministic-provider regression on exact pre-fix parent The failure was the post-restart parent-resume expectation, after the original-yielded-parent retention assertion passed. All six committed Gateway scenarios pass together with the fix. No Team data or sessions were used. |
|
Merged via squash.
|
…penclaw#198640) Check retired completion authority before following yielded child waits so restart recovery can resume the parent and reconcile saved child tasks. Preserve durable rejection outcomes and cover graceful restart ordering and cross-agent children.
What Problem This Solves
Fixes parent sessions remaining parked after a restart when they were waiting for a paused subagent whose old completion authority was retired.
User Impact
Affected parents resume through ordinary restart recovery, inspect saved results, or continue retained child tasks through fresh admission. No configuration or schema migration is required.
Why This Change Was Made
Registry restore deliberately retires completion authority from the previous process. Yield reachability checked that fact only for non-yielded terminal children. Apply the same existing check before following message or nested waits, preserving retirement and the current recovery owner. Production line count is unchanged.
Evidence
The actual Gateway regression uses a deterministic external provider, real tools and SQLite, and graceful process shutdown. It verifies that the original yielded parent survives shutdown. On exact pre-fix main
3cd6a3ed497469fcce9288b1621df968244c2e7c, startup reportsresumed: 0/parked: 2and the parent never resumes. With the fix, the parent resumes, continues the saved child, and receives its result. Siblings cover a child completing before restart, a child on another agent, and an interrupted child.All six Gateway scenarios pass together. A separate credentialed OpenAI model replay of the parked-parent flow also passes using synthetic sessions and constrained tool choices (27.8 seconds of behavioral execution). Focused owner, stable-record recovery, sweep and requester-receipt tests pass. The real retired-store rejection already records a visible durable failure on the baseline; its new regression preserves that behavior. Codex autoreview is scoped-clean at P0–P2.
pnpm check:changedhas unrelated unused-export failures reproduced on the exact main parent:REQUIRED_ACTION_STOP(introduced by #196951 /de0ea1efe5f9),resolvePackageDistCommonJs(#198567 /5f99927e134e), andprepareTranscriptFactsBackfillStress(#194519 /72f90dde293d). These are tracked main regressions, not ignored failures.Synthetic owner measurement
Linux btrfs, Node 24.22.1, 4 CPUs / 12 GiB; synthetic 35.13 GiB database, 10,000 sessions, one million transcript events, and 62,000 workspace files (1.116 GB). Five counterbalanced pairs, ten calls per sample, separate timing/allocation A/A controls.
Baseline admits one of four parents and leaves three parked; fixed admits all four. Both perform 14 transcript-worker tasks per call. Median process CPU rises from 188.4 to 209.7 ms and sampled main-isolate allocation from 10.34 to 11.99 MB for the three additional recovery admissions. Allocation A/A differs by −0.37%. Wall medians are 142.6 versus 155.1 ms, with substantial A/A drift; no latency improvement is claimed. Worker allocation is outside the inspector sample. Model execution is outside this owner benchmark.