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
What version of the Codex App are you using (From “About Codex” dialog)?
Codex
What subscription do you have?
Pro
What platform is your computer?
Darwin 25.5.0 arm64 arm
What issue are you seeing?
My codex crashed after running the application to 128GB memory usage on Macbook pro. Can you verify if it's memory leak or somethin when you run parallel agents.
My understanding is that memory usage spikes because each subagent receives the full transcript from the parent, and MCPs are started for each subagent. Keeping the context and MCP catalog clean may help.
Repro: asked Codex to perform a large code-audit task. Native multi-agent fanned out to 5 new concurrent session_loop sessions spawned within 18 seconds (from the app-server's own logs):
11:21:00 new session_loop 019ecacc-806a... op: UserInput
11:21:06 new session_loop 019ecacc-9734... op: UserInput
11:21:06 new session_loop 019ecacc-9792... op: UserInput
11:21:12 new session_loop 019ecacc-af54... op: UserInput
11:21:18 new session_loop 019ecacc-c66e... op: UserInput
Memory went from 1.7 GB to 14 GB in ~2 minutes; only an explicit op: Interrupt released it. Left unattended it freezes the machine (hard restart required).
Memory attribution (vmmap on the live native codex app-server process):
The footprint is almost entirely heap. The MALLOC_REALLOC mass (buffers repeatedly doubled) points to unbounded accumulation, and the busiest log targets during the spike were codex_api::endpoint::responses_websocket and codex_api::sse::responses, i.e. streamed response bodies retained per concurrent session and not released until every session completes. sample showed hot frames in codex_core::tools::parallel::ToolCallRuntime and codex_app_server_transport::transport::serialize_outgoing_message.
Net: N concurrent subagent sessions each retain their full streamed-response context in the parent app-server heap with no cap. On a 17 GB host, roughly 5 to 6 wide is enough to exhaust RAM and freeze the OS. A per-session buffer cap, or releasing completed-stream buffers before all siblings finish, would bound it.
Activity
github-actions commentedon May 20, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
sigyulee commentedon May 21, 2026
Hello from #23260
My understanding is that memory usage spikes because each subagent receives the full transcript from the parent, and MCPs are started for each subagent. Keeping the context and MCP catalog clean may help.
Taridoku commentedon Jun 15, 2026
Corroborating evidence: native
app-serverheap, attributed to streamed-response buffers across concurrent subagent sessionsReproduced on the VS Code extension and captured the memory composition while it ballooned.
Environment: VS Code Codex extension
openai.chatgpt 26.609.30741, macOS 26.3.1, Apple Silicon, 17 GB RAM,gpt-5.5,model_reasoning_effort = "xhigh",[features] multi_agent = true.Repro: asked Codex to perform a large code-audit task. Native multi-agent fanned out to 5 new concurrent
session_loopsessions spawned within 18 seconds (from the app-server's own logs):Memory went from 1.7 GB to 14 GB in ~2 minutes; only an explicit
op: Interruptreleased it. Left unattended it freezes the machine (hard restart required).Memory attribution (
vmmapon the live nativecodex app-serverprocess):The footprint is almost entirely heap. The
MALLOC_REALLOCmass (buffers repeatedly doubled) points to unbounded accumulation, and the busiest log targets during the spike werecodex_api::endpoint::responses_websocketandcodex_api::sse::responses, i.e. streamed response bodies retained per concurrent session and not released until every session completes.sampleshowed hot frames incodex_core::tools::parallel::ToolCallRuntimeandcodex_app_server_transport::transport::serialize_outgoing_message.Net: N concurrent subagent sessions each retain their full streamed-response context in the parent
app-serverheap with no cap. On a 17 GB host, roughly 5 to 6 wide is enough to exhaust RAM and freeze the OS. A per-session buffer cap, or releasing completed-stream buffers before all siblings finish, would bound it.tui: fix unbounded memory growth from background agent event buffers
tui: free event buffers for closed background agent threads