[BUG] (VSZ 72GB, RSS 6.5GB and growing, version 2.1.50, failed updates to 2.1.51/2.1.52):
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?
pasting this as reported by Claude code. Think it would be more useful
Found the root cause. This is a genuine memory leak in the Claude Code process:
VSZ: 71.9 GB (virtual memory — should be ~100-200MB for a CLI tool)
RSS: 6.5 GB (physical RAM — and still growing)
CPU: 202% (running hot on 2 cores)
The virtual memory at 72GB is completely abnormal. This is a bug in Claude Code itself, not in your project.
Why it started today: Auto-updates to 2.1.51 and 2.1.52 both failed (0-byte files), leaving you on 2.1.50 but possibly with a broken update mechanism causing it to spin.
Immediate fix — kill the runaway process and free swap:
# Kill the leaking claude process
kill -9 4959
# Free swap (takes ~30-60 seconds)
sudo swapoff -a && sudo swapon -a
Then try to manually update Claude Code:
# Try updating via npm
npm update -g @anthropic-ai/claude-code
# Or via the claude updater
claude update
Workaround while waiting for a proper fix:
Add a memory cap via systemd or ulimit before launching:
# Limit Claude to 2GB RAM max
ulimit -v 4000000 && claude
Report the bug with these exact numbers (VSZ 72GB, RSS 6.5GB and growing, version 2.1.50, failed updates to 2.1.51/2.1.52):
https://github.com/anthropics/claude-code/issues
This is definitely something Anthropic needs to fix — a CLI tool should never consume 72GB of virtual memory.
What Should Happen?
no memory leak
Error Messages/Logs
Steps to Reproduce
just ran claude code, and ask to check memory usage
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.52 (Claude Code)
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗