You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
codex mcp-server leaks node_repl sub-MCP processes (one per invocation, never reaped) — exhausts RAM/swap/disk #53664
CLIIssues related to the Codex CLIbugSomething isn't workingmcpIssues related to the use of model context protocol (MCP) serversmcp-serverIssues related to the use of the `codex mcp-server` subcommandperformance
A long-running codex mcp-server (Codex CLI 0.153.4) accumulates node_repl sub-MCP child processes that stay alive after the tool calls that started them have finished. Over about 2 days they used up RAM and swap and filled the disk.
Environment
macOS, Apple Silicon, 16 GB RAM
Codex CLI 0.153.4, run as codex mcp-server by an MCP client (Claude Code), one long-lived server per client session
~/.codex/config.toml contains an [mcp_servers.node_repl] entry pointing at the ChatGPT.app cua_node/bin/node_repl binary
What happened
Two long-lived codex mcp-server processes had 188 and 104node_repl children, all idle, from calls that had already finished.
Together they used all 16 GB of RAM and 16 GB of swap. Swap filled the internal disk, and the system hit ENOSPC and showed the macOS "out of application memory" dialog.
After the children were killed, new node_repl processes appeared under the same parent PIDs within the hour as more calls ran.
Expected
Sub-MCP processes should be shut down when the call or session that started them ends, or one long-lived child should be reused, so the count doesn't grow with each call.
Workaround
Start the server with -c mcp_servers.node_repl.enabled=false, or remove the [mcp_servers.node_repl] block from the config.
Repro (outline)
Configure [mcp_servers.node_repl] as above.
Run codex mcp-server under an MCP client and make many tool calls over a few hours.
Count the children with ps -axo ppid,comm | awk '$2 ~ /node_repl$/' | wc -l. The count grows with each call and never shrinks.
List candidates with pgrep -fl node_repl, then inspect each using ps -o pid,ppid,etime,command -p <pid>. Match it to a specific completed tool call and confirm no active client needs it before using kill <pid>; don't stop the shared server by name. Full disclosure: I build Mac YOLO Safeguards, a free signed menu-bar app for agent-process cleanup; Pro adds Auto-Guard for automatic cleanup. https://macyolosafeguards.io
CLIIssues related to the Codex CLIbugSomething isn't workingmcpIssues related to the use of model context protocol (MCP) serversmcp-serverIssues related to the use of the `codex mcp-server` subcommandperformance
Activity
github-actions commentedon Oct 13, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
IgorGanapolsky commentedon Nov 11, 2026
List candidates with
pgrep -fl node_repl, then inspect each usingps -o pid,ppid,etime,command -p <pid>. Match it to a specific completed tool call and confirm no active client needs it before usingkill <pid>; don't stop the shared server by name. Full disclosure: I build Mac YOLO Safeguards, a free signed menu-bar app for agent-process cleanup; Pro adds Auto-Guard for automatic cleanup. https://macyolosafeguards.io