Technology

Why ChatGPT Was Holding 77 GB of RAM on My Mac, and How I Stopped It

Cameron Bennion
·
July 16, 2026
·
3 min read
Hands using a calculator beside a notebook
Photo by Jakub Żerdzicki on Unsplash.

The dialog nobody wants to see: "Your system has run out of application memory." I opened the Force Quit list and ChatGPT was holding 76.84 GB. Swap was 52 GB of 53 GB used. It had been happening for weeks on two different MacBook Pros, so I stopped guessing and measured.

If ChatGPT's Codex features are slowly eating your Mac, this is how I diagnosed it and what I changed.

Closing sessions freed nothing

I had six Codex sessions open. I closed them all and memory didn't move. The number in Activity Monitor only ever climbed.

That was the biggest clue. Every Codex session ran inside one long-lived background process, codex app-server. There was no per-session process to release, so closing a session in the interface did nothing to the heap. After a fresh restart I measured growth of roughly 1.5 GB per hour under active use. Over a long workday that is enough to reach the number I saw.

One monolithic process absorbing every session

What the public issue tracker says

Your next step

Build the daily map before the session.

See how ES and NQ Key Price Levels fit the daily plan. Follow the room, practice in SIM, and review what happened around each level.

I'm not the only one seeing this. OpenAI's tracker documents several related reports. One describes the app-server loading the full session history from ~/.codex/sessions into memory with no size cap (openai/codex #29510). My folder held 1,637 files totaling 2.1 GB on disk, and parsed data usually takes more memory than the file size. Others describe large command output being accumulated rather than streamed (#24048), helper processes that aren't cleaned up (#25015), and one user watching memory reach 172 GB (#26738). Both of my machines run heavy Codex workloads and had large session histories, which fits.

A misleading reading to avoid

While diagnosing, the Force Quit dialog showed ChatGPT at 17.98 GB and Google Chrome at exactly 17.98 GB. Chrome's real resident memory was about 600 MB. ChatGPT's Codex framework is built on Chromium, and the same shared framework memory was being attributed to both apps. If two apps show identical large numbers, don't kill the second one expecting RAM back. Check the real figure first:

pgrep -fl 'codex app-server'
footprint -p <pid>

The fix, in order

  1. Quit and reopen ChatGPT.app. Quitting the app kills the bloated app-server. On my machine that released about 45 GB of swap immediately. Closing sessions inside the app doesn't do this.
  2. Prune session history. Move old sessions out of ~/.codex/sessions so the app-server loads less on each launch. Archive, don't delete. For example, list what would move first: find ~/.codex/sessions -type f -mtime +14 | head, then move those files to an archive folder you choose. Mine went from 2.1 GB to about 500 MB.
  3. Automate the restart. I set up a small launchd job that runs every ten minutes, finds the app-server PID, reads its footprint, and kills only that process if it passes 12 GB. ChatGPT stays open and starts a fresh app-server the next time Codex is used. The pieces are pgrep, footprint and a launchd interval. Test the threshold on a quiet day first, since killing the process interrupts anything a session is doing at that moment.

Since the watchdog went live on my machines, I haven't seen the out-of-memory dialog. That's my own observation on two laptops, not a guarantee for yours.

Why I shared it

I added measurements and the workaround to the issue on OpenAI's tracker so it can be fixed at the source. Until then, if ChatGPT shows a double-digit GB figure in Force Quit and closing sessions changes nothing, you now have a way to confirm the cause, a one-step relief, and a way to keep it from coming back.

About the Author

Cameron Bennion
Cameron BennionAbout Cameron →

Founder, Young Money Investments · Quant Trader

Cameron trades ES, NQ, and futures across multiple market cycles. He founded Young Money Investments to teach systematic, data-driven trading and manages Magnum Opus Capital. His work emphasizes documented rules, risk controls, and review over outcome promises.

Systematic Futures TradingHedge Fund Manager, Magnum Opus CapitalRisk-First EducationNinjaTrader SpecialistFutures: ES · NQ · RTY · CL · GC
Learn the daily planning process:7-Day Free Trial →

Free, No Credit Card

Get the Free Room Preview

See how the room works before choosing a membership. Follow a setup in SIM and review what happened.

🔒 Your information is secure. We respect your privacy and will never spam you.

Risk Disclosure & Disclaimer

Educational Purposes Only: The content provided in this blog is for educational and informational purposes only. It does not constitute financial, investment, or trading advice. Young Money Investments is not a registered investment advisor, broker-dealer, or financial analyst.

Risk Warning: Trading futures, forex, stocks, and cryptocurrencies involves a substantial risk of loss and is not suitable for every investor. The valuation of futures, stocks, and options may fluctuate, and as a result, clients may lose more than their original investment.

CFTC Rule 4.41 - Hypothetical or Simulated Performance Results: Certain results (including backtests mentioned in these articles) are hypothetical. Hypothetical performance results have many inherent limitations. No representation is being made that any account will or is likely to achieve profits or losses similar to those shown. In fact, there are frequently sharp differences between hypothetical performance results and the actual results subsequently achieved by any particular trading program.

Testimonials: Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.

Build the daily map before the session.

See how ES and NQ Key Price Levels fit the daily plan. Follow the room, practice in SIM, and review what happened around each level.

Intro includes a 7-day trial, then $97/month. Cancel before the trial converts if it isn't a fit.