Codex Desktop reaches 130 GB memory during Ultra multi-agent swarm (24 GB Mac)
What version of Codex CLI is running?
codex-cli 0.144.2, bundled with ChatGPT/Codex Desktop 26.707.72221 (build 5307).
What subscription do you have?
ChatGPT subscription; exact tier not confirmed.
Which model were you using?
The app displayed 5.6 Sol with reasoning effort set to Very High (超高).
What platform is your computer?
Darwin 25.5.0 arm64 arm; macOS 26.5.2 (build 25F84), Apple Silicon, 24 GB physical memory.
What terminal emulator and version are you using (if applicable)?
ChatGPT/Codex Desktop app; no external terminal multiplexer was involved in the incident.
Codex doctor report
Uploaded privately with /feedback, together with the Codex logs and rollouts. Uploaded thread ID: 019f66b5-4768-7153-acb6-0357747632c2.
What issue are you seeing?
During an Ultra multi-agent workload, Codex Desktop consumed 130.58 GB according to the macOS "system has run out of application memory" dialog on a Mac with 24 GB of physical memory.
The incident occurred at approximately 2026-07-16 00:49 Asia/Taipei. macOS began killing idle daemons and purging caches at around 00:48. After restarting ChatGPT/Codex Desktop at 00:56, the total RSS of its process group returned to approximately 2.23 GB, and memory_pressure reported approximately 81% free system memory. This strongly suggests the extreme usage belonged to the app/session rather than ordinary baseline system use.
Local diagnostics for approximately 00:20–00:49 showed:
- 328 logged
spawn_agenttool calls - 386 distinct thread IDs
- 115,142 log rows totaling approximately 890.5 MB in that window
rmcp::servicedominated the log volume~/.codex/logs_2.sqlitehad grown to approximately 2.9 GB~/.codex/sessionsoccupied approximately 4.4 GB
The original macOS application-memory screenshot is included in the uploaded rollout. Raw logs are not posted publicly because they contain local paths, prompts, and project metadata.
What steps can reproduce the bug?
- Open ChatGPT/Codex Desktop on a 24 GB Apple Silicon Mac.
- Use the app's Ultra multi-agent capability with the displayed
5.6 Solmodel andVery Highreasoning effort. - Run a long task that fans out into many subagents and allow the workload to continue for roughly 30 minutes.
- In this incident, the diagnostics recorded 328
spawn_agentcalls and 386 distinct thread IDs. - Observe memory growth until macOS displays the global application-memory exhaustion dialog; ChatGPT reached
130.58 GBhere.
This is one observed incident rather than a minimal deterministic reproducer. The uploaded logs should contain the exact timeline.
What is the expected behavior?
Codex Desktop should enforce bounded local memory and concurrency for Ultra agent swarms. Completed or idle agent/thread state and log batches should be compacted, evicted, or backpressured. If the workload approaches a system-safe limit, the app should stop spawning agents or fail with a clear warning before macOS reaches global memory exhaustion.
Additional information
The /feedback upload completed successfully and included:
codex-logs.log- Codex doctor report
- current rollout containing the screenshot
- auto-review rollout
Uploaded thread ID: 019f66b5-4768-7153-acb6-0357747632c2.
Possibly related, but the trigger and evidence differ:
- openai/codex#20740 reports 75 GB+ growth during a basic/single-task session.
- openai/codex#26869 reports stale child processes and excessive log writes after a crash/restart.
- openai/codex#12491 reports unreaped MCP child processes and a 37 GB leak.
This report specifically captures active Ultra multi-agent fan-out, hundreds of threads, very high log volume, and a peak of 130.58 GB. I do not yet have enough evidence to claim the same root cause as those issues.
2 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I hit what appears to be the same failure class on another 24 GB Apple Silicon Mac, with additional post-incident evidence that may help narrow the trigger.
Observed impact
Parent-thread evidence
The likely trigger was one unusually large lead thread:
spawn_agentcallsThe important timing evidence is that three children belonging to this parent were restored/spawned almost simultaneously shortly before the OOM:
Each child’s session metadata directly identifies the same parent thread. Each also received a guardian session. The three main child rollouts rapidly reached approximately 19.6 MB, 21.6 MB, and 19.5 MB.
These children had originally been created with
fork_turns: "all", so they inherited the very large lead-thread history. This suggests a possible restore/resume amplification path: several full-history agents are hydrated concurrently, each resumes repository/tool state, and resource use is not backpressured against available system memory.Process evidence
The macOS unified log also shows a large burst of short-lived descendants associated with the ChatGPT/Codex process tree, including repeated
git,bash, andnodeprocesses. Groups of Git operations appeared repeatedly, includinggit add -uandgit statusactivity.The kernel repeatedly logged messages of this form for the spawned processes:
This may explain why the value attributed to the ChatGPT application coalition grew far beyond physical RAM: the failure was not necessarily a single renderer heap reaching 106.92 GB, but an aggregate coalition/VM footprint amplified by extreme child-process churn, compressed memory, and swap.
There may be overlap with #29084’s unbounded desktop Git watcher, although this workspace did not yet receive the same nested-repository negative-control testing. In this incident, the strongest direct trigger is concurrent restoration of several very large
fork_turns: allsubagents, followed by process churn.Suggested safeguards
I am happy to provide sanitized unified-log excerpts or the exact parent thread ID privately if that would help. I use Codex heavily and am reporting this because I would genuinely like to help make the multi-agent workflow more robust.