[Windows 26.818] MCP process-batch accumulation and incomplete cleanup still reproducible with 5 MCP servers
What version of the Codex App are you using (From “About Codex” dialog)?
OpenAI.Codex_26.818.8289.0
What subscription do you have?
Plus
What platform is your computer?
Microsoft Windows NT 10.0.26100.0, x64
What issue are you seeing?
Codex Desktop repeatedly launches complete or near-complete sets of configured stdio MCP servers during ordinary task activity. Older MCP process trees remain alive instead of being reclaimed, causing cmd.exe and node.exe processes and their memory usage to accumulate over the lifetime of the Desktop session.
The affected configuration contained five Node/npx-based MCP servers: Context7, Sequential Thinking, Memory, Playwright, and Chrome DevTools. Some were configured directly, while Playwright and Chrome DevTools were supplied by plugins, so the behavior does not appear specific to one MCP package.
The observed Windows process chain was:
codex.exe app-server
-> cmd.exe /c npx ...
-> npx.cmd
-> cmd.exe /d /s /c ...
-> node.exe
The child processes appeared in distinct start-time batches: one around 13:56 and several more around 15:56–15:59.
A process-tree snapshot attributable to the live Codex app-server contained approximately:
- 30
cmd.exeprocesses - 34
node.exeprocesses - ~3.7 GB combined working-set memory
The same MCP server names occurred repeatedly across the batches. Completing or closing the visible task did not reclaim the older process trees. The wrappers also caused visible cmd.exe console-window flashes on Windows.
Disabling MCP entries in config.toml did not terminate already-running children. A full Codex Desktop tray exit/restart was required before the reduced MCP configuration took effect.
What steps can reproduce the bug?
- Start Codex Desktop on Windows with multiple stdio MCP servers configured. In my case these included Context7, Sequential Thinking, Memory, Playwright, and Chrome DevTools.
- Use Codex Desktop normally across multiple tasks/session activity while leaving the Desktop app running.
- Inspect the process tree of the active
codex.exe app-serverin Task Manager or PowerShell. - Observe multiple start-time batches containing repeated instances of the same MCP servers under
cmd.exe/npx.cmd/node.exe. - Complete or close the visible Codex task and inspect the process tree again.
- The older MCP process trees remain alive rather than being reclaimed.
- Disable manually configured MCP entries in
config.toml. - Observe that already-running MCP children remain alive.
- Fully exit Codex Desktop from the system tray and restart it.
- The stale processes from the previous app-server generation are finally removed.
In my observed incident, the live app-server process tree accumulated approximately 30 cmd.exe processes and 34 node.exe processes, using about 3.7 GB of combined working-set memory.
What is the expected behavior?
Codex Desktop should keep the number of MCP server processes bounded.
When an MCP connection manager/runtime generation is replaced, the previous MCP server set should be shut down and the complete Windows process tree should be reaped, including cmd.exe-wrapped node.exe grandchildren.
Completing tasks or disabling MCP servers should not leave stale MCP process trees alive.
Background MCP wrappers should also launch without visible cmd.exe console windows.
Additional information
This appears closely related to #32797, #34614, and #38825.
I am filing this as a separate current-build reproduction because the same process-batch accumulation and incomplete cleanup behavior is still reproducible on the newer Codex Desktop package OpenAI.Codex_26.818.8289.0.
Unlike #32797, which reports a much larger MCP configuration, my affected setup contained only five Node/npx-based MCP servers (Context7, Sequential Thinking, Memory, Playwright, and Chrome DevTools). Despite the smaller configuration, the live Codex app-server process tree still accumulated approximately 30 cmd.exe processes and 34 node.exe processes, using about 3.7 GB of combined working-set memory.
The processes appeared in distinct start-time batches, with the same MCP server names recurring across batches. Completing the visible task did not reclaim the older process trees. Disabling MCP entries in config.toml also did not terminate already-running children; a full Codex Desktop tray exit/restart was required before the reduced configuration took effect.
The bundled Codex version observed from the Desktop process was 0.149.0-alpha.4.3. A separate codex executable exists on my PATH, but it is not the Desktop-bundled binary and was not used as the Desktop version reported above.
I can provide a fresh sanitized process snapshot containing PID, PPID, process name, sanitized command line, start time, and working-set memory if useful for identifying which app-server/runtime generation owns each stale MCP process tree.
I have intentionally not attached my full config.toml for security reasons.
2 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Thanks for the pointer to #39982.
For comparison, this reproduction was observed on Codex Desktop package
OpenAI.Codex_26.818.8289.0on Windows. During ordinary task/session activity,complete or near-complete sets of configured stdio MCP servers appeared in
distinct process start-time batches.
The observed Windows process chain was:
codex.exe app-server -> cmd.exe -> npx.cmd -> cmd.exe -> node.exeThe live app-server process tree contained approximately 30
cmd.exeprocessesand 34
node.exeprocesses, with about 3.7 GB combined working-set memory,while the affected configuration contained five Node/npx-based MCP servers.
Completing the visible task did not reclaim the older process trees. Disabling
MCP entries in
config.tomlalso did not terminate already-running children.The stale processes remained until a full Codex Desktop tray exit/restart.
Visible
cmd.execonsole flashes were also observed during MCP launches.These are the observations from this Codex Desktop reproduction. I am adding
them here so maintainers can compare the process lifecycle and teardown behavior
with #39982 and determine whether they share the same underlying cause.