Repository navigation
improve(macos): reuse the Codex App Server client - #116325
Conversation
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed July 30, 2026, 10:36 PM ET / July 31, 2026, 02:36 UTC. ClawSweeper reviewWhat this changesThe PR changes macOS Codex thread-list and transcript reads from launching a fresh Codex App Server process each time to using one bounded, serialized client that reuses an initialized connection. Merge readinessKeep this PR open for human maintainer review. It is member-authored and carries the protected Priority: P2 Review scores
Verification
How this fits togetherThe macOS node runtime serves catalog requests for stored Codex threads and transcripts. This change inserts a reusable App Server connection between those requests and the Codex executable, then resets or stops that connection for cancellation, timeout, exit, invocation changes, and idle shutdown. flowchart LR
A[macOS catalog request] --> B[Mac node runtime]
B --> C[Shared bounded client]
C --> D[Codex App Server process]
D --> E[Initialized connection]
E --> F[Thread list or transcript result]
C --> G[Timeout cancellation exit or idle reset]
Decision needed
Why: The shared client is a deliberate macOS ownership and failure-isolation boundary; source tests can validate mechanics, but maintainers must accept the persistent-process scope and exclusion of turn-driving methods. Before merge
Agent review detailsSecurityNone. PR surfaceOther +841. Total +841 across 4 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one bounded client only for read-only stored-thread catalog operations, preserve the documented reset and deadline behavior, and obtain macOS/Codex-owner approval after refreshing the merge result against current main. Do we have a high-confidence way to reproduce the issue? Yes, from the PR’s described source path: prior macOS list and transcript reads invoked one-shot catalog helpers, while the branch routes them through a persistent client. The provided context reports focused tests, but this read-only review did not independently execute the macOS runtime. Is this the best way to solve the issue? Unclear: a bounded, read-only shared connection matches the reported repeated-handshake cost and the author’s upstream-contract review, but maintainers must decide whether the Mac node runtime is the right lifecycle owner for the resulting shared failure boundary. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against 9ccc8fcc271b. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (9 earlier review cycles; latest 8 shown)
|
|
Rank-up moves disposition:
The remaining macOS/Codex lifecycle-owner acceptance is intentionally left to human maintainer review. That is an ownership decision, not an unresolved code finding. |
7005f40 to
fa4db46
Compare
df2e27d to
7a0c719
Compare
fa4db46 to
a4398e5
Compare
7a0c719 to
66bbf76
Compare
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
66bbf76 to
8b704e3
Compare
bcde24a to
537f459
Compare
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Owner decision:
The client remains intentionally limited to stored thread/history reads; turn-driving methods would require the upstream bidirectional server-request contract. |
|
Merged via squash.
|
* perf(macos): reuse Codex app server client * refactor(macos): split Codex app server client * fix(macos): enforce Codex frame limits per message * refactor(macos): remove obsolete Codex wrappers * test(macos): lock Codex wall-clock deadlines
What Problem This Solves
Fixes an issue where every macOS Codex thread list or transcript read started a fresh Codex App Server process and repeated its initialization handshake.
Stack position: 7 of 7. Base:
perf/kova-stack-06-claude-catalog.Why This Change Was Made
The macOS node runtime now owns a serialized App Server client that reuses one initialized connection for bounded requests. It has a 30-second idle lifetime, a 64-request queue bound, bounded idle output, and restarts after invocation changes, process exit, timeout, or caller cancellation.
User Impact
Repeated Codex catalog operations avoid process startup and initialization round trips while retaining existing request validation, deadlines, cancellation, and error behavior.
Evidence
MacNodeCodexThreadCatalogTestsandMacNodeRuntimeTestspassed as part of 98 tests across 7 suitesAI assistance: Codex was used for investigation, implementation, and review. The resulting changes and evidence were manually inspected.