Single Claude process consumed 36 GB on 18 GB machine, triggering Jetsam OOM kill (v2.1.37)
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report
- [x] I am using the latest version of Claude Code
What's Wrong?
A single Claude Code process (PID 6056) allocated 36.5 GB peak on an 18 GB machine. The system froze completely and required a hard reboot.
This is v2.1.37 — three versions newer than the same leak reported in #24113 (v2.1.34). The problem is getting worse, not better.
The Numbers
Extracted from macOS Jetsam kill logs (JetsamEvent-2026-02-10-113747.ips):
| PID | Version | Current | Peak |
|-----|---------|---------|------|
| 6056 | 2.1.37 | 33,974 MB | 36,484 MB |
| 72799 | 2.1.37 | 3,206 MB | 3,734 MB |
| 42977 | 2.1.34 (zombie) | 1,467 MB | 2,357 MB |
| 46462 | 2.1.37 | 341 MB | 489 MB |
| 29930 | 2.1.37 | 309 MB | 571 MB |
| 4543 | 2.1.37 | 275 MB | 320 MB |
| 21753 | 2.1.37 | 235 MB | 281 MB |
| Total | | 39,808 MB | 44,235 MB |
One process used 2x the total physical RAM. Seven Claude processes combined used 44 GB peak on 18 GB.
Timeline
All times KST (UTC+9), Feb 10 2026:
- 11:37 — First Jetsam kill.
largestProcess: "2.1.37". PID 6056 at 34 GB. - 11:52 — Second Jetsam kill, 15 min later. PID 6056 still alive at 36,458 MB — still growing after the first kill.
- System froze. Hard reboot required.
- 12:57 — After reboot, macOS caught PID 8457 (new Claude session) writing 2,418 MB in 90 seconds (26.9 MB/s). Footprint grew from 4,750 MB → 9,546 MB in 7 seconds.
Additional Evidence
Disk write diagnostic (2.1.37_2026-02-10-125735_MacBook-Pro-3.diag):
Event: disk writes
Writes: 2418.41 MB over 90 seconds (26.94 MB/s), exceeding limit of 24.86 KB/s
Footprint: 4749.81 MB -> 9546.31 MB (+4796.50 MB)
Duration Sampled: 7.32s
A new Claude session grew 4.8 GB in 7 seconds after reboot. The leak is immediate, not gradual.
Zombie process: PID 42977 (v2.1.34) was still alive alongside v2.1.37 processes, consuming 1.5 GB. Old versions don't get cleaned up on upgrade.
Comparison with #24113
| | #24113 (Feb 8) | This issue (Feb 10) |
|---|---|---|
| Version | 2.1.34 | 2.1.37 |
| Worst process | 5,810 MB peak | 36,484 MB peak (6.3x worse) |
| Total Claude | 12,740 MB | 44,235 MB (3.5x worse) |
| System state | Swap 96%, still usable | Complete freeze, hard reboot |
| Data source | footprint (live) | Jetsam kill logs (kernel) |
Environment
- Claude Code: 2.1.37 (native macOS app)
- macOS: 26.1 Tahoe (Build 25B78)
- Chip: Apple M3 Pro
- RAM: 18 GB
- Terminal: Ghostty
- Model: Opus 4.6 (1M context)
Steps to Reproduce
- Use Claude Code native for normal single-user work
- Machine freezes within hours
- After hard reboot, check
/Library/Logs/DiagnosticReports/JetsamEvent-*.ips largestProcessis Claude
Related Issues
- #24113 — Same reporter, v2.1.34, peak 12.7 GB (this is 3.5x worse)
- #23883 — 13-16 GB in Team mode (Windows)
- #22162 — API client leak (macOS, high-priority)
- #4953 — 120+ GB OOM kill (Linux)
9 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
This is not a duplicate.
Same machine, same user, 3 versions later, 3.5x worse. This is a regression, not a repeat.
This issue makes Claude Code practically unusable. My machine freezes every few hours and I lose all unsaved work. It needs urgent attention.
I upgraded after a while and noticed that my macbook started overheating even during normal use. Saw this issue and I am on v2.1.37 on an M4 Pro Macbook pro. Claude was idle for about 1 hour and even then the memory use was over 22 gigs.
Edit: I tested it again on v2.1.38, restarted everything: the memory was hovering around 1.9 gigs for a while and then suddenly it jumped to 22 gigs within 30 seconds
Same here. Switched from npm to native and my M3 Pro MacBook Pro has been burning up ever since. On v2.1.37, Claude was just sitting slow for about an hour and memory ballooned to 22GB.
Honestly just wanna go back to the npm version at this point lol
I have been using native claude cli since day 1, and I noticed that you did open another issue with the memory leak for native app and causing your MacBook to shut down? I am assuming that this issue is for the npm claude code setup? @Piesson
Update: Today I haven't had any memory leaks that were noticeable at all. So far around 8 hours in of using it and it's not even in the top 10 tasks of using my memory. I did not update or make any changes since my yesterday's update
Both issues are about the bun-based native version of Claude Code. #24960 is just the latest one where it escalated to a kernel panic. Have you not experienced any memory spikes since switching to native?
Update: Root cause identified — this is a Ghostty terminal bug, not Claude Code
After further investigation, the memory consumption I reported was caused by a memory leak in Ghostty (my terminal emulator), not Claude Code itself.
Root cause: Ghostty has a bug in scrollback pruning where non-standard pages are resized to standard size, causing
munmapto never be called. Claude Code's output (heavy multi-codepoint grapheme sequences) triggers this leak at scale.References:
Status: Fixed on Ghostty's main branch. Will ship in Ghostty 1.3.0 (expected March 2026). Workaround:
scrollback-limit = 2500in Ghostty config.Apologies for the noise — closing this issue.
Closing — root cause is Ghostty memory leak, not Claude Code.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.