Forumics logo Forumics
Issue 01

Back to issue

All Codex known issues

CLAIM C156 Supported 2026-11-18

GitHub issue #26984 in openai/codex, opened 2026-06-08 by jacobcxdev, records a report that long-running sessions using stdio MCP servers slowly accumulate open file descriptors in the codex parent process until they hit the per-process soft limit (256 on a default macOS login shell), after which every subsequent open()/spawn() fails with Too many open files (os error 24); the report attributes the leak to orphaned MCP child processes the parent still holds read pipes to, with 186 anonymous PIPE fds observed for a session with about 4-5 configured MCP servers, and was filed against codex-cli 0.137.0.

Verbatim Excerpts from Cited Records
“Long-running sessions that use stdio MCP servers slowly accumulate open file descriptors in the **codex parent process** until they hit the per-process soft limit (256 on a default macOS login shell), at which point every subsequent `open()`/`spawn()` fails with `Too many open files (os error 24)`.”
— jacobcxdev · openai/codex (issue 26984 opening body, What issue are you seeing? section) · 2026-06-08T11:10:00Z ·GitHub Issue ↗
“186 anonymous PIPE fds for a session with \~4–5 configured MCP servers (expected ≈3 pipes/server = \~15). The excess maps almost 1:1 to **orphaned MCP child processes** that the codex parent still holds read pipes to.”
— jacobcxdev · openai/codex (issue 26984 opening body, Evidence (live system) section) · 2026-06-08T11:10:00Z ·GitHub Issue ↗
“Each refresh/rebuild cycle spawns a fresh server set and tears down the old one **without awaiting death and without reliably reaping the** `npm` **grandchild**.”
— jacobcxdev · openai/codex (issue 26984 opening body, Net effect section) · 2026-06-08T11:10:00Z ·GitHub Issue ↗
“Every orphan keeps its stdout/stderr **write** ends open, so the codex-side **read** pipe + the detached stderr-reader task (`stdio_server_launcher.rs:274`) never reach EOF and never close.”
— jacobcxdev · openai/codex (issue 26984 opening body, Net effect section) · 2026-06-08T11:10:00Z ·GitHub Issue ↗
Counter-record: Issue open as of the fetch; 30 comments were read. github-actions[bot] (2026-06-08) flagged potential duplicates #25744, #25742, #25697 and #26773. Multiple users confirmed the leak on later builds, including 0.144.3, 0.144.5, 0.145.0, 0.146.0, 0.147.0 and 0.169.0, on macOS, Linux, WSL2 and Windows, most recently Clausinho (2026-11-17) on codex-cli 0.169.0. mochafreddo (2026-06-11) prepared and locally verified a candidate fix on a fork branch (mochafreddo/codex, fix/rmcp-stdio-process-cleanup); GraciousGazelles (2026-10-29) pointed to a related candidate in sednalabs/codex#993. No maintainer fix merged and no retraction of the original report appear in the surveyed thread. The claim documents only the original report, not a verified current state. Falsification probe: If GitHub issue #26984 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