Claude desktop app closes unexpectedly on 8 GB M2 Mac — OOM due to 4 GB VM allocation
Summary
The Claude desktop app closes unexpectedly on an 8 GB Apple M2 Mac. Logs confirm the cause is the system running out of memory (99.2% RAM usage, only 60 MB free at time of crash).
Environment
- Platform: macOS Darwin 25.5.0 (macOS 26 / Sequoia)
- Hardware: Apple M2, 8 GB RAM
- App version: 1.8555.2
- Electron: 41.6.1
Root Cause
The internal Linux VM used by Claude Code is hardcoded to memoryGB=4, consuming exactly half the machine's total RAM. Combined with the Electron process (~550 MB RSS) and other running apps, the system hits memory pressure and macOS kills the Claude process.
From cowork_vm_swift.log:
startVM called ... with memoryGB=4 cpuCount=auto networkMode=gvisor
From system-info.txt at time of crash:
Total Memory: 8.00 GB
Free Memory: 0.06 GB
Memory Usage: 99.2%
The Claude desktop app process itself shows 2+ GB in Activity Monitor, with the VM process (vzgvisor) accounting for additional memory on top of that.
Expected Behavior
The app should not silently close due to memory pressure. On machines with ≤ 8 GB RAM, the VM memory allocation should be reduced automatically, or the user should be warned.
Suggested Fix
- Scale VM memory based on available system RAM (e.g.
memoryGB=2on 8 GB machines) - Or expose a user-facing setting to configure VM memory
- Or catch low-memory conditions and show a warning dialog instead of silently closing
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗