Native utility for macOS 13+
Catch runaway memory growth.
Memory Guard watches Codex and other apps you choose. When one process starts consuming memory at an abnormal rate, the guard can pause or end it.
Recommended thresholds
- Automatic pause
- 32 GiB
- Emergency end
- 40 GiB
Scaled to unified memory. Adjustable per app.
Why Memory Guard exists
During a Codex session, memory use suddenly climbed into the tens of gigabytes and the Mac crashed. Memory Guard grew out of that incident. It watches the apps you choose and their verified bundled helpers, so it can identify the process driving a spike.
- ObserveCompare the app’s combined footprint with recent growth. A stable, memory-heavy app can keep working.
- PauseAt the pause threshold, confirmed abnormal growth triggers a pause of the responsible process. It keeps the memory it already holds.
- EndCodex defaults to a force-end after two minutes without a response, or immediately if abnormal growth reaches the emergency threshold. Ending releases memory and can lose the current task.
Privacy
Memory Guard works offline. It reads process identity and memory counters, and makes every protection decision on your Mac. No account, usage analytics or tracking.
Recent samples stay in RAM. Your conversations, files and source code stay outside the guard’s monitoring scope. Diagnostic exports are saved only to the location you choose.
Build for macOS
Build a locally signed copy with Xcode on your Mac. Copy the finished app to your Applications folder before the first launch.
git clone https://github.com/sd800/memory-guard.git
cd memory-guard
bash scripts/build.sh release