Skip to content

[Windows 26.818] MCP process-batch accumulation and incomplete cleanup still reproducible with 5 MCP servers #40579

Open

Description

@xswt442-cmd

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.exe processes
  • 34 node.exe processes
  • ~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?

  1. Start Codex Desktop on Windows with multiple stdio MCP servers configured. In my case these included Context7, Sequential Thinking, Memory, Playwright, and Chrome DevTools.
  2. Use Codex Desktop normally across multiple tasks/session activity while leaving the Desktop app running.
  3. Inspect the process tree of the active codex.exe app-server in Task Manager or PowerShell.
  4. Observe multiple start-time batches containing repeated instances of the same MCP servers under cmd.exe / npx.cmd / node.exe.
  5. Complete or close the visible Codex task and inspect the process tree again.
  6. The older MCP process trees remain alive rather than being reclaimed.
  7. Disable manually configured MCP entries in config.toml.
  8. Observe that already-running MCP children remain alive.
  9. Fully exit Codex Desktop from the system tray and restart it.
  10. 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.

Activity

  1. added
    appIssues related to the Codex desktop app
    on Aug 25, 2026
  2. added
    bugSomething isn't working
    windows-osIssues related to Codex on Windows systems
    mcpIssues related to the use of model context protocol (MCP) servers
    app-serverIssues involving app server protocol or interfaces
    on Aug 25, 2026
  3. github-actions commented on Aug 25, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  4. xswt442-cmd commented on Aug 25, 2026

    @xswt442-cmd
    Author

    Thanks for the pointer to #39982.

    For comparison, this reproduction was observed on Codex Desktop package
    OpenAI.Codex_26.818.8289.0 on 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.exe

    The live app-server process tree contained approximately 30 cmd.exe processes
    and 34 node.exe processes, 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.toml also did not terminate already-running children.
    The stale processes remained until a full Codex Desktop tray exit/restart.
    Visible cmd.exe console 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.

  5. UweKeim commented on Sep 6, 2026

    @UweKeim

    I can confirm the same MCP process-batch accumulation and incomplete cleanup on substantially newer Codex Desktop builds. It has reproduced repeatedly on four consecutive days and returned after a full desktop restart and version update. The visible end-user failure is:

    App server request expired while queued

    Environment

    • Microsoft Windows 11 Pro, 64-bit
    • Version 10.0.26200, Build 26200
    • 95.5 GiB physical RAM
    • Codex Desktop Microsoft Store/MSIX package
    • Current affected installation: Codex Desktop 26.901.6511.0 with its embedded app-server codex-cli 0.153.4
    • Also reproduced with:
      • Codex Desktop 26.901.2854.0 / embedded codex-cli 0.153.0
      • Codex Desktop 26.901.4073.0 / embedded codex-cli 0.153.1
      • Codex Desktop 26.901.5280.0 / embedded codex-cli 0.153.4
    • A separately installed codex-cli 0.152.0 is currently on PATH, but it is not the desktop-owned app-server process affected by these measurements.
    • Multiple chats and models were involved. The most recently selected model was displayed in Codex Desktop as GPT 6 Astra with xhigh reasoning effort. The leak affects the shared desktop app-server across chats and does not appear specific to one model or conversation.

    Issue

    Codex Desktop repeatedly accumulates complete local MCP and app-tools process suites that are not terminated after the corresponding thread or tool activity has finished. After several hours, the desktop becomes slow or globally unresponsive across chats and requests eventually expire while queued.

    Across repeated incidents, 22 to 33 near-identical MCP/app-tools start groups accumulated below the single desktop-owned Codex app-server process. The descendant tree reached 427 to 525 processes, approximately 72,000 to 106,000 handles, and approximately 4,500 to 5,400 Windows threads.

    The persisted queue database was empty during the original incident, so the visible error appears to refer to an internal or transient app-server queue rather than the persisted queue.

    Selectively terminating only older duplicated MCP/app-tools subtrees immediately reduced process, handle, thread, and memory counts. Codex Desktop and its app-server remained alive, and the UI continued working without a desktop restart. During the first confirmed recovery, all three concurrently running Codex sessions continued successfully afterwards.

    The workaround is temporary. Complete suites accumulate again, including after a full desktop restart and a desktop version update. On 2026-09-06 the process tree grew back to 427 processes and 22 duplicated start groups within approximately 4 hours 24 minutes of a fresh desktop app-server start.

    Reproduction pattern

    This has reproduced repeatedly on four consecutive days:

    1. Start Codex Desktop on Windows with several globally configured MCP servers and Codex plugins available.
    2. Work in multiple normal chats and scheduled-task chats. Start or resume threads and perform tool calls over several hours.
    3. Observe the process tree below the desktop-owned codex.exe app-server process. New activity starts a broad suite of local MCP/app-tools child processes.
    4. Continue using the app. Older suites remain alive instead of being reaped, and near-identical groups accumulate over time.
    5. Once hundreds of descendants and tens of thousands of handles have accumulated, Codex Desktop becomes slow or hangs across chats. Requests eventually fail with App server request expired while queued.
    6. Without stopping Codex Desktop or its app-server, terminate only the older duplicated MCP/app-tools subtrees while protecting the newest group, the desktop main process, the shared app-server, and the currently executing diagnostic process tree.
    7. Observe an immediate large reduction in descendants, handles, threads, and summed working set. Codex Desktop and active sessions continue without a restart.
    8. Continue using Codex Desktop. The duplicated process suites eventually accumulate again.

    The exact accumulation rate depends on thread and tool activity. The consistently reproduced property is that old complete MCP/app-tools suites remain alive and accumulate below one long-running desktop app-server.

    Expected behavior

    Codex Desktop should reap MCP and plugin/app-tools child processes when their owning initialization, tool call, turn, or thread lifecycle no longer needs them. Starting or resuming additional chats must not leave complete older tool suites running indefinitely.

    If an MCP startup fails, times out, or a child process does not exit normally, the app-server should terminate the abandoned subtree and release its handles. A problem in one MCP should not cause the shared desktop app-server to queue and expire unrelated requests across all chats.

    Long-running Codex Desktop sessions should remain responsive without requiring periodic external process cleanup or a complete desktop restart.

    Observed incident data

    2026-09-03 — Desktop 26.901.2854.0 / embedded CLI 0.153.0

    • 24 complete MCP process sets accumulated.
    • The app-server descendant tree used approximately 17.5 GiB summed working set.
    • 131 old Chrome DevTools MCP-related processes used approximately 4.4 GiB and 26,889 handles.
    • After Chrome-only cleanup was insufficient, 406 additional old MCP-suite processes were targeted; 395 were explicitly stopped and the remainder exited with their parents.
    • Codex Desktop recovered without a restart, and all three active sessions continued successfully.

    2026-09-04 — Desktop 26.901.4073.0 / embedded CLI 0.153.1

    • Approximately 30 to 32 repeated MCP/app-tools groups accumulated.
    • Initial tree: 509 processes, approximately 14.7 GiB summed working set, 94,732 handles, and 5,126 threads.
    • Repeated cleanup was partially neutralized by immediate respawning; 687 old processes were explicitly stopped during the incident while new suites continued to appear.

    2026-09-05 — Desktop 26.901.5280.0 / embedded CLI 0.153.4

    • First measurement: 25 start groups; 515 processes, approximately 17.0 GiB summed working set, 101,924 handles, and 5,366 threads.
    • 487 old processes were stopped with zero stop failures. The same reporting thread stayed functional.
    • Later the same day, the same app-server had accumulated 28 groups and 507 processes again.
    • A second cleanup stopped another 487 old processes and reduced the tree from 507 to 20 processes.

    2026-09-06 — Desktop 26.901.5280.0 / embedded CLI 0.153.4

    • 33 start groups; 525 processes, approximately 15.6 GiB summed working set, 106,101 handles, and 5,373 threads.
    • 500 old processes were stopped with zero stop failures.
    • The tree dropped to 33 processes, approximately 2.6 GiB summed working set, 10,035 handles, and 478 threads.

    2026-09-06 after desktop restart/update — Desktop 26.901.6511.0 / embedded CLI 0.153.4

    • The fresh app-server had been running for approximately 4 hours 24 minutes.
    • 22 duplicated start groups; 427 processes, approximately 13.5 GiB summed working set, 85,320 handles, and 4,531 threads.
    • 389 old processes were stopped with zero stop failures.
    • The tree dropped from 427 to 38 processes, approximately 3.7 GiB summed working set, 12,964 handles, and 557 threads.
    • The app-server itself stayed alive and the reporting thread remained functional.

    MCP configuration inventory at report preparation

    • 20 MCP server definitions: 14 enabled and 6 disabled.
    • Transport totals: 7 STDIO definitions and 13 HTTP definitions.
    • Enabled STDIO categories: analytics, GitLab, Microsoft 365 mail, Node REPL, and one organization-specific automation server.
    • Enabled HTTP categories: OpenAI developer documentation, notes, YouTrack, and six organization/customer-specific business tools whose names are redacted.
    • Disabled definitions: chrome-devtools, codex_data_exchanger, devexpress, gmail_mail, net, and quick_uploader.
    • The leak was observed across multiple MCP types and was not limited to Chrome DevTools. Disabling Chrome DevTools reduced one large subtree but did not resolve the repeated complete-suite accumulation.
    • Full commands, arguments, URLs, HTTP headers, environment variables, and credentials are intentionally omitted.

    Plugin inventory

    The following 22 plugin package manifests were present in the local Codex plugin cache when this report was prepared. Cache presence does not prove that every package was enabled or invoked during an incident:

    • browser 26.901.51231
    • chrome 26.901.51231
    • codex-app-tools 0.1.3
    • codex-security 0.1.23
    • computer-use 26.901.51231
    • deep-research-work 0.1.14
    • documents 26.904.11930
    • github 0.1.12-5f7cd798dc99
    • gmail 0.1.10
    • google-calendar 1.2.7
    • openai-templates 0.1.1
    • outlook-calendar 0.1.9
    • outlook-email 0.1.8
    • pdf 26.904.11930
    • plugin-management 0.1.0
    • presentations 26.904.11930
    • sites 0.1.57
    • spreadsheets 26.904.11930
    • teams 0.1.9
    • template-creator 26.904.11930
    • unified-computer-use 26.901.51231
    • visualize 1.0.29

    The duplicated process groups contained Codex app-tools/plugin runtimes in addition to user-configured MCP processes. This is why I am including the cache inventory, while explicitly not claiming that every cached plugin was active.

    Skill inventory

    • Seven top-level personal/system skill directories were present.
    • One personal skill was explicitly configured as disabled.
    • Public/non-sensitive personal skill names include chrome-devtools (disabled), frontend-design, m365-reply-defaults, playwright, and switch-codex-account. One private workflow skill name is redacted.
    • Additional system and plugin-provided skills were available through the installed plugin packages.
    • Skills appear to be passive instruction files and no standalone skill process was observed. They are included for completeness but are less likely to be the direct cause than the repeatedly orphaned MCP/app-tools process suites.

    Other diagnostic observations

    • The original investigation found 11 stale turns marked inProgress, eight of them approximately 13 hours to 13 days old, and 63 open spawn edges.
    • A later incident found 12 inProgress turns and the same 63 open spawn edges.
    • The persistent queue contained zero entries during the measured incident.
    • Active session files were 226.2 MiB initially and later 471.5 MiB; no active unpinned session exceeded the local 100 MiB recovery threshold.
    • Archived sessions totalled approximately 36.3 GiB. This may be a secondary load factor but does not explain 22 to 33 near-identical live process suites.
    • Sanitized logs contained MCP startup failures and repeated timeout waiting for child process to exit events near the visible queue timeout.
    • The machine still had tens of GiB of free physical memory, so complete system memory exhaustion was not required for the failure.
    • No SQLite database, session file, archive, or global thread metadata was changed by the workaround.
    • The guarded cleanup protected the Codex Desktop main process, the shared app-server, the newest recognized MCP start group, console hosts, and the currently executing diagnostic process tree.

    Working hypothesis

    This is an inference from the repeated local measurements: starting or resuming threads appears to initialize a broad MCP/plugin suite, and completed, failed, or timed-out suites are not consistently reaped. The resulting process and handle accumulation eventually blocks the shared desktop app-server. The empty persisted queue suggests that the visible queue timeout concerns a transient internal queue.

    This looks like the same underlying lifecycle problem described in this issue, now confirmed across newer Desktop and embedded CLI versions, with both user MCP and Codex app-tools/plugin processes present in the leaked suites. It may also be related to #28361, but I am adding the evidence here instead of opening or cross-posting duplicate reports.

  6. yh2561692675-prog commented on Sep 7, 2026

    @yh2561692675-prog

    用途:作为现有 GitHub issue #40579 的补充评论,或通过 Codex / 反馈提交

    相关问题:#40579

    标题:Windows Codex Desktop 26.901.6511.0 still launches MCP stdio servers in visible cmd.exe windows

    环境:

    • Windows
    • OpenAI.Codex 26.901.6511.0
    • Native Windows sandbox: unelevated
    • windows.sandbox_private_desktop = true

    问题描述:
    使用 Codex 桌面应用运行多个本地任务时,黑色控制台窗口会频繁闪现,有时连续出现两个。任务本身不应停止;期望 MCP 和工具继续正常运行但完全不显示控制台窗口。

    已验证:

    1. sandbox_private_desktop 已生效,普通沙盒命令运行在 CodexSandboxDesktop-* 私有桌面。
    2. 弹窗附近捕获到由桌面应用直接创建的进程链:
      cmd.exe <- codex.exe <- ChatGPT.exe <- explorer.exe
    3. 对应命令行:
      cmd.exe /d /s /c call ./scripts/launch_codex_app_tools_mcp.cmd ./server.mjs
    4. 同期还存在本地 stdio MCP 的 python.exe 启动进程(aliyun-drive-mcp/run_pds_stdio.py),与偶发双窗口现象相符。
    5. 外部窗口隐藏器日志多次记录 transparent=False;事后隐藏也无法防止第一帧闪现。

    期望行为:
    Codex 桌面应用启动、重启或重连所有 MCP stdio 服务器时不创建可见控制台窗口,同时保持 MCP 功能不变。

    建议修复:
    Windows 客户端创建 MCP 子进程时使用 CREATE_NO_WINDOW 或等效的隐藏 STARTUPINFO;必须通过 .cmd 启动时,也请无窗口启动 cmd.exe。请同时覆盖内置 codex-app-tools MCP、用户配置的本地 stdio MCP,以及自动重连/重启路径。

    补充说明:
    用户不希望通过禁用 MCP、关闭插件或停止任务来规避该问题。

    该问题在较新的 OpenAI.Codex 26.901.6511.0 上仍可复现;本机捕获到内置 codex-app-tools 通过 launch_codex_app_tools_mcp.cmd 启动,因此不仅影响手工配置的第三方 npx MCP。

  7. jervaise commented on Oct 5, 2026

    @jervaise

    Current Windows measurements for the process-batch / per-thread MCP footprint reported here, collected 2026-10-05. This adds evidence rather than opening a duplicate report.

    Environment: desktop package OpenAI.Codex_26.930.3930.0_x64, desktop-bundled codex-cli 0.160.0, native Windows x64. The bundled executable was queried directly; the separate daemon binary is 0.157.1 and was excluded from the desktop process tree.

    The first desktop-root snapshot contained 381 processes:

    Component Count Summed working sets, GiB
    Node runtimes, including MCPs and npm launch wrappers 128 9.10
    Desktop UI/browser processes 11 1.95
    Console hosts 133 0.98
    Desktop agent / execution servers 2 0.98
    Command wrappers 71 0.55
    Node REPL processes 30 0.30

    Repeated command families included 16 Playwright MCP workers plus 16 retained npx runtimes, 17 Hindsight coding-agent MCP workers, 16 Jerv MCP workers, and 14 computer-use REPL runtimes. Most directly or indirectly descended from the same live desktop app-server. Start-time batches extended from 08:59 through 13:25 local time.

    Memory definitions matter: the first tree totaled 14.22 GiB summed working sets and 10.76 GiB private commit. A later sample had 350 processes, 11.97 GiB summed working sets, and 3.87 GiB exclusive resident working set. Summed working sets double-count shared pages. These measurements do not establish 15 GiB of exclusively occupied physical RAM or a monotonic leak.

    App inventory initially showed five active chats and sixteen idle chats, plus four not-loaded chats. This is not a one-to-one process ownership map. Idle status alone is insufficient to identify a safe shutdown candidate.

    Source inspection at rust-v0.160.0 found:

    • codex-rs/codex-mcp/src/connection_manager.rs:279-280,312-315: initialization iterates enabled MCP registrations; deferred startup depends on LazyWhenCached and a previous manager.
    • codex-rs/app-server/src/request_processors/thread_lifecycle.rs:56-61: unload eligibility requires both no subscribers and inactivity, then the grace delay. The official app-server documentation describes a 30-minute no-subscriber inactivity grace period.

    The standalone Jerv MCP exits cleanly on idle stdin EOF in a controlled installed-binary probe. Hindsight's two parentless ingestion workers were intentionally detached, had live bank leases and operation polling, and were preserved. These checks do not support attributing this footprint to a Hindsight or Jerv idle-EOF leak.

    The confirmed issue here is the large multiplied local-tool footprint. Whether any specific retained desktop-owned pool is abandoned remains unverified because the observed process inventory does not expose connection/subscriber ownership. A supported idle-pool release control and process-to-thread ownership diagnostics would enable safe cleanup without restarting live work. Lazy startup or safe shared runtimes could reduce the baseline footprint.

    Related integration improvement filed separately: https://github.com/mutmutco/Jerv-Hub/issues/1912 (Windows direct launcher to avoid a retained shell per Jerv MCP worker). Grace-period reference: https://learn.chatgpt.com/docs/app-server#unsubscribe-from-a-loaded-thread.

    No conversations were deleted or archived, and no active agent or MCP process was terminated during collection.

  8. UweKeim commented on Oct 13, 2026

    @UweKeim

    Are there any updates on this issue, or could someone from the team at least confirm that this is a known bug?

    Every 4–6 hours, Codex Desktop becomes unresponsive. I then have to take a screenshot of my active threads, quit the app with Ctrl+Q, restart it, and use the screenshot to find and reopen each thread. In every thread, I have to manually ask: "Codex became unresponsive and had to be restarted. Please continue working."

    Having to repeat this several times a day is very frustrating and keeps interrupting my work.

  9. bfeller05 commented on Oct 17, 2026

    @bfeller05

    Still happening on Windows after updating to Codex 26.1013.4894.0 (Microsoft Store). About an hour of normal use led to 243 Codex-related processes: 211 node.exe (about 15 GB), 27 ChatGPT.exe (about 5 GB) and 4 codex.exe (about 2 GB). That's roughly 23 duplicate copies of each MCP server, plus 92 cua-repl/computer-use helpers, and they're never cleaned up when threads or subagents finish. Free RAM dropped to 2 GB of 32 GB. A full quit is the only thing that clears them. This didn't happen before the recent updates, even with many threads open. Settings: max_threads 16, computer use on.

  10. zhugeshenren commented on Oct 17, 2026

    @zhugeshenren

    Seeing the same on Windows 11 Pro, Codex Desktop 26.1013.3656.0 (bundled codex-cli 0.163.0-alpha.10.2).

    After extended use across chats and subagents, repeated sets of code-review, codex-app-tools and cua-repl processes remained under the same app-server.

    Measured on 2026-10-17, before and after restarting only Codex:

    Measurement Before After
    Node.js processes 113 4
    Node.js private commit 6.12 GiB 0.29 GiB
    System committed memory 43.74 GiB 33.68 GiB
    Available physical memory 4.39 GiB 10.90 GiB
  11. bfeller05 commented on Oct 17, 2026

    @bfeller05

    Follow-up: on my PC, restarting Codex does not clear this. Even after fully quitting and reopening, the duplicate helper processes come back right away. After one restart it relaunched about 177 helper processes using about 13 GB, with the CPU at 100%. It comes back after every restart, so I don't have a workaround. Windows 11, Codex 26.1013.4894.0 (Microsoft Store), 32 GB RAM.

  12. bfeller05 commented on Oct 17, 2026

    @bfeller05

    Additional measurements on October 17, 2026, with Codex Desktop 26.1013.4894.0 / core 0.163.0-alpha.10.2:
    • 2:58 p.m. EDT: 177 Codex-related processes; 10.771 GiB private memory; 13.504 GiB summed working sets.
    • 4:01 p.m. EDT: 306 processes; 18.015 GiB private memory; 18.432 GiB summed working sets.

    These were normal-use snapshots, not a controlled idle test, so they don’t establish the cause or prove every helper is abandoned. No configuration changes were made between these measurements by the monitoring task. Please advise on a supported diagnostic or workaround.

  13. alarbainvest commented on Oct 17, 2026

    @alarbainvest

    Windows desktop: growing stdio MCP process sets and memory exhaustion

    Environment: Windows, 16 GB physical RAM. Desktop 26.1013.40934 build 20770, production channel; its updater returned up_to_date on 2026-10-18. Bundled Codex CLI reported 0.163.0-alpha.10.2.

    Observed independently:

    • Multiple launch groups of Python/Node stdio MCP processes under a live desktop app-server while working across conversations.
    • 2026-10-18 00:04:47 Europe/Madrid: 2298 MB free RAM, 66 python.exe and 43 node.exe.
    • 00:11:31: 674 MB free RAM, 86 python.exe and 58 node.exe, plus 24 node_repl.exe. These are machine-wide executable counts, not proof all are Codex-owned or orphaned; do not sum working sets as unique RAM.
    • Earlier tree checks found matched MCP processes with live, older parents, so stale-parent orphan status was NOT established.
    • A previous severe episode was reported by a separate local investigator as 762 descendants and about 20 GB, with 210 MB free RAM and commit 47.7/49.5 GB. Those historical numbers and attribution were NOT independently reproduced.
    • The local workstation became difficult to use. The remote service was reported healthy; no remote restart is requested.

    Narrow qualification:

    • Our custom fixed-scope stdio bridge was started, initialized, then given EOF twice sequentially, without any business tool calls. Both tests exited 0 within 12 seconds, and both tested process trees were absent afterwards.
    • This tests the adapter's EOF behavior, NOT whether the desktop closes its pipes or disposes loaded thread resources.
    • No artificial high-concurrency reproduction was attempted because of memory pressure and active work.

    Mitigation already applied, NOT claimed as a fix:

    • Disabled optional eagerly-started local Windows, WhatsApp, legacy manual REPL and direct Odoo MCP configurations.
    • Kept the two required fixed-scope remote bridges intact.
    • Limited child-agent concurrency per session to one (not a global cap on primary conversations).
    • Did not kill processes based on name, age, or inactivity, and did not cancel active work.
    • No memory dumps, session transcripts, credentials, customer data, command lines, hostnames or raw logs are included.

    Please investigate desktop/app-server ownership and disposal of per-thread MCP connections and Code Mode processes. Is retaining these sets after a completed turn expected while the desktop remains subscribed? Is there a supported bounded lifecycle/unload setting or a released fix? Completion of a turn may differ from thread unload; we need guidance that prevents unbounded accumulation without losing active work or adding a periodic process killer.

    Expected: ordinary conversation reuse remains bounded and owned resources are released at the appropriate lifecycle boundary; active work remains intact.
    Actual: repeated launch groups and worsening memory pressure; precise leak site and causal attribution remain unproven.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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