[BUG] Severe memory leak on startup — RSS grows to 7GB in ~4 minutes with no user interaction (WSL2)
Resolved 💬 2 comments Opened Mar 19, 2026 by oushuai01 Closed Apr 17, 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 exhibits a severe memory leak immediately after launch, with no user interaction whatsoever. RSS memory grows from ~500MB to over 7GB within approximately 4 minutes, eventually triggering an OOM condition and crashing WSL2.
What Should Happen?
Memory usage should remain stable after launch, ideally below 500MB,
with no active session or prompts running. It should not grow
unboundedly when the user has not entered any input.
Error Messages/Logs
Steps to Reproduce
- Open a WSL2 terminal
- Run
claudeto start Claude Code - Do nothing — no prompts, no commands, no interaction
- Monitor memory with:
watch -n 2 'ps aux | grep claude | grep -v grep'
Observed memory growth:
- t=0:00 — RES: ~530 MB
- t=1:04 — RES: 1.7 GB
- t=2:04 — RES: 4.4 GB
- t=4:00 — RES: 7+ GB → WSL2 crashes with error: Wsl/Service/E_UNEXPECTED
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.78
Platform
Anthropic API
Operating System
Other Linux
Terminal/Shell
Windows Terminal
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗