[app][macOS][26.707.91948] ChatGPT/Codex repeatedly grows to 55 GB and freezes the system
What version of the Codex App are you using (From “About Codex” dialog)?
26.707.91948 (build 5440)
What subscription do you have?
Unknown (signed-in Codex desktop user)
What platform is your computer?
Darwin 25.5.0 arm64 arm
- macOS 26.5.2 (25F84)
- MacBook Pro (MacBookPro18,3)
- Apple M1 Pro
- 16 GB RAM
What issue are you seeing?
The unified ChatGPT/Codex macOS app repeatedly grows until it exhausts application memory and freezes the whole computer.
The macOS Force Quit window reported:
- ChatGPT: 55.31 GB
- Claude: 5.69 GB
- Microsoft Teams: 3.66 GB
- Parallels Desktop: 4.30 GB
- Chrome: 897.4 MB
ChatGPT was by far the largest consumer. macOS displayed: Your system has run out of application memory. Multiple unrelated applications were marked as paused.
This is not a one-time event. Quitting or restarting ChatGPT/Codex temporarily restores memory usage to below approximately 1 GB, but the leak returns during continued Codex use and the machine freezes again.
The app was freshly auto-updated on 2026-07-16 and the installed build matches the latest official appcast entry, so there is no newer update available.
After restarting the app following the incident, macOS still showed approximately 2.07 GB of swap in use.
What steps can reproduce the bug?
- Open the unified ChatGPT desktop app and use Codex for local development tasks.
- Keep the app running through ongoing or long tasks.
- Memory usage grows over time.
- Eventually macOS reports that application memory is exhausted and pauses unrelated apps.
- Force quit or restart ChatGPT/Codex.
- Memory returns to normal temporarily, but the same problem recurs during subsequent use.
The workload includes code-mode tasks and may include MCP/browser workers. At the time of the post-restart inspection, the normal ChatGPT/Codex process tree included renderer processes, two node_repl processes, codex-code-mode-host, and the Codex app-server. No large orphan-process accumulation was visible after restart, so the exact leaking child from the incident could not be identified retroactively.
What is the expected behavior?
ChatGPT/Codex memory should stabilize at a reasonable level and reclaim renderer, browser, MCP, and Node worker resources after tasks complete. It must not consume tens of gigabytes, exhaust swap, or suspend unrelated applications.
The app should enforce an aggregate memory budget or stop and warn before causing a system-wide memory emergency.
Additional information
This reproduces on the latest build available on 2026-07-16 and appears related to:
- #33319
- #19333
- #18589
- #12491
The new evidence here is recurrence on version 26.707.91948 / build 5440 with the ChatGPT resource coalition reaching 55.31 GB on a 16 GB Apple Silicon Mac. A screenshot of the Force Quit window is available if maintainers need it.
5 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I can confirm the same bug happening after upgrading
Analysis (community)
Thanks for tracking this — attempting a residual-focused analysis aligned with docs/contributing.md (invitation-only: analysis in-thread, no unsolicited PR).
desktop-oom)Observed (from issue + public residual signal)
What version of the Codex App are you using (From “About Codex” dialog)? 26.707.91948 (build 5440) ### What subscription do you have? Unknown (signed-in Codex desktop user) ### What platform is your computer? Darwin 25.5.0 arm64 arm - macOS 26.5.2 (25F84) - MacBook Pro (MacBookPro18,3) - Apple M1 Pro - 16 GB RAM ### What issue are you seeing? The unified ChatGPT/Codex macOS app repeatedly grows until it exhausts application memory and freezes the whole computer. The macOS Force Quit window r
Root-cause hypothesis
Long-thread / multi-session desktop retains process pools and multi-GB heaps; may combine MCP unreaped children + history retention + renderer growth.
High-level fix outline (not a PR)
Related
#33582, #32797, #12491 — cross-link rather than fork.
Questions for maintainers
Happy to refine with more measurements or code pointers. No unsolicited PR from me.
Analysis (community)
Residual analysis for #33582 (macOS ChatGPT/Codex grows to multi-tens of GB) — invitation-only. Not a pile-on of Windows WMI/taskkill mega-threads (#34260 family). Focus: macOS memory/disk growth mechanisms that OSS can measure. No unsolicited PR.
Deterministic evidence (runtime + code co-factors)
Runtime on this host (
codex-cli 0.146.0-alpha.6):~/.codex/logs_2.sqlitealone is 1778548736 bytes (~1.66 GiB) with WAL 30405632 bytes still active.codex_api::sse::responses37252,codex_app_server::outgoing_message19558,codex_tui::markdown_stream15085) show continuous allocation + serialization work during streams.Code co-factors (
5dd992acd3):codex-rs/state/src/log_db.rsdefault_filterL55) with 2s flush batches — sustained write + page cache pressure.codex-rs/tui/src/app/thread_events.rs≈L141) — relevant when Desktop keeps long-lived threads.Root-cause hypothesis
macOS “tens of GB” reports are likely a sum of:
Treating it only as “Activity Monitor says Codex is big” misses the measurable SQLite + streaming fanout co-factor still present on 0.146.x.
High-level fix outline (not a PR)
logs_2.sqlite(shared with #28997 budget work).Questions for maintainers
No unsolicited PR from me.
Independent corroboration on a later unified ChatGPT/Codex build, with a process-level snapshot captured immediately after macOS raised the application-memory warning.
Environment
26.727.40816(build6067)codex-cli 0.146.0-alpha.9.226.5.2 (25F84)Incident
During normal Codex desktop use with three task windows open, macOS displayed “Your system has run out of application memory.” The Force Quit Applications window attributed 24.14 GB to ChatGPT and paused the app.
A screenshot of the warning is available, but I am not attaching raw application logs or session data publicly because they may contain private project information.
Sanitized diagnostics
The long-lived Codex app-server had been running for about 5h 42m. The first process snapshot showed approximately 2.48 GB RSS for:
A
vmmap -summarysnapshot of that process reported:Allocator details:
The ChatGPT process tree at follow-up contained about 38 processes with roughly 4.3 GB aggregate live RSS, including 12 renderer processes totaling about 2.0 GB. Current system swap was:
The smaller live RSS after the warning does not account for the earlier 24.14 GB Force Quit attribution, but the app-server peak footprint, swapped allocator regions, and renderer footprint confirm severe retained memory and swap pressure within the ChatGPT/Codex runtime.
Expected
Memory should stabilize and be reclaimed as task views, renderer state, diagnostics, and helper sessions become inactive. The application should enforce an aggregate memory budget or stop/warn before causing a system-wide application-memory emergency.
Workaround
Quit and relaunch ChatGPT/Codex. This releases the retained heap temporarily.
This adds an independent recurrence on build 6067, later than the build originally reported here.