[BUG] Claude Code on Debian 12 rapidly increases RAM usage even when idle
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?
When running claude in an empty directory on Debian 12, the process rapidly increases RAM usage over time, even when idle (no prompts sent).
Live monitoring shows RAM growing from ~500 MB to several GB in minutes, eventually consuming all available memory (12 GB system).
What Should Happen?
claude should use a bounded amount of RAM when idle and not continuously grow memory usage over time.
Error Messages/Logs
Steps to Reproduce
- Open a terminal on Debian 12.
- Create an empty test directory:
mkdir ~/claude-ram-test
cd ~/claude-ram-test
- Start Claude Code. Do not send any prompts, just leave it running:
claude
- In another terminal, monitor the memory usage of the
claudeprocess:
watch -n 1 'ps -p "$(pgrep -f claude | head -n1)" -o rss= | awk "{printf "RAM: %.1f MB\n",$1/1024}"'
- Observe how the RAM of the
claudeprocess keeps increasing over time, even though the session is idle:
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.71
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
I recorded a short screen capture showing the terminal with claude running and a live RAM monitor (watch command) where the memory usage of the claude process increases continuously even while idle.
https://github.com/user-attachments/assets/b8d3f74b-714f-4559-8de4-4e856a87b287
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗