[BUG] Claude Code process grows to ~14 GB RSS causing OOM kill and full system freeze
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's Node.js process grows unbounded over a session until it consumes all
available system RAM and swap, triggering the Linux OOM killer. By the time the
kernel kills the process, the system is so memory-exhausted it hard-freezes and
requires a physical reboot.
This happens consistently within ~5 minutes of starting/resuming a session.
What Should Happen?
Memory usage should remain stable or grow slowly and be bounded. A CLI tool should
not consume all available system RAM.
Error Messages/Logs
Here's a dmesg capture after reboot:
[ 271.140136] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1000.slice/user@1000.service/app.slice/app-org.gnome.Terminal.slice/vte-spawn-42acce52-0992-4dc3-96d9-fe067b14d36c.scope,task=claude,pid=4522,uid=1000
[ 271.140213] Out of memory: Killed process 4522 (claude) total-vm:75693704kB, anon-rss:15022168kB, file-rss:0kB, shmem-rss:1376kB, UID:1000 pgtables:50368kB oom_score_adj:200
Steps to Reproduce
- Start or resume a Claude Code session (
claudeorclaude --resume) - Work normally (read files, run tools, have a multi-turn conversation)
- After several minutes, system becomes unresponsive and freezes completely
Claude Model
Sonnet (default)
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.58 (Claude Code)
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
Environment
- Claude Code version: 2.1.58
- Node.js version: v18.17.1
- OS: Debian GNU/Linux 12 (Bookworm)
- Kernel: 6.1.0-37-amd64
- RAM: 16 GB
- Swap: 5.6 GB
- Enabled plugins: rust-analyzer-lsp@claude-plugins-official
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗