Repository navigation
fix(codex): distinguish client acquisition timeout stages - #163156
Conversation
Record diagnostic-only acquisition boundaries and shared startup provenance without changing client timing, cancellation, authentication, or pool ownership. Preserve the last blocked boundary through cleanup and keep started-client observations separate from acquired identities.
|
🦞👀 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 October 1, 2026, 9:45 PM ET / October 2, 2026, 01:45 UTC. ClawSweeper reviewWhat this changesAdds bounded acquisition-stage observations to Codex timeout warnings, including shared startup provenance and the boundary preceding cleanup. Merge readiness✅ Ready for maintainer review Keep open: current main lacks these acquisition-stage diagnostics, and the review found no actionable defect introduced by the patch. Priority: P3 Review scores
Verification
How this fits togetherThe Codex plugin acquires an app-server client before sending agent and control requests. Its acquisition owner now supplies progress observations to the existing timeout logger so operators can locate stalled startup. flowchart TD
A[Agent or control request] --> B[Prepare client context]
B --> C[Select shared or isolated client]
C --> D[Initialize and prepare runtime]
D --> E[Authenticate and acquire client]
B --> F[Acquisition observations]
C --> F
D --> F
E --> F
F --> G[Timeout warning]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +143, Tests +280. Total +423 across 7 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep acquisition observations within the existing client owner and timeout logger, with bounded metadata and unchanged runtime decisions. Do we have a high-confidence way to reproduce the issue? Not applicable as a diagnostic refinement; source confirms the coarse current-main warning, and inspected fixtures provide deterministic acquisition-boundary scenarios. Is this the best way to solve the issue? Yes. Forwarding observations from the existing acquisition owner avoids a competing lifecycle tracker and preserves runtime policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d4b98b3a5101. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
…63156) Record diagnostic-only acquisition boundaries and shared startup provenance without changing client timing, cancellation, authentication, or pool ownership. Preserve the last blocked boundary through cleanup and keep started-client observations separate from acquired identities.
What Problem This Solves
Fixes: Codex acquisition timeouts report only
acquire-client, hiding whether the last observed boundary was context preparation, shared startup, initialization, catalog observation, runtime binding, or authentication handoff.User Impact
Operators get bounded diagnostic context for acquisition timeouts. This does not fix an underlying timeout or change timeout budgets, retries, authentication, client pooling, cancellation, or authority checks.
Why This Change Was Made
Forward observations from the existing acquisition owner into the existing scope-timeout warning. Distinguish newly created startup, joining startup, and ready-cache reuse. Joined callers receive the current boundary and later observations, with exception-isolated callbacks removed on abort or completion.
Keep the last boundary before cleanup and the last observed started-client identity separate from the acquired-client identity. These are diagnostic observations, not proof that a particular wait is still active or that a process is owned. No credentials, paths, pool keys, request payloads, or process identifiers are added.
Evidence