[BUG] New Memory Leak .

Resolved 💬 5 comments Opened Jan 5, 2026 by capitalbluecity-sketch Closed Mar 11, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Claude Code Memory Consumption has skyrocketed in the new Update.

What Should Happen?

Absurd Memory Leak , Claude Diagnosis attached below .

Error Messages/Logs

ultrathink your diagnosis seems like bullshit the cpu usage and memory usage spiked again hard , what happened

● Let me check what's happening RIGHT NOW:

● Bash(ps aux --sort=-%cpu | head -15)
  ⎿ USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND                                                                    
    root      258165 45.2  6.6 75386056 543748 pts/0 Sl+  13:20   0:34 claude --resume
    root      256436 14.4  0.3 726444 26784 ?        Sl   13:11   1:28 /root/.cursor-server/bin/20adc1003928b0f1b99305dbaf845656ff81f5d0/node /roo
    … +22 lines (ctrl+o to expand)


● Bash(ps aux --sort=-%mem | head -15)
  ⎿ USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND                                                                    
    root      258165 46.4  6.6 75386056 541864 pts/0 Sl+  13:20   0:36 claude --resume
    root      257729  1.1  0.8 11788208 71328 ?      Sl   13:20   0:00 /root/.cursor-server/bin/20adc1003928b0f1b99305dbaf845656ff81f5d0/node /roo
    … +25 lines (ctrl+o to expand)


● Bash(top -b -n 1 | head -20)
  ⎿  top - 13:21:32 up 2 days, 16:58,  3 users,  load average: 17.68, 45.07, 31.56  
     Tasks: 174 total,   2 running, 171 sleeping,   1 stopped,   0 zombie
     %Cpu(s): 16.3 us,  4.7 sy,  0.0 ni, 79.1 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
     … +17 lines (ctrl+o to expand)

● Bash(dmesg | tail -20)
  ⎿  [233819.441144] [ 257592]     0 257592      731      393        0      393         0    49152        0             0 run-parts    
     [233819.441148] [ 257593]     0 257593      760      467        0      467         0    49152        0             0 droplet-agent
     [233819.441151] [ 257594]     0 257594     2056      578       64      514         0    57344        0             0 bash
     … +20 lines (ctrl+o to expand)

● 🚨 I WAS RIGHT - HERE'S THE PROOF FROM dmesg:

  oom-kill: task=claude, pid=254946
  Out of memory: Killed process 254946 (claude) total-vm:75521208kB, anon-rss:1407140kB

  The OOM killer literally just killed a Claude process! It was using:
  - 75GB virtual memory
  - 1.4GB resident memory

  And look at your load average: 17.68, 45.07, 31.56 (should be ~4 or less on a 4-core machine)

  Let me check how many Claude/Cursor processes are running:

● Bash(ps aux | grep -E 'claude|cursor' | grep -v grep)
  ⎿ root        1003  0.0  0.0  12912  3292 ?        Ss   Jan02   0:01 /usr/bin/ttyd -p 7681 -i 127.0.0.1 -W -a -t fontSize 20 -t rows 250 -t cols
     300 -t scrollback 5000 -t cursorStyle block -t cursorBlink true -t rendererType webgl -t disableLeaveAlert true -t theme {"background":"#fafa
    fa","foreground":"#383a42","cursor":"#526fff","cursorAccent":"#fafafa","selectionBackground":"#e5e5e6","black":"#383a42","red":"#e45649","gree
    … +14 lines (ctrl+o to expand)




● Bash(pstree -p | grep -E 'claude|cursor' | head -20)
  ⎿             |           |-sshd-session(257662)---sshd-session(257834)---bash(257877)---claude(258165)-+-bash(258602)-+-grep(258629)
                |           |                                                                             |-{claude}(258166)
                |           |                                                                             |-{claude}(258167)
     … +13 lines (ctrl+o to expand)

● Root Cause Confirmed

  | Fact                     | Evidence                                                |
  |--------------------------|---------------------------------------------------------|
  | OOM killer killed Claude | oom-kill: task=claude, pid=254946                       |
  | No swap to buffer        | Swap: 0.0 total, 0.0 free                               |
  | Journald crashed too     | systemd-journald.service: Failed with result 'watchdog' |
  | Insane load              | 45.07 at 5-min average (should be <4)                   |

  Current Claude session (PID 258165): 75GB virtual, 584MB RSS, 52% CPU

  My diagnosis is correct. The problem is NO SWAP + Claude sessions consume massive memory. When memory pressure hits, OOM killer randomly kills things.

  Let me write the final plan:
....
....
> ultrathink this has to be a new bug , how could a single claude consume so much ram , it never did in past

● You raise a valid point. Let me investigate if this is a new Claude bug:

● Bash(claude --version 2>/dev/null || which claude)
  ⎿  2.0.76 (Claude Code)

● Bash(ls -la ~/.claude/ 2>/dev/null | head -20)
  ⎿  total 640                                      
     drwxr-xr-x  14 root root   4096 Jan  5 13:23 .
     drwx------  18 root root   4096 Jan  5 13:23 ..
     … +16 lines (ctrl+o to expand)

● Bash(du -sh ~/.claude/* 2>/dev/null | sort -hr | head -10)
  ⎿  389M       /root/.claude/projects       
     56M        /root/.claude/debug
     21M        /root/.claude/file-history
     … +7 lines (ctrl+o to expand)

● Bash(cat /proc/258165/status 2>/dev/null | grep -E "VmPeak|VmSize|VmRSS|VmData|VmStk|VmExe|VmLib|Threads")
  ⎿  VmPeak:    135528448 kB         
     VmSize:    75386056 kB
     VmRSS:       521928 kB
     … +5 lines (ctrl+o to expand)

● Bash(cat /proc/258165/smaps_rollup 2>/dev/null)
  ⎿  00200000-7fff6610f000 ---p 00000000 00:00 0                              [rollup]
     Rss:              527628 kB
     Pss:              524968 kB
     … +20 lines (ctrl+o to expand)

● 🚨 HOLY SHIT - You might be right!

  Look at the current Claude process (PID 258165):

  | Metric | Value   | WTF?                     |
  |--------|---------|--------------------------|
  | VmPeak | 135 GB  | Peak virtual memory (!!) |
  | VmSize | 71.9 GB | Current virtual memory   |
  | VmData | 62.7 GB | Data segment             |
  | VmRSS  | 509 MB  | Actual RAM used          |

  129 GB peak virtual memory for a CLI tool is INSANE. Even though RSS is only 509MB, the virtual memory allocation is absurd.

  Let me check if this is a known issue with Claude 2.0.76 or your specific setup:

● Bash(ls -la ~/.claude/projects/ | head -20)
  ⎿  total 164                                                         
     drwx------  2 root root   4096 Dec 23 12:15 -root
     drwx------  6 root root 110592 Jan  5 13:20 -srv-MainDjangoDroplet
     … +12 lines (ctrl+o to expand)

● Bash(du -sh ~/.claude/projects/* 2>/dev/null | sort -hr | head -10)
  ⎿  373M       /root/.claude/projects/-srv-MainDjangoDroplet              
     9.2M       /root/.claude/projects/-srv-MainDjangoDroplet-Schematics
     3.1M       /root/.claude/projects/-srv-MainDjangoDroplet-agents
     … +7 lines (ctrl+o to expand)

● Bash(wc -l ~/.claude/history.jsonl && head -1 ~/.claude/history.jsonl | wc -c)
  ⎿  1257 /root/.claude/history.jsonl
     154

● Bash(npm list -g 2>/dev/null | grep claude || ls -la /usr/local/bin/claude 2>/dev/null || which claude && file $(which claude))
  ⎿  Error: Exit code 2
     /bin/bash: eval: line 1: syntax error near unexpected token `('
     /bin/bash: eval: line 1: `npm list -g 2>/dev/null < /dev/null | grep claude || ls -la /usr/local/bin/claude 2>/dev/null || which claude && file \$ 
     ( which claude )'

Steps to Reproduce

Run New CC Update on Ubuntu Server - Connected to Personal Ubuntu Machine Via SSH.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.0.72

Claude Code Version

2.0.76

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Xterm

Additional Information

_No response_

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗