Skip to content

Reduce POSIX chat overhead with direct agent processes - #31321

Closed
brennanb2025 wants to merge 32 commits into
mainfrom
brennanb2025/nc-perf-supervision
Closed

brennanb2025 wants to merge 32 commits into
mainfrom
brennanb2025/nc-perf-supervision

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 67 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1765 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3629 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1864
Prod 61 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2172 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1151 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1021

ELI5

Each native chat on macOS and Linux currently keeps an extra Node process alive to supervise its agent and relay every input and output byte. With many chats, that repeats the runtime’s memory cost. Agents now run directly under Orca, with their own process groups and direct streams. Replies and final output still complete before the chat releases its resources.

What Changed

The execution host owns the agent’s stop sequence and cleans up its remaining tools when it exits. A bounded completion tracks process cleanup and final output separately from the root process exiting. All nine launch families use this lifecycle, including quota checks, model discovery, source-control generation and backfill. Codex account-home reuse waits for recorded refresh writers to disappear and checks again on the next attempt.

A host-local ownership ledger lets the next startup clean up recorded leftovers from a crashed host. Positively exited tool identities are removed so repeated tool launches do not grow the saved history indefinitely; live, moved and unverified identities retain their existing protection. Saved sessions from older supervisor builds retain their recovery path. The headless server now awaits chat shutdown. SSH and in-distribution WSL use the same POSIX owner code; native Windows and desktop-launched WSL retain their existing process paths. No new wire operation, saved chat field, user setting or minimum server version is introduced.

Why

The extra runtime and stream relay are the structural source of the overhead. Direct children, direct streams and an owner-run stop sequence follow the common pattern.

Intended crash behavior: force-killing the execution host closes agent stdin. Agents or tools that ignore that may remain until the next startup, which cleans up only recorded, verified Orca-owned identities. This replaces the independent per-chat crash supervisor by explicit direction. Normal close still escalates from stdin closure to termination and then forced cleanup; natural agent exit reaps its group’s tools.

Linked Issue

Lane requested by @BrennanKB5. No new issue created.

Current validation status — October 24

Current head d5962eb5daa65e3124fc7662a113c193888acdcb merges main 015fae84cc956033e6156d1389ef250c9bad940b to resolve two file-relocation conflicts. Independent review accepted the exact resolved tree; five targeted tests and the required merge checks passed. The source tree is clean. Full CI completed with 45 successful and 14 skipped checks on this exact head (run 40122673898). The previous head a2883cd7718f519d102d04099997e64a82b826ea passed full CI (run 40101228347). The PR remains not ready.

Completed real-run evidence carries across main merges and test-only commits. Shared chat and process flows use real Claude and Codex; the changed original OpenCode terminal startup also produced a real reply. Other shared-agent branches and unchanged consumers use their recorded-output and integration contracts. No additional provider or consumer sweep is required.

The latest exact-head macOS run reached a real active Codex shell tool, clicked Stop, displayed Interrupted, and showed no late END through its original 120-second observation. A follow-up on the same chat and native ID produced fresh public text. Earlier failed attempts remain preserved. Separate raw provider/tool exits, pipe EOF and exact writer/ledger/lock ordering were not measured, so this is scoped Stop/reply evidence rather than complete physical-contract coverage. The app then closed gracefully, and the retained evidence passed its independent file-integrity audit.

Latest native Windows QA used the qualified a288 CI package. Real Claude and Codex tools reached Stop to Interrupted and fresh same-chat replies; sibling continuity, History reopen with the same native IDs, and fresh replies after forced whole-app/tree loss were observed. Fourteen Sends retained their original checkpoints. Early callback gaps and the original Claude recovery-clock fallback remain explicit; Codex added a trailing period to two requested literals, which is separate from the verified fresh replies. Previous-build Windows upgrade lineage, physical provider/tool exits, writer/lock and EOF ordering, and owner-only orphan recovery remain unproved. Claude briefly showed no selected effort after History reopen, then High returned after the planned reply; saved pre-close option facts were unavailable and PR causality is unproved. This is partial acceptance, not a complete Windows pass.

Still required: the remaining Windows lineage and physical-contract evidence; official WSL lifecycle; the remaining SSH sibling and active-tool graceful shutdown/recovery cells; and matched 0/1/20/28-live-chat memory and finite tool-churn measurements. No measured memory benefit or final readiness is claimed.

Visual Proof

Native Windows on the qualified a288 package: Claude returned a fresh reply after History reopen; Codex displayed Interrupted and returned a fresh same-chat reply. These images show the observed UI, with the limits above retained.

Claude History reopen Codex Stop and follow-up
Claude History reopen and fresh reply Codex Interrupted and fresh follow-up

After forced whole-app/tree loss, both original chats accepted a new Send and returned fresh public text. This demonstrates the observed same-profile recovery; it does not establish owner-only orphan recovery or physical writer/EOF ordering.

Claude recovery reply Codex recovery reply
Claude same-profile recovery reply Codex same-profile recovery reply

Recorded exact-a288 macOS chat view: Codex displayed Interrupted after stopping a real active shell tool, then returned fresh public text in the same chat. The image illustrates the observed flow; the retained receipts and their physical-observation limits are described above.

Codex Interrupted and same-chat follow-up on a288

Retained run on source 980813870d73664e385684e31b8d637e8534af75: original OpenCode 2.0.16 returned a real reply through the selected-model local-terminal startup. Separately, the SSH Codex conversation returned fresh public text after an idle-provider TERM. Its image also retains an earlier recovery reply and the CLI's bundled-bubblewrap fallback warnings. Active-tool TERM and physical writer/EOF ordering remain unproved; these pictures illustrate the previously accepted scoped outcomes.

Original OpenCode local-terminal reply SSH reply after idle-provider TERM
Original OpenCode selected-model local-terminal reply SSH Codex same-session reply after idle-provider TERM

Packaged macOS QA on dfc6aa000ace4dc988d16befc1b95d2814df8022 is partial. Claude and Codex each produced two real replies and a README tool result, displayed Interrupted after Stop, then produced two more real replies after reopening from History. Cross-family close independence also passed. The same retained profile was exercised with baseline c149395c20ca, shut down, and reopened with the target; original creation of these chats on the baseline is unproved because the profile also contains earlier target turns.

Agent Baseline replies Current-head replies and tool
Claude Claude baseline replies Claude current-head replies
Codex Codex baseline replies Codex current-head replies
Stop, History reopening, and failed Pi attempt
Agent Stop Resumed replies
Claude Claude Interrupted Claude resumed replies
Codex Codex Interrupted Codex resumed replies

Baseline Codex History reopen:

Baseline Codex History reopen

Pi's genuine JSONL/RPC route sent a fresh prompt at 12:29:17Z on October 22, then returned HTTP 503. No assistant reply appeared within the recorded 120-second observation. This historical failed attempt establishes neither a PR regression nor a permanent provider outage. Current shared-code coverage follows the agent scope above.

Pi attempt Pi failure
Pi current attempt Pi provider failure

The baseline's first Codex reply took 125 seconds without an exact 120-second observation. The target's primary driver required forced termination and stopped 15 seconds after its assigned cutoff; two post-History observation callbacks were not captured. These limitations prevent a complete timing or lifecycle pass. Recorded runtime cleanup completed, but does not prove product recovery or writer exclusion.

Earlier macOS QA (incomplete)

A later same-profile run created new baseline OpenCode conversations in build c149395c20caac972e9913fe8809e107b31c101f, then launched the exact integrated target dfc6aa000ace4dc988d16befc1b95d2814df8022. The original OpenCode adapter completed four target replies, a fresh README tool action, Stop to Interrupted, and History resume with preserved session/options. Its baseline request failed upstream, so this does not establish two successful baseline replies. The distinct OpenCode2 adapter completed baseline replies/tool use, but its first target reply omitted the requested fresh tool action; further flows stopped. Both adapters used official OpenCode 2.0.21, with distinct native routes; this is not OpenCode 1.x coverage.

Official Pi 1.0.4 made one fresh target request and received 503 without an assistant reply or tool action. No retry, substitution or waiver is inferred. Ten actual sends across these phases have complete 120-second observations; an additional observer without a Send is excluded. These observations are not controlled performance measurements. Target/Pi app exits and all three driver exits were captured as 0; the baseline app's raw exit was unavailable. Final recorded-process, port and profile-holder clearance is operational cleanup, not evidence of product recovery or writer exclusion.

The run remains failed/incomplete. Its results are retained with their limits; the current affected-flow scope above governs remaining validation. Selected own-flow screenshots were visually checked locally. At that stage, GitHub accepted one upload and nine other selected-image uploads failed while obtaining its upload token. Later retained screenshots are linked below.

Baseline distinct OpenCode2: real README action and reply

Baseline distinct OpenCode2 real README action and reply

Earlier Windows and SSH QA (incomplete)

Native Windows QA created real baseline Claude and Codex chats: each produced two replies and a README tool result, with saved chat IDs and choices. One original Claude submission callback was missed, so this baseline does not pass the full evidence requirement. The first target attempt ended when the QA lead closed the app prematurely. The final target attempt passed its process identity check, but the driver lost its upstream connection and reached the enforced deadline without target UI or send evidence. Neither attempt establishes that the changed Windows flow works, and neither establishes a product crash. The reused profile had already been opened by the first target attempt.

The final Windows report records scoped cleanup of the owned process identities and assigned ports; that is operational cleanup, not proof of product recovery, writer exclusion, guest cleanup or every process on the host. The baseline screenshots show the old build only; their publication is still pending. Those earlier attempts did not exercise target Windows lifecycle and recovery; the later Windows observations and remaining gaps are recorded above. Unchanged readers are covered by their integration contracts.

The SSH attempt also remains incomplete. The current desktop launched, but the driver sandbox could not inspect the required live process identity before UI work. Restoring the populated test environment had already awakened its older recorded server; deployment of the current server and required Node runtime was not demonstrated. The owned container, keys, recorded processes and assigned ports were removed or cleared. Real shared config hashes changed during that run; attribution is unknown. The next SSH run will use a fresh container and the current desktop only, after the driver route is corrected.

No matched memory or tool-churn result is available. This PR remains not ready.

Grok QA waiver

Grok was not exercised in real QA. Its coverage is limited to automated tests. Brennan waived Grok for this PR on October 22, 2026; his exact words were “Continue. Waive grok”. Grok is waived, not passed. The current required real agents are Claude, Codex and the changed original OpenCode terminal preflight; other shared branches use recorded-output contracts. The PR remains not ready.

Testing

  • Current merged head d5962eb5daa65e3124fc7662a113c193888acdcb: five targeted relocation/connection tests passed, required merge checks passed, independent integration review accepted the exact committed tree. Full CI completed with 45 successful and 14 skipped checks. Existing real-run evidence retains its original build attribution and carries across this main merge.
  • Reviewed production head dfc6aa000ace4dc988d16befc1b95d2814df8022: full CI completed with 45 successful and 14 skipped checks, including static analysis, test shards, packaging, Windows checks and SSH integration; no failed or pending check in the accepted result. This head integrates the reviewed branch with frozen main 4c80dac0d89d.
  • The packaged macOS target was freshly built from the exact integrated head and clean source. Its compiled main matches the current-head CI output. The scoped real Claude/Codex results and limitations are documented above; they are not full QA acceptance.
  • Historical targeted checks: 15 tests in the two consolidated quota/recovery suites on 47d515bd3c4; 38 tests in three corrected Claude/quota fixture files on b3333543189; 66 tests across eight affected files on da5b5005b14; 396 tests across 36 named lifecycle/recovery/caller/launch files earlier in the loop; and 48 tests across five core/ACP/Claude suites after extraction on d7122e1255c. These remain evidence for the commits actually tested. Normal commit hooks passed.
  • Real process fixtures cover direct parentage, final output, TERM-ignoring tools, restart ownership checks and a refresh writer that changes its process group.
  • The native Windows package was also built from the exact integrated head and clean source; its compiled main matches CI and macOS. Runtime QA remains incomplete: the isolated service account could not discover the installed native agents, and the baseline rejected the selected WSL project-runtime route before an agent request. Neither phase reached a real reply or the target upgrade. Recorded Windows processes and assigned listeners were cleared, with guest writer exit still unverified. A later native Windows attempt also stopped during baseline setup: its driver exited 3 before creating a native chat; the target was not launched. Forced app cleanup exited 1. Recorded identities and assigned ports cleared, with late-descendant and guest-state limitations preserved.
  • Later macOS evidence on 980813870d73664e385684e31b8d637e8534af75 carries scoped Claude/Codex active app force-quit and next-launch recovery: original sessions, choices and fresh replies returned; recorded Claude-side survivors disappeared after restart. The report retains its observer, disk-guard and identity limitations. Real quota backend authentication-error, cancellation, writer exclusion and same-home next-request paths also settled; this is backend ownership evidence, without successful quota values or a Usage UI pass.
  • Fresh SSH deployment on that head produced real Claude/Codex file-tool replies and retained-ID replies. Viewer reconnect, active owner force-quit/recovery, idle-provider graceful shutdown and a same-session Codex reply afterward completed within their recorded timing limits. Original packaged OpenCode 2.0.16 with Flint40BFree produced a real reply in its original 120-second observation. These receipts preserve missing-callback, process-identity and output-drain limits; they are not a blanket shutdown pass.
  • A normal Codex terminal launch on the same SSH runtime triggered genuine pending-index recovery from 100 naturally persisted, unturned sessions. The index completed, its recovery ledger retired and recovery providers disappeared. The old Linux recorder itself exited with both pipes drained; production recovery pipe EOF and raw exit were not separately measured. No model turns or fabricated database/session records created the input.
  • Remaining real-run and benchmark gaps are listed in Current validation status. The latest a288 macOS run supports the observed local Codex Stop/follow-up flow within its documented physical-observation limits. Earlier SSH late output and Claude startup failures remain retained with their original scope and unproved PR causality. Earlier Stop latency diagnostics did not show a consistent target-specific slowdown. Completed flows and unchanged-consumer contracts do not need a blanket repeat. No measured memory improvement is claimed.

Review

Full review path: this changes process ownership, shutdown, recovery, persistence and cross-host execution. Independent source review and the final whole-mechanism comparison accepted the implementation. Later main integrations and test-fixture corrections received bounded continued review. The latest conflict integration preserves the accepted diagnostic behavior at main's relocated paths, the agent-close contract and the production cap; independent review accepted its exact tree b601af1e6b489863c7dff495853ae0549aab0139. Source acceptance does not complete runtime QA, performance verification or final readiness.

Agent skill upstream boundary

  • Not applicable; no upstream skill-installer source is copied.

Notes

The test consolidation on 47d515bd3c4 removes duplicate quota-fallback cases while retaining the distinct directory-listing failure in the existing recovery flow. Against the integrated review base, this leaves 1,932 added test lines and 1,935 production lines, with no production change. Both affected suites passed all 15 tests on the committed bytes; normal commit hooks passed. Full CI passed on that historical head; the integrated-head CI result is recorded above.

One PR replaces the entire POSIX supervision mechanism. The earlier unused launch-gate and watcher scaffolding has been removed. The Windows paths and mixed-version remote launch compatibility remain in scope for regression QA.

Checklist

  • Problem, user-facing behavior and mechanism explained.
  • Targeted automated tests and commit hook passed.
  • Full CI on current merged head d5962eb5daa65e3124fc7662a113c193888acdcb: 45 successful and 14 skipped checks; no failed or pending checks.
  • Independent source review and final mechanism comparison complete on the reviewed production head; test-only delta accepted. The merged head’s narrow independent integration review also accepted it.
  • Real-agent platform/SSH QA and matched performance measurements complete.

Recorded QA screenshots — incomplete

These screenshots show scoped real-agent results. The earlier build is c149395c20ca; the PR build is dfc6aa000ace. They do not establish complete upgrade lineage, physical process cleanup, or performance. QA remains incomplete and this PR is not ready to merge.

Agent Earlier build PR build
Claude Two real replies and a file read Two real replies, a file read, and Stop displayed as Interrupted
Earlier-build Claude replies PR-build Claude replies and Interrupted
Codex Two real replies and a file read; the first took about two minutes Interrupted and two real replies after reopening from History
Earlier-build Codex replies PR-build Codex replies after History reopen

The original OpenCode adapter also produced replies after Stop and History reopen on the PR build. These replies took about 56 and 74 seconds. This image does not prove that the separate OpenCode2 adapter passed.

Original OpenCode adapter on the PR build

A later diagnostic used frozen main 4c80dac0d89d and the PR build. Its observed PR follow-ups replied in about 1–6 seconds; completed main follow-ups took about 4–8 seconds. Incomplete trials and native-package differences prevent a definitive matched Stop comparison or attribution of the earlier 270-second response. Main also displayed “Loading usage…” through about 118 seconds in a two-minute observation; no quota values were obtained. The small crop below records only the public loading label, not its duration or successful quota retrieval.

Frozen main Usage loading label

Retained SSH ownership observations on a288

A fresh private Linux arm64 target used the packaged a288 desktop and its matching deployed server on Node 24.22.1. With both Claude and Codex, targeted retries closed and reopened the primary through Session History while its same-family sibling continued its real shell tool. The reopened primary retained its native ID, history, model, effort, and permissions. The original rig-missed attempts remain incomplete and retained.

Both agents also received an owner TERM during an active shell tool and produced fresh public replies after reconnecting in the same session. The full shutdown acceptance remains incomplete: raw owner/provider exit, physical EOF, and writer/ledger/lock release ordering were not established. Later scoped process, holder, and listener clearance establishes teardown only. This evidence carries to d596 through its main merge; the actual package source is a288. WSL and the matched memory benchmark remain outstanding.

Claude primary after reopen, showing the earlier interrupted owner turn and fresh reconnect reply:

Claude SSH primary reopened

Codex primary after reopen, showing the interrupted tool and fresh reconnect reply. The fresh fixture's bundled-bubblewrap warning is visible:

Codex SSH primary reopened

@brennanb2025 brennanb2025 changed the title WIP: replace per-chat supervisors with protected direct streams Reduce POSIX chat overhead with direct agent processes Oct 21, 2026
@brennanb2025
brennanb2025 marked this pull request as ready for review October 21, 2026 05:33
@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review.

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 30ddc212-e35f-4ad3-bcde-8b0651f5d837
📥 Commits

Reviewing files that changed from the base of the PR and between d40c85d and 0ba3b13.

⛔ Files ignored due to path filters: 1
  • src/main/runtime/__snapshots__/structured-agent-launch-parity.test.ts.snap is excluded by !**/*.snap
📒 Files selected for processing: 3
  • src/main/claude/claude-supervised-stop-real-cli.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host.ts
  • src/main/runtime/structured-agent-launch-parity.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

Walkthrough

Provider processes now launch directly and use managed process groups, cleanup budgets, output draining, and a persisted launch ledger instead of the removed supervisor flow. Provider consumers and RPC connections use managed settlement and revised close handling. Startup and recovery paths verify recorded processes and resources, including Codex home writers and structured-session owners. POSIX process identity probes now use UTC timestamps. ORCA secret-store preparation and credential migration use a separate startup helper.

Priority: Normal

Merge Risk: Moderate · up to 0ba3b

A throwing exit listener may leave process consumers waiting indefinitely, and a process test may fail on hosts without /usr/bin/python3. Resolve or explicitly accept these risks before merging.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 30.91% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 110 functions across 76 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check Warning The description covers the change, rationale, testing, visual proof, review, risks, and known validation gaps. It does not provide the required linked issue: the author states “Lane requested” and “No… Add the actual linked issue under “Linked Issue” using Fixes #<issue-number> or the applicable issue reference. Update the testing and checklist sections so their checkbox states match the documented validation, or explain why each unchec…
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the primary change: reducing POSIX chat overhead by using direct agent processes.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description covers the change, rationale, testing, visual proof, review, risks, and known validation gaps. It does not provide the required linked issue: the author states “Lane requested” and “No new issue created,” while the template requires an actual issue reference. The checklist also leaves required testing items unchecked, although the body documents partial testing.

Resolution

Add the actual linked issue under “Linked Issue” using Fixes #&lt;issue-number&gt; or the applicable issue reference. Update the testing and checklist sections so their checkbox states match the documented validation, or explain why each unchecked requirement is not applicable.

✨ Finishing Touches: 💡 2
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a5f37cc0-98db-4543-9972-468e5e643c55
📥 Commits

Reviewing files that changed from the base of the PR and between 70b2197 and d7122e1.

⛔ Files ignored due to path filters: 1
  • src/main/runtime/__snapshots__/structured-agent-launch-parity.test.ts.snap is excluded by !**/*.snap
📒 Files selected for processing: 93
  • config/tsconfig.cli.json
  • src/main/acp/acp-agent-connection.test.ts
  • src/main/acp/acp-agent-connection.ts
  • src/main/acp/acp-json-rpc-peer.ts
  • src/main/acp/acp-peer-limits.ts
  • src/main/acp/acp-structured-launch-resolution-omp.test.ts
  • src/main/acp/acp-structured-launch-resolution-opencode.test.ts
  • src/main/acp/acp-structured-launch-resolution.test.ts
  • src/main/claude/claude-agent-sdk-exit-proof.ts
  • src/main/claude/claude-agent-sdk-process-spawn.test.ts
  • src/main/claude/claude-agent-sdk-process-spawn.ts
  • src/main/claude/claude-child-exit-proof-ladder.test.ts
  • src/main/claude/claude-child-exit-proof-ladder.ts
  • src/main/claude/claude-model-catalog-probe.test.ts
  • src/main/claude/claude-stream-json-connection-close.test.ts
  • src/main/claude/claude-stream-json-connection.test.ts
  • src/main/claude/claude-stream-json-connection.ts
  • src/main/claude/claude-supervised-stop-real-cli.test.ts
  • src/main/claude/claude-supervised-stop.integration.test.ts
  • src/main/codex-cli/codex-home-process-lock.ts
  • src/main/codex/codex-app-server-client.test.ts
  • src/main/codex/codex-app-server-connection-exit-order.test.ts
  • src/main/codex/codex-app-server-connection-tree-unproven.test.ts
  • src/main/codex/codex-app-server-connection.test.ts
  • src/main/codex/codex-app-server-connection.ts
  • src/main/codex/codex-app-server-exit-error.test.ts
  • src/main/codex/codex-app-server-exit-error.ts
  • src/main/codex/codex-app-server-session-stop.test.ts
  • src/main/codex/codex-app-server-session-supervision.test.ts
  • src/main/codex/codex-app-server-session.ts
  • src/main/codex/codex-state-db-backfill-recovery-process.test.ts
  • src/main/codex/codex-state-db-backfill-recovery-process.ts
  • src/main/codex/codex-state-db-backfill-recovery-supervision.test.ts
  • src/main/codex/codex-state-db-backfill-recovery.test.ts
  • src/main/codex/codex-state-db-backfill-recovery.ts
  • src/main/jsonl-rpc/agent-connection.test.ts
  • src/main/jsonl-rpc/agent-connection.ts
  • src/main/jsonl-rpc/peer-limits.ts
  • src/main/jsonl-rpc/peer.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-probe-runner.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host-runtime-state.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host-teardown.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host-teardown.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-recovery-resolution.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-recovery-resolution.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-restart-reconcile.ts
  • src/main/opencode/opencode-launch-model-context-cleanup.test.ts
  • src/main/opencode/opencode-launch-model-context-supervision.test.ts
  • src/main/opencode/opencode-launch-model-context.ts
  • src/main/orcad/orcad-entry.ts
  • src/main/orcad/orcad-secret-store-startup.ts
  • src/main/provider-process/legacy-provider-supervisor.test-fixture.ts
  • src/main/provider-process/managed-provider-process-fallback-tree.test.ts
  • src/main/provider-process/managed-provider-process-grace.test.ts
  • src/main/provider-process/managed-provider-process-root-only.test.ts
  • src/main/provider-process/managed-provider-process.test.ts
  • src/main/provider-process/managed-provider-process.ts
  • src/main/provider-process/provider-external-tree.ts
  • src/main/provider-process/provider-group-guard-launch-paths.test.ts
  • src/main/provider-process/provider-group-orphan-guard.integration.test.ts
  • src/main/provider-process/provider-group-orphan-guard.test.ts
  • src/main/provider-process/provider-group-orphan-guard.ts
  • src/main/provider-process/provider-process-close.ts
  • src/main/provider-process/provider-process-direct.test.ts
  • src/main/provider-process/provider-process-group.ts
  • src/main/provider-process/provider-process-launch.ts
  • src/main/provider-process/provider-process-ledger.ts
  • src/main/provider-process/provider-process-output.ts
  • src/main/provider-process/provider-process-row-read.ts
  • src/main/provider-process/provider-process-supervisor.integration.test.ts
  • src/main/provider-process/provider-process-supervisor.test.ts
  • src/main/provider-process/provider-process-supervisor.ts
  • src/main/provider-process/provider-process-timing.ts
  • src/main/provider-process/provider-spawn-failure-report.test.ts
  • src/main/provider-process/provider-spawn-failure-report.ts
  • src/main/provider-process/supervised-child-process-stop.ts
  • src/main/rate-limits/codex-fetcher-auth-errors.test.ts
  • src/main/rate-limits/codex-fetcher-credit-balance.test.ts
  • src/main/rate-limits/codex-fetcher-probe-shutdown.test.ts
  • src/main/rate-limits/codex-fetcher-runtime-pairing.test.ts
  • src/main/rate-limits/codex-fetcher-session-supplement.test.ts
  • src/main/rate-limits/codex-fetcher.test.ts
  • src/main/rate-limits/codex-fetcher.ts
  • src/main/runtime/structured-agent-launch-parity.test.ts
  • src/main/startup/main-process-runtime-service.ts
  • src/main/text-generation/commit-message-model-discovery.ts
  • src/main/text-generation/commit-message-text-generation-model-discovery.test.ts
  • src/main/text-generation/source-control-agent-launch.test.ts
  • src/main/text-generation/source-control-agent-launch.ts
  • src/main/text-generation/source-control-local-process.test.ts
  • src/main/text-generation/source-control-local-process.ts
  • src/main/text-generation/source-control-text-generation-types.ts
💤 Files with no reviewable changes: 19
  • config/tsconfig.cli.json
  • src/main/codex/codex-state-db-backfill-recovery-supervision.test.ts
  • src/main/provider-process/managed-provider-process-grace.test.ts
  • src/main/claude/claude-supervised-stop.integration.test.ts
  • src/main/provider-process/provider-spawn-failure-report.ts
  • src/main/provider-process/provider-spawn-failure-report.test.ts
  • src/main/provider-process/managed-provider-process-fallback-tree.test.ts
  • src/main/opencode/opencode-launch-model-context-supervision.test.ts
  • src/main/provider-process/provider-group-guard-launch-paths.test.ts
  • src/main/claude/claude-child-exit-proof-ladder.test.ts
  • src/main/provider-process/provider-group-orphan-guard.integration.test.ts
  • src/main/provider-process/provider-process-supervisor.integration.test.ts
  • src/main/codex/codex-app-server-exit-error.test.ts
  • src/main/provider-process/provider-group-orphan-guard.ts
  • src/main/codex/codex-app-server-session-supervision.test.ts
  • src/main/provider-process/provider-process-supervisor.test.ts
  • src/main/provider-process/provider-group-orphan-guard.test.ts
  • src/main/provider-process/supervised-child-process-stop.ts
  • src/main/provider-process/provider-process-supervisor.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.

@OrcaWin

OrcaWin commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

Closing this version after reviewing it against the performance acceptance bar in discussion #27143: free wins, or gains substantial enough to justify their cost.

Removing a Node supervisor per POSIX chat is a plausible memory improvement, but this implementation is not a free win. It replaces independent owner-death cleanup with host-owned process groups and recovery on a later startup; the body explicitly allows agents/tools that ignore closed stdin to survive a killed host. It also introduces a persisted ownership inventory, periodic output-triggered process/descendant captures, per-resource writer adjudication, recovery concurrency/deadlines, and legacy-owner recovery across the provider consumers.

At the audited head d5962eb5daa65e3124fc7662a113c193888acdcb, the current validation section explicitly says the matched 0/1/20/28-live-chat memory and finite tool-churn measurements are still required, and claims no measured memory benefit. The real-agent reply/Stop/recovery observations and passing CI are useful correctness evidence, but do not establish the net memory/CPU/churn benefit or justify this lifecycle tradeoff. I read the production delta and traced the existing supervisor on main 0cee6cbd863f286813ddbfdf8d9cb568e52ae059; this closure is about the unsupported cost/benefit case, not merge conflicts or claiming the change already shipped.

A narrower follow-up can carry a measured substantial gain with the crash-cleanup tradeoff made explicit. Independently useful fixes, such as bounded headless chat shutdown or process-identity hardening, can be retained separately. Preserving the branch and its QA evidence.

@OrcaWin OrcaWin closed this Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants