Repository navigation
Description
Summary
On Windows, one long-running Codex app-server process inside the ChatGPT desktop app accumulated about 140 idle helper processes over roughly 42 hours: 39 node_repl.exe, 20 codex-app-tools MCP servers (each a cmd.exe plus node.exe pair), 20 more bundled node.exe helpers, and a conhost.exe for nearly every one. All were idle (0% CPU). The PC became sluggish; fully quitting ChatGPT removed the tree and the system was immediately responsive again.
This looks like the same lifecycle problem as #29079 (reported on 26.616), still present on the current build, with a more specific breakdown below.
Environment
- App: ChatGPT desktop with Codex, package
OpenAI.Codex 26.1029.7803.0 - OS: Windows 11 Pro 10.0.26300, 64-bit, 64 GB RAM, 16 logical processors
- Usage: long-running app session with many Codex threads over two days; bundled plugins present: browser, chrome, codex-app-tools, computer-use, unified-computer-use, visualize
Observed (snapshot 2026-11-05 ~13:55 local)
System total: 635 processes, 118 of them conhost.exe.
Seven codex.exe processes were running under ChatGPT.exe. Six had zero or one child. One, started 2026-11-03 20:15 (about 42 hours earlier), owned almost all helpers:
Child of that one codex.exe |
Count |
|---|---|
node_repl.exe |
39 |
cmd.exe → node.exe (cmd /d /s /c call ./scripts/launch_codex_app_tools_mcp.cmd ./server.mjs) |
20 |
node.exe (%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\<hash>\bin\node.exe --import file:///%USERPROFILE%/.codex/plugins/cache/openai-bundled/unified-co…) |
20 |
codex-code-mode-host.exe |
1 |
Further down the same tree: 24 more node.exe processes were children of node_repl.exe (14 direct, 10 under node.exe), and conhost.exe was attached to each node_repl.exe (39), each cmd.exe (20) and each direct node.exe (20).
Resource use of the whole ChatGPT/Codex family at that moment: ChatGPT 27 processes / 4.2 GB private, node 69 / 3.9 GB, node_repl 59 / 0.24 GB, codex 7 / 1.2 GB. A 5-second CPU sample showed every node and node_repl at 0%.
The counts (20 app-tools servers, 20 computer-use helpers, ~40 REPLs) suggest that one per thread or tool session is started and never stopped when the thread goes idle or is closed, so they pile up for the lifetime of the app-server process.
Expected
Helper MCP servers and REPLs belonging to a thread should exit when the thread is closed or idle, or be shared, so the count stays bounded no matter how long the app runs.
Workaround
Fully quit ChatGPT from the system tray and reopen it. That ends the whole tree immediately.
Notes
- Command lines are trimmed and user paths replaced with environment variables.
- The tree was ended by quitting the app before more diagnostics could be collected; I can capture a fresh tree, with creation times per child, if that would help.
- Related: Codex Desktop on Windows leaves Node/MCP helper processes alive until memory pressure makes PC unresponsive #29079, Codex Desktop on Windows accumulates Node REPL/MCP/stdio app-server helper stacks during long multi-thread sessions #26327.
Activity
github-actions commentedon Nov 5, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
getrdone commentedon Nov 9, 2026
Reviewed the suggested duplicates; neither covers this report fully.
SubagentStop→cua_repl.turn_endedpath starting a dormant CUA runtime would explain the 39node_repl.exeand 20cua_nodenode.exehelpers here. That report is Linux-only, though, and does not account for the 20codex-app-toolsMCP servers (cmd.exe→node.exevialaunch_codex_app_tools_mcp.cmd) or the per-helperconhost.exeprocesses seen on Windows.Keeping this open as the Windows report covering accumulation across helper types. Happy to capture a fresh process tree with per-child creation times if that helps confirm whether the
codex-app-toolsservers follow the same subagent-cleanup path.itmminfo commentedon Nov 12, 2026
Still happening on Codex Desktop 26.1106.6628.0 (app-server codex-cli 0.167.0-alpha.4.1) on Windows 11.
After ~16h one app-server had 256 direct children: 96 node_repl.exe, 56 unified-computer-use node.exe, 85 node.exe for user-configured stdio MCP servers, 17 cmd.exe (launch_codex_app_tools_mcp.cmd). The app-server had 552 threads and ~4000 handles. Then:
agent thread limit reached, MCP handshake timeouts (10s/30s/120s),response_orphanedfor getAuthStatus,[Composer] submit failed ... Timed out waiting for MCP response to getAuthStatus. Restarting the app cleared it.Teardown itself works on Windows too (same direction as #56937 and the follow-up on #56335). With a headless app-server, a temp CODEX_HOME with one dummy stdio MCP server and no auth, a thread with no subscribers gets thread/closed about 60s after thread/unsubscribe and its dummy MCP process is killed. The dummy ignores stdin EOF, so it is the app-server that kills it. The script below shows this.
One retention path I could reproduce, in a separate run against a local mock Responses endpoint (that script is not included): the parent's turn spawns a v1 subagent, both turns complete.
The client never started the child and got no thread/started for it, but the app-server attached it anyway (try_attach_thread_listener in app-server/src/lib.rs). The finished child stays loaded with its own MCP process until the client unsubscribes from it, and unloading the parent does not touch it.
This does not cover everything I saw in the desktop app. Matching process start times against the app-server log, the surviving sets looked like top-level threads the desktop opened or resumed and never unsubscribed, plus multi-agent v2 subagents that were not evicted. That part is an observation from my logs, not a controlled repro. For subagents, node_repl and cua_repl also come from #59213 (their MCP startup is lazy, but SubagentStop calls turn_ended with wait_for_server = true).
Repro (Node + pwsh, Windows):
node repro.mjs <path-to-codex.exe> 3, optionalIDLE_MS(default 90000). It creates its own temp CODEX_HOME with the dummy server, passes a minimal env without API keys, only looks at its own child processes and removes the temp dir at the end.repro.mjs