[Windows] Multiple Codex tasks duplicate MCP processes and cause system-wide input lag
Bug description
On Windows, creating multiple Codex tasks causes local MCP/app-server processes to be initialized repeatedly. The resulting process and console-host explosion makes the entire system extremely sluggish: typing in other applications becomes delayed, normal window operations stutter, and the machine sometimes produces repeated short beep sounds.
Reproduction
- Restart Windows.
- Launch the Codex desktop app with the existing global MCP configuration.
- Create three new Codex tasks/windows.
- Continue using another application while Codex remains open.
- Observe the process counts and system responsiveness.
Observed behavior
After restart, before creating the additional tasks:
- Node MCP processes: 5
- Python MCP processes: 4
- conhost.exe processes: 9
- Total processes: approximately 337
As three new Codex tasks/windows were created, monitoring showed:
- Node MCP processes: 5 -> 15 -> 25 -> 35
- Python MCP processes: 4 -> 12 -> 20 -> 28
- conhost.exe processes: 9 -> 91, later peaking at 607
- Total processes peaked at approximately 1,552
- CPU usage peaked at 66.76%
- Processor queue peaked at 94
- Context switches peaked at approximately 133,693/second
Each new task appeared to add approximately two complete copies of the local MCP set.
The system became difficult to use even when no large task was actively running. Typing in other applications was delayed and the Codex app occasionally became unresponsive.
Environment
- OS: Windows
- Codex desktop package observed: 26.715.3651.0
- Global configuration: 11 MCP servers
- 9 local stdio servers (5 Node-based and 4 Python-based)
- 1 local node_repl
- 1 HTTP server for OpenAI developer documentation
The configuration/control-plane check found no invalid providers, duplicate registrations, missing source paths, or malformed configuration entries.
Additional observations
- The OpenAI developer documentation MCP endpoint sometimes failed to connect and retried; this may be an additional amplifier but does not explain the process multiplication by itself.
- During the clean three-task measurement, no workspace files were continuously written.
- DPC latency was low (approximately 0.36%), and disk latency was low, so the primary symptom appears to be process/scheduling pressure rather than an audio, GPU, or disk bottleneck.
- The suspected cause is per-task duplication of MCP/app-server initialization and related command-runner/Git-watcher processes. This is a hypothesis based on process-count correlation, not a confirmed internal implementation detail.
Expected behavior
Opening multiple Codex tasks should keep MCP/app-server processes bounded and should not cause system-wide input lag or severe process creation pressure.
5 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I reproduced the same issue on Windows with a deterministic Open in New Window trigger and collected ETW/process-tree evidence.
Environment
26.715.4045.0Reproduction
Observed in a 138.69-second trace
88.8%, p95/max100%11.1, p9552, max69764%, max774%42Responding=Falseobserved7.922s8.203sHasGhostedandIsSpinning0The window action produced two distinct MCP startup waves. One configured MCP used
npx, creatingcmd -> npx Node -> cmd -> server Nodechains. Defender scanning, renderer/GPU work, app-server work, and the duplicated MCP startup burst saturated all logical CPUs. Disk latency and DPC/ISR measurements did not explain the stall.A/B result and workaround
npx-launched server with a pinned direct Node entry, removed the duplicated heavy-process burst.Responding=False=0and heavy local stdio MCP count0; only bounded 2-3 second transient load remained.3,601samples) recordedResponding=False=0, gateway/policy failures0, and no process-generation changes.This supports #33946 as a Codex Desktop MCP lifecycle/resource-bounding defect: local stdio MCP pools are started per task/window without sufficient pooling, lazy startup, or burst limits, and the resulting initialization wave can block system-wide input on Windows.
I can provide sanitized ETL and process-tree summaries if maintainers want them.
Follow-up after moving heavy local stdio MCPs behind the shared gateway:
Residual reproduction with heavy stdio count = 0
A later controlled Desktop-tooling trial started from:
node_replprocesses:24360One tiny-task creation request returned a deferred tool error, after which 5 tiny tasks were observed. This is an API/tooling-path reproduction; I am not claiming that one manual UI action always creates five tasks.
Within 36 seconds of the request, the 1-second monitor observed:
6Codex windows hung for 2 seconds76.17% -> 92.35%04.17 / 5.48 msnode_repl=29The before/after markers later reached:
node_repl: 24 -> 3636 -> 84The tasks were archived without terminating any process. Counts recovered naturally from
31/64to25/40, but were still+1 node_repl / +4 sessionsabove the24/36baseline at 02:32 JST.A separate 480-second post-trial monitor with
node_repl=31stable recorded:0015.40 ms0A real WinForms mouse + SendKeys round trip recorded:
98.8 ms801.775 ms852.191 msEvidence limits
node_replvalue in the hang row came from the periodic inventory cache.So this is a time-correlated candidate mechanism, not final internal attribution. It does add evidence that lifecycle/reclamation pressure can remain in the built-in
node_repl/gateway path even when duplicated heavy local stdio MCP processes are already eliminated.I can reproduce/corroborate this on a newer Windows desktop build.
Environment
OpenAI.Codex_26.810.6296.0_x64__2p2nqsd0c76g0Observed behavior
After the recent Codex update, the Windows desktop becomes noticeably laggy when Codex has several active tasks/processes. This is system-wide stutter, not just a slow Codex window.
The correlation has been confirmed locally: normal work remains responsive before Codex expands into multiple renderer/task/helper processes; the lag appears once those Codex processes are active.
At a live affected snapshot:
ChatGPT.exeprocesses: about 2,736 MB total working set / 2,629 MB private memorycodex.exe app-server: about 322 MB working setnode_repl.exehelper processesThis was not ordinary RAM exhaustion:
Opening Chrome was once observed to make the stutter appear more obvious, but the reproducible underlying correlation is Codex process/task expansion, not Chrome itself. Closing unrelated applications did not reliably restore responsiveness.
Please investigate per-task process duplication/retention and Windows scheduling or input-lag effects in the current desktop package.
Confirmed on Codex Desktop for Windows version 26.814.5167.0.
Environment:
Observed:
uvx.exeand 16uv.exeprocesses for the sameha-mcp@latestserver.codex.exeapp-server process.uv.exe, causing a Winget update to fail withremove: Access is denied.This strongly supports an MCP process-lifecycle/resource-retention issue in the Windows desktop app rather than a problem with the MCP server itself.