diff --git a/apps/server/src/codexAppServerManager.ts b/apps/server/src/codexAppServerManager.ts index 3145038647..c06a3d2614 100644 --- a/apps/server/src/codexAppServerManager.ts +++ b/apps/server/src/codexAppServerManager.ts @@ -31,7 +31,8 @@ import { resolveCodexModelForAccount, type CodexAccountSnapshot, } from "./provider/codexAccount"; -import { buildCodexInitializeParams, killCodexChildProcess } from "./provider/codexAppServer"; +import { buildCodexInitializeParams } from "./provider/codexAppServer"; +import { killChildProcessTree } from "./process/killTree"; export { buildCodexInitializeParams } from "./provider/codexAppServer"; export { readCodexAccountSnapshot, resolveCodexModelForAccount } from "./provider/codexAccount"; @@ -306,15 +307,6 @@ function mapCodexRuntimeMode(runtimeMode: RuntimeMode): { }; } -/** - * On Windows with `shell: true`, `child.kill()` only terminates the `cmd.exe` - * wrapper, leaving the actual command running. Use `taskkill /T` to kill the - * entire process tree instead. - */ -function killChildTree(child: ChildProcessWithoutNullStreams): void { - killCodexChildProcess(child); -} - export function normalizeCodexModelSlug( model: string | undefined | null, preferredId?: string, @@ -908,7 +900,7 @@ export class CodexAppServerManager extends EventEmitter