Repository navigation
fix(codex): keep peer turns alive when thread startup times out - #149393
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 15, 2026, 6:44 PM ET / 22:44 UTC (Revision 3). ClawSweeper reviewWhat this changesThe Codex plugin preserves healthy peer turns when thread startup times out by retiring the shared client while retaining response tracking until native completion or process exit. Merge readiness✅ Ready for maintainer review The fix remains necessary on current main and in the latest release. No actionable introduced defect was found; the native proof supports the repair, and the previous review reported no code findings. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw's Codex plugin sends thread and turn requests through a shared native app-server process. Its request and lease lifecycle determines whether one canceled startup interrupts other conversations or permits unsafe overlapping configuration work. flowchart TD
A[Thread startup request] --> B[Configuration fence]
B --> C[Shared native client]
C --> D{Caller times out?}
D -->|No| E[Return startup result]
D -->|Yes| F[Retire from new acquisition]
F --> G[Existing peers continue]
C --> H[Native response or process exit]
H --> B
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +50, Tests +374. Total +424 across 6 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep cancellation local to its caller, preserve peer leases, and release configuration exclusion only on the exact native response or physical exit. Do we have a high-confidence way to reproduce the issue? Yes: current main closes the shared transport when a written guarded startup times out while a peer holds a lease. The supplied native red/green report exercises that mechanism; this read-only review did not execute it. Is this the best way to solve the issue? Yes: extending response correlation and using the existing retirement owner preserves native configuration exclusion without terminating healthy peers or creating a competing lifecycle manager. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 14b8ad1d1871. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
The same native fixture is red on base
AWS lease Graceful-only retirement was rejected by a real native falsifier: the existing peer's same-home follow-up fork remained fenced after late completion. Keeping exact response correlation releases that fence without reviving the canceled caller. Stateful startup is never deduplicated. The real attempt/router regression additionally checks late thread/started, no stale binding/inference/tool execution or replacement unsubscribe, and a positive replacement tool control. 120 focused tests passed, with 34 startup tests passing again after the mechanical test split. Both extension typecheck lanes and final five-file lint/format passed. Final autoreview is scoped-clean, with no P0-P2 findings. ClawSweeper's exact-head review found no issues; this downloadable bundle addresses its portal-access limitation. There are no unresolved review threads. A permanently stuck native operation still fences same-home startup until physical exit; each caller retains a bounded deadline. Computer Use config mutation and compaction retain their existing paths and need separate completion contracts. The incident's exact outstanding RPC remains unknown. Required CI is still running; merge remains under maintainer coordination. |
|
The callback correction is published at The correction removes the static client/lifecycle import cycle by supplying retirement from the existing shared owner and capturing it with the selected guard before awaits. It preserves the reviewed request, fence and lease behavior. Publication identity records the verified parents and human signature. Canonical impact assessment explains why the intervening changes do not invalidate the direct startup/native/attempt proof. Evidence for exact proof head
Original paired red/green recordings and manifest remain labeled with their actual base and Review follow-up to ClawSweeper’s media-inspection limitation: the raw paired recordings were inspected during capture, and their downloaded hashes verified. The independent source-blind report and the supervisor’s inspection of native milestones and raw API checksums provide separate behavior evidence. No code or security finding was reported. The reviewer’s missing ffprobe and artifact-host access remain documented as reviewer infrastructure limits. All owned proof processes and leases are stopped; final AWS lease |
|
Merged via squash.
|
…claw#149393) * fix(codex): keep peer turns alive when thread startup times out * fix(codex): inject retirement from shared startup owner
What Problem This Solves
Fixes unrelated Codex turns closing together when one shared client's thread startup times out or is canceled after dispatch.
User Impact
Healthy peer turns can continue, start a same-home helper after the delayed startup response arrives, and complete normally. An indeterminate startup retires its client from new acquisition while existing leases drain. If native startup never settles, same-home startup remains fenced until physical exit; each caller still has its own bounded deadline.
Why This Change Was Made
Caller cancellation does not establish that Codex finished loading native configuration. Keep the exact written request until its response or physical exit, and use the existing shared-client retirement owner. A late response can release the config fence but cannot resume the abandoned caller or gain authority over its replacement. Stateful startup requests remain independent.
Computer Use config mutation and compaction have separate completion contracts and remain outside this change. This repairs a reproduced failure mechanism; the incident's exact outstanding RPC was not recorded.
Evidence
Published head
3637c94883fe830812136beb720e39cf4315dbacincludes the reviewed callback correction and canonical lint repairs through6c28739b1aca420df0c753acb79f065085cc7229. Supplemental proof, independent report and manifest include the source identity and canonical impact assessment. All 19 published supplemental files and the manifest were downloaded and verified. Required exact-head CI passed on3637c94883fe830812136beb720e39cf4315dbac.Exact-head evidence and inspected red/green recordings include the downloadable manifest, 239 raw source-blind API records, and independent review receipts. Head
e5836380260f13ae2667d54037fd4e819dc93a21passed real native proof for all three methods. Source-blind validation passed 11 clauses with no failures or blockers; binding/router authority and unrelated behavior are explicitly assigned to separate proof/scope. Native preparation completed on published head3637c94883fe830812136beb720e39cf4315dbacusing successful exact-head hosted CI. Merged through the native workflow as4343400a52b40dfa010d4427a0ef35b8670511ef.Combined Gateway and Control UI proof uses combined tree
9e94735e3724d33d801c4cc4c32f3e68251400e1, containing cancellatione5836380260f13ae2667d54037fd4e819dc93a21. Its source-blind checks observe a helper timeout on the shared process, peer survival and completion, original request completion, and a successful follow-up. The parent verified all 36 published artifacts. This combined tree predates the callback correction.The callback correction has separate proof on exact proof head
e63d6a91ac39175cfb3a9447f1d06ff9b2a3a300: real native 0.154.0 and independent API validation. All three startup methods preserve peer follow-up and completion after a late response. API validation passes 11 clauses with no failures or blockers and two explicit scope exclusions; its 237 raw records have SHA256b90b93789f7381fc0d8516805218e5dd6ed1ffdace531d8b9e8ca975ed2e9b9d. The correction also passes 194 affected tests, extension test types, targeted lint/format, zero Madge cycles and scoped-clean autoreview.