[Windows Desktop 26.810.41047] Local STDIO MCP process groups accumulate and consume ~7 GB RAM
Open 💬 3 comments Opened Aug 14, 2026 by ggoingDown
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
Title: [Windows Desktop 26.810.41047] Local STDIO MCP process groups accumulate and consume ~7 GB RAM
Environment:
- Windows
- ChatGPT/Codex desktop app 26.810.41047
- Local STDIO MCP servers: Playwright, todo-query, node_repl
Actual behavior:
After starting/resuming multiple Codex threads, local MCP process groups accumulate and are not reclaimed when most threads become idle or unloaded.
Observed:
- 26 identical MCP process groups
- 183 processes total
- Approximately 7 GB RAM and 1,200 threads
- Each group contains:
- 1 node_repl.exe
- 2 Python processes for todo-query
- 2 cmd.exe and 2 node.exe processes for Playwright MCP
- The app listed only 1 active and approximately 4 idle threads at the time
- System became noticeably unresponsive
Logs show each thread/start initializing a new MCP manager and launching the configured STDIO servers. Some temporary groups exit gracefully, but many remain attached to the main Codex process.
Expected behavior:
MCP processes belonging to closed, unloaded, or expired thread runtimes should be terminated or reused instead of accumulating.
Workaround:
Restarting the app or disabling local MCP servers releases/prevents the accumulated processes.
3 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Additional reproduction on a newer Windows Desktop build, with a full process-tree breakdown and before/after mitigation.
Environment
26.810.7004.0x64codex-cli 0.148.0-alpha.9node_replunityMCPcomfyuijcodemunchObserved process fan-out
Although only two tasks were intentionally active, the app-server retained/restored approximately 29 execution contexts.
Each retained context started this process set:
| Server | Processes per context |
|---|---:|
|
node_repl| 1 ||
unityMCP| 1 Node process ||
comfyui| 1 Node process ||
jcodemunch| 5-process chain (uvx -> uv -> python -> jcodemunch-mcp -> python) || Total | 8 |
A process-tree snapshot showed:
codex.exe app-serverAt the system level this coincided with:
The arithmetic was consistent with the tree:
29 retained contexts * 8 MCP processes = 232, plus a few app/tool helper processes.These were not leftovers from an older app-server instance. They were descendants of the current app-server and had been started after the current Desktop launch. Some MCP groups remained alive for roughly 68–97 minutes. Counts occasionally dropped as individual contexts were eventually cleaned up, which looks like delayed/partial cleanup rather than permanent OS orphans.
Mitigation and confirming evidence
I changed the four task-specific STDIO MCP servers to
enabled = false, kept only the bundlednode_replenabled, and fully restarted Codex Desktop.After restart:
node_repl.exeprocesses, stable across repeated samplesunityMCPprocessescomfyuiprocessesjcodemunch/uv/uvx/ Python processesnode_replinstances together: about 133 MB working set / 44 MB private memoryThis strongly suggests that per-context STDIO startup is multiplying the cost of every globally enabled server. Disabling the heavy servers removes the severe resource impact, but it does not eliminate the underlying retention: 13
node_replworkers still remained while only a small number of tasks were active.Expected behavior
The configuration-only workaround is effective but removes tools globally. I can provide sanitized PowerShell process-tree collection logic if useful.
I traced the current
mainlifecycle for the Windows process accumulation reported here.The remaining leak is at MCP runtime publication/shutdown boundaries:
McpRuntime::publishreplaces the publishedMcpConnectionSet, while bindings and prepared calls can still hold the previous set.McpRuntime::shutdownonly shut down the latest published set, so a superseded stdio generation could remain alive when an older binding was still in flight.I prepared a focused local patch that:
This is ownership-based cleanup; it does not scan or kill processes by name/PID. Formatting and diff checks pass locally. Full Rust compilation is currently blocked on my Windows checkout because
link.exe/MSVC Build Tools are not installed, so I am not claiming the test suite passed.The repository's contributing guide says external PRs require maintainer invitation. If this direction matches the intended fix, I can provide the focused branch/PR after an invitation.