-
Notifications
You must be signed in to change notification settings - Fork 17.8k
Memory spike: 3 processes peaked at 12.7 GB combined on 18 GB machine (v2.1.34, macOS native) #24113
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
area:corearea:idebugSomething isn't workingSomething isn't workinghas reproHas detailed reproduction stepsHas detailed reproduction stepsmemoryperf:memoryplatform:macosIssue specifically occurs on macOSIssue specifically occurs on macOS
Description
Preflight Checklist
- I have searched existing issues and this hasn't been reported yet
- This is a single bug report
- I am using the latest version of Claude Code
What's Wrong?
Three Claude Code processes spiked to a combined peak of 12.7 GB on an 18 GB machine (71% of total RAM). System swap hit 96%.
This is not a team/multi-agent session. Just normal single-user work — reading files, editing code, running tools.
The Numbers
Captured with footprint -p claude --swapped on Feb 8, 2026:
Peak memory per process:
| PID | Current | Peak | Top Consumer |
|---|---|---|---|
| 97354 | 4,414 MB | 5,810 MB | WebKit malloc: 3,057 MB |
| 94672 | 1,597 MB | 3,715 MB | WebKit malloc: 850 MB |
| 63744 | 2,276 MB | 3,215 MB | WebKit malloc: 1,738 MB |
| 3 others | 1,015 MB | ~1,200 MB | — |
| Total | 9,301 MB | ~12,740 MB | WebKit malloc: 6,381 MB |
Two additional problems:
- Zombie processes found: PID 64816 alive for 16 days, PID 28807 alive for 26 days. These sessions ended long ago but the processes never exited.
- Swap nearly full: 24,581 / 25,600 MB used (96%). Swapins: 765M.
Root Cause Hint
WebKit malloc is responsible for 6.3 GB out of 9.3 GB total dirty memory. IOAccelerator (GPU) adds another 2.3 GB. These two categories alone account for 93% of all memory used.
This suggests the WebView layer is not releasing DOM/rendering memory between conversation turns or after context compaction.
Environment
- Claude Code: 2.1.34 (native macOS app)
- macOS: 26.1 (Tahoe, Build 25B78)
- Chip: Apple M3 Pro
- RAM: 18 GB
- Model: Opus 4.6 (1M context)
Steps to Reproduce
- Use Claude Code native for a few hours across multiple sessions
- Run
footprint -p claude --swapped - Observe memory growth and zombie processes
Workaround
pkill -9 claude reclaims all memory.
Related Issues
- [BUG] High memory usage (~13-16 GB) when using Team/Teammate mode #23883 — 13-16 GB in Team mode (Windows, v2.1.34)
- [BUG] Memory leak: API clients created repeatedly instead of reused (8-9 GB memory usage) #22162 — API client leak (macOS, high-priority)
- Claude Code Memory Leak - Process Grows to 120+ GB RAM and Gets OOM Killed #4953 — 120+ GB OOM kill (Linux, oncall)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:corearea:idebugSomething isn't workingSomething isn't workinghas reproHas detailed reproduction stepsHas detailed reproduction stepsmemoryperf:memoryplatform:macosIssue specifically occurs on macOSIssue specifically occurs on macOS