Codex Desktop reaches 130 GB memory during Ultra multi-agent swarm (24 GB Mac)

Open 💬 2 comments Opened Jul 15, 2026 by a861252012

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_agent tool calls
  • 386 distinct thread IDs
  • 115,142 log rows totaling approximately 890.5 MB in that window
  • rmcp::service dominated the log volume
  • ~/.codex/logs_2.sqlite had grown to approximately 2.9 GB
  • ~/.codex/sessions occupied 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?

  1. Open ChatGPT/Codex Desktop on a 24 GB Apple Silicon Mac.
  2. Use the app's Ultra multi-agent capability with the displayed 5.6 Sol model and Very High reasoning effort.
  3. Run a long task that fans out into many subagents and allow the workload to continue for roughly 30 minutes.
  4. In this incident, the diagnostics recorded 328 spawn_agent calls and 386 distinct thread IDs.
  5. Observe memory growth until macOS displays the global application-memory exhaustion dialog; ChatGPT reached 130.58 GB here.

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:

  • #20740 reports 75 GB+ growth during a basic/single-task session.
  • #26869 reports stale child processes and excessive log writes after a crash/restart.
  • #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.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗