Forumics logo Forumics
Issue 01

Back to issue

All Codex known issues

CLAIM C138 Supported 2026-11-15

GitHub issue #25015 in openai/codex, opened 2026-05-29 by LostFrxks, records a report that Codex app-server starts additional stdio MCP process stacks when spawning subagents, and after the subagents complete and close_agent is called, some MCP child process trees remain alive under the long-lived codex app-server, so process count and memory usage grow roughly linearly with subagent usage; in a small live repro, 3 trivial subagents took the app-server from 23 descendants and about 203 MiB RSS to 74 descendants and about 3.7 GiB RSS, and after close_agent 9 MCP launcher roots and 33 processes remained; in a larger run, 20 subagents took descendants from 46 to 266 and total RSS from about 2.9 GiB to about 11.7 GiB, with swap usage growing to about 6.4 GiB; the report was filed against codex-cli 0.128.0 on Ubuntu 24.04.4 LTS with 16 GB RAM and 16 GB swap.

Verbatim Excerpts from Cited Records
“Codex app-server appears to start additional stdio MCP process stacks when spawning subagents.”
— LostFrxks · openai/codex (issue 25015 opening body, Summary section) · 2026-05-29T05:01:55Z ·GitHub Issue ↗
“After the subagents complete and `close_agent` is called, some MCP child process trees remain alive under the long-lived `codex app-server`.”
— LostFrxks · openai/codex (issue 25015 opening body, Summary section) · 2026-05-29T05:01:55Z ·GitHub Issue ↗
“This causes process count and memory usage to grow roughly linearly with subagent usage.”
— LostFrxks · openai/codex (issue 25015 opening body, Summary section) · 2026-05-29T05:01:55Z ·GitHub Issue ↗
“Subagent creation starts additional MCP process stacks, even when the subagent task does not call MCP tools.”
— LostFrxks · openai/codex (issue 25015 opening body, Actual Behavior section) · 2026-05-29T05:01:55Z ·GitHub Issue ↗
Counter-record: Issue open as of the fetch; 19 comments were read. Multiple independent confirmations across platforms: tombelieber (2026-07-13, macOS, ChatGPT desktop app-server) found six complete generations of MCP server sets alive simultaneously, about 5 GB RSS across 52 node processes; krutftw (2026-07-30, Windows 11) found about 345 processes and 17.22 GiB private bytes under the app-server; ws404dev (2026-08-02, macOS) cleaned up 402 stale Codex-owned MCP processes accounting for 17.91 GiB RSS; Nicolas-nwb (2026-08-14, macOS) found 218 matching processes at peak and notes this is retention of MCP runtimes per thread or sub-agent, pointing to #30408 for the general per-thread angle; Luzivog (2026-08-19, Linux), Nyukimin (2026-08-25, Linux), simmonspatrick1-cell (2026-10-13, macOS), iMMerSiveTechs (2026-10-29, macOS) and ntsanderc (2026-11-12, macOS) add further field confirmations. dianshili (2026-07-17) source-traced the mechanism on the macOS Desktop build: every session eagerly starts its own MCP stack even when no MCP tool is invoked, V1 completion does not end the child session, V2 intentionally keeps completed agents resident, and thread/unsubscribe retains the session for 30 minutes; dianshili also found a secondary defect where a failed killpg (EPERM) is swallowed without escalation. m13v (2026-07-17 and 2026-09-02) and keisksw (2026-10-26) discuss lifecycle and mitigation, including thread_unload_delay_secs. The reporter notes the report is related to the same defect class as #17574, #17832, #20883, #21984 and #24347, opened separately for the Linux app-server reproduction with a reduced MCP set and controlled before/after measurements. No maintainer fix and no retraction appear in the surveyed thread. The claim documents only the original report, not a verified current state. This report is distinct from published C049 (codex #30408, a full set of global MCP server processes spawned per new thread or conversation and never killed when threads are archived or closed): here the trigger is subagent spawning, with full MCP stacks started even when the subagent task never calls MCP tools, and close_agent performs partial cleanup leaving some trees alive. Falsification probe: If GitHub issue #25015 is deleted without archive, if the author edits the opening body so the quoted sentences no longer match verbatim, or if the author posts a retraction of the report, this claim drops to Withdrawn. Audit verification: Verified 100% continuous verbatim substring against official GitHub REST API by scripts/verify_claim_verbatim.py.

See also: Codex vs Cursor head-to-head comparison on 9bests