Skip to content

Windows Desktop: bundled node_repl MCP processes leak one-per-thread, never reaped until app-server exit #35485

Description

@mingisrookie

What version of Codex is running?

  • Codex Desktop 26.721.4979.0 (native Windows, no WSL)
  • app-server: codex-cli 0.146.0-alpha.3.1
  • Bundled runtime: cua_node/f8d2abcb7481383b

What operating system are you using?

Windows 11 x64, 24 GB RAM.

What is the issue?

node_repl.exe MCP server child processes accumulate over the life of the codex.exe app-server process and are never reaped. One new node_repl.exe appears roughly per opened conversation/thread, stays alive after the thread is idle or closed, and only goes away when the app-server itself exits.

Snapshot after ~8 hours of normal Desktop usage — 14 live node_repl.exe, all children of the single app-server PID, all idle (0 CPU since spawn):

ProcessId CreationDate            Parent
17248     12:41  (app start)      codex.exe (1772)
16888     13:12                   codex.exe (1772)
19040     13:43                   codex.exe (1772)
 5508     15:18                   codex.exe (1772)
21312     18:40                   codex.exe (1772)
 1668     19:02                   codex.exe (1772)
21144     19:47                   codex.exe (1772)
 9004     19:58                   codex.exe (1772)
20704     19:58                   codex.exe (1772)
21984     20:04                   codex.exe (1772)
20664     20:12                   codex.exe (1772)
14232     20:18                   codex.exe (1772)
20508     20:18                   codex.exe (1772)
20588     20:19                   codex.exe (1772)

Each holds ~7–9 MB working set and ~115–125 handles. Individually small, but they accumulate monotonically (verified creation timestamps map to thread-open events) and add up alongside the other per-thread state. Killing the app-server reaps all of them (verified: after terminating the app-server PID, node_repl.exe count went from 14 to 0).

Relevant config: [mcp_servers.node_repl] pointing at the bundled node_repl.exe, features.computer_use = true, features.multi_agent = true.

What is the expected behavior?

node_repl MCP processes for a thread should be terminated when the thread is closed/idle-expired, or at minimum pooled/reused, instead of leaking one process per thread until app exit.

Additional context

Possibly related to #30408 (per-thread MCP server processes never cleaned up), but this one is specifically the bundled node_repl on native Windows, where each thread spawns a distinct child that outlives the thread.

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appapp-serverIssues involving app server protocol or interfacesbugSomething isn't workingmcpIssues related to the use of model context protocol (MCP) serversperformancewindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions