From d7d5245d0b792aee94ca310cffe041c0b64de38e Mon Sep 17 00:00:00 2001 From: Merge Sim Date: Wed, 9 Sep 2026 16:28:42 -0700 Subject: [PATCH] fix(codex): account the naming child on the unexpected-exit path too An unexpected app-server death orphan-killed the naming child without registering it, so full shutdown could not prove that one stopped. --- src/main/codex/codex-structured-session-acquire.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/codex/codex-structured-session-acquire.ts b/src/main/codex/codex-structured-session-acquire.ts index 72cef965bfc..46f66055478 100644 --- a/src/main/codex/codex-structured-session-acquire.ts +++ b/src/main/codex/codex-structured-session-acquire.ts @@ -146,6 +146,9 @@ export async function acquireCodexStructuredSession(input: { error, prompts: acquisition.prompts, onBackgroundTasksChanged: deps.onBackgroundTasksChanged, + // An unexpected death orphans the naming child too; shutdown + // still has to prove that one stopped. + namingOrphans, ...(deps.onEvent ? { onEvent: deps.onEvent } : {}) }) } finally {