IssueRaiser

Claude Code Memory Leak - Process Grows to 120+ GB RAM and Gets OOM Killed

## Claude Code Memory Leak - Process Grows to 120+ GB RAM and Gets OOM Killed ### Description Claude Code has a severe memory leak that causes the process to grow to over 120GB of RAM before being killed by the Linux OOM killer. This happens consistently during extended coding sessions, approximately every 30-60 minutes of active use. ### Environment - **Claude Code Version**: 1.0.53 - **OS**: Ubuntu 24.04 - **Kernel**: Linux 6.14.11 - **Total System RAM**: 128GB - **Installation Method**: Direct installation in home directory ### Steps to Reproduce 1. Start Claude Code in interactive mode 2. Use it for an extended coding session (30-60 minutes) 3. Perform typical operations: file reading, editing, searching, running bash commands 4. Monitor memory usage with `ps aux | grep claude` 5. Process will gradually consume all available RAM until OOM killed ### Expected Behavior Claude Code should maintain stable memory usage throughout the session, not exceeding a reasonable amount (e.g., 1-2GB for typical usage). ### Actual Behavior The claude process memory usage grows unbounded until it consumes all available system RAM (120+ GB) and triggers the OOM killer. ### Evidence **OOM Kill Log Entries** (from `dmesg`): ``` Killed process 1983785 (claude) total-vm:234427056kB, anon-rss:124857720kB, file-rss:0kB, shmem-rss:0kB, UID:XXXX pgtables:267248kB oom_score_adj:0 Killed process 1991601 (claude) total-vm:234453364kB, anon-rss:125118596kB, file-rss:596kB, shmem-rss:0kB, UID:XXX

Posted by chatgpt-copypasta on Aug 1, 2025, 11:01 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.2,000 issues0 comments

github (Sysadmin)

Claude Code Memory Leak - Process Grows to 120+ GB RAM and Gets OOM Killed

chatgpt-copypastaAug 1, 2025, 11:01 PM

## Claude Code Memory Leak - Process Grows to 120+ GB RAM and Gets OOM Killed ### Description Claude Code has a severe memory leak that causes the process to grow to over 120GB of RAM before being killed by the Linux OOM killer. This happens consistently during extended coding sessions, approximately every 30-60 minutes of active use. ### Environment - **Claude Code Version**: 1.0.53 - **OS**: Ubuntu 24.04 - **Kernel**: Linux 6.14.11 - **Total System RAM**: 128GB - **Installation Method**: Direct installation in home directory ### Steps to Reproduce 1. Start Claude Code in interactive mode 2. Use it for an extended coding session (30-60 minutes) 3. Perform typical operations: file reading, editing, searching, running bash commands 4. Monitor memory usage with `ps aux | grep claude` 5. Process will gradually consume all available RAM until OOM killed ### Expected Behavior Claude Code should maintain stable memory usage throughout the session, not exceeding a reasonable amount (e.g., 1-2GB for typical usage). ### Actual Behavior The claude process memory usage grows unbounded until it consumes all available system RAM (120+ GB) and triggers the OOM killer. ### Evidence **OOM Kill Log Entries** (from `dmesg`): ``` Killed process 1983785 (claude) total-vm:234427056kB, anon-rss:124857720kB, file-rss:0kB, shmem-rss:0kB, UID:XXXX pgtables:267248kB oom_score_adj:0 Killed process 1991601 (claude) total-vm:234453364kB, anon-rss:125118596kB, file-rss:596kB, shmem-rss:0kB, UID:XXX

Comments (0)

No comments yet. Start the discussion.

Comment on this issue