Technology

Why ChatGPT Was Eating 77 GB of RAM on My Mac (and How We Fixed It)

Cameron Bennion
·
July 16, 2026
·
6 min read
Why ChatGPT Was Eating 77 GB of RAM on My Mac (and How We Fixed It)

Last night my Mac put up 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 full. This had been happening for weeks, on two different MacBook Pros, and I was done guessing.

We lean on ChatGPT's Codex features hard at Young Money Investments. Trading research, automation, agents running all day. So the machines take real load. If Codex is slowly strangling your Mac too, this is the diagnosis and the fix. Took one evening to run down, and the answer is a confirmed bug on OpenAI's side.

Closing Sessions Frees Nothing

I had six Codex sessions open. I closed them and memory didn't move. Quit the sessions, closed the windows, nothing. The number in Activity Monitor only ever went up.

That turned out to be the biggest clue. Every Codex session lives inside one long-lived background process called codex app-server. There is no per-session process to release. Closing a session in the app is cosmetic. The memory it used stays in that one shared heap, and the heap only grows.

One monolithic process absorbing every session

After a fresh restart we measured the growth. Roughly 1.5 GB per hour under active use. Run that through an 18-hour workday and you get exactly what I saw, a 77 GB process eating every byte of swap on the machine.

The Root Cause

Trade This Systematically

Stop reading. Start executing.

Join 500+ traders using YMI's automated bots, daily KPLs, and AI trade plans, no guesswork required.

It's not your machine and it's not your imagination. OpenAI's own issue tracker documents this. The app-server loads your entire session history from ~/.codex/sessions into RAM with no size cap (openai/codex #29510). Ours held 1,637 files, 2.1 GB on disk, and disk bytes inflate badly once parsed into memory. On top of that it accumulates large command output instead of streaming it (#24048) and leaks helper processes that never get cleaned up (#25015). Other users have watched it climb to 172 GB (#26738).

Both of my MacBooks got hit the same way because both run the same heavy Codex workload and both built up giant session histories. That grip Codex seems to have on your whole system is the architecture itself. One process, holding everything, forever.

The Phantom Chrome Reading

One trap worth knowing before you start force-quitting things. During diagnosis, the Force Quit dialog showed ChatGPT at 17.98 GB and Google Chrome at 17.98 GB. Identical to the hundredth. Chrome's actual resident memory was about 600 MB.

ChatGPT's Codex framework is built on Chromium, and macOS bills the same shared framework memory to both apps. If two apps show suspiciously identical huge numbers, don't kill the second one expecting your RAM back. Check the real number with footprint -p <pid> in Terminal before you trust the dialog.

The Fix

Quit and reopen ChatGPT.app. That alone kills the bloated app-server and on my machine it freed 45 GB of swap instantly. Closing sessions inside the app does nothing. You have to restart the app itself.

Then prune the session history. Move anything older than a couple weeks out of ~/.codex/sessions. Archive it somewhere, don't delete it. Ours went from 2.1 GB to about 500 MB, which directly shrinks what the app-server loads into RAM every launch.

Then make it permanent. We wrote a small watchdog that runs every ten minutes through launchd, measures the app-server's real footprint, and kills just that process if it crosses 12 GB. ChatGPT stays open and quietly respawns a fresh app-server the next time Codex is used. The logic fits in a sentence. Find the codex app-server PID, check its footprint, kill it above a threshold, let the app respawn it. Any engineer can build that in a dozen lines of shell with pgrep, footprint, and launchd. Since it went live across our machines, zero out-of-memory dialogs.

Why Publish This

We posted the measurements and the workaround on OpenAI's issue tracker so it gets fixed at the source. Until then, if your Mac has been choking and ChatGPT is sitting in the Force Quit list with a double-digit GB number next to it, you now know what it is, why closing sessions doesn't help, and how to take your machine back in under a minute.

Same rule we run trading systems by. Don't live with a mystery. Measure it, find the cause, automate the fix, share what you learned.

About the Author

Cameron Bennion

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
Trade with Cameron's systems:7-Day Free Trial →

Free, No Credit Card

Get Daily KPLs in Your Inbox

AI-generated Key Price Levels for ES & NQ, delivered every trading morning. Join 500+ traders who start their session with a plan.

🔒 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.

Ready to Apply These Strategies?

Join 500+ traders using YMI's automated bots, daily KPLs, and AI trade plans to trade systematically.

Intro Trader includes a 7-day free trial • Paid access is final and non-refundable under published terms