[BUG] Memory leak: Claude Code RSS grows from 500MB to 4.6GB+ within minutes

Resolved 💬 5 comments Opened Apr 12, 2026 by mdtusersh Closed Apr 13, 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 process consumes RAM continuously and grows unbounded (~500MB/minute) until the system runs out of memory. The process starts at ~500MB RSS but climbs to 4.6GB+ within 6 minutes of normal conversation. Running /exit immediately frees all memory. Restarting claude resets to ~500MB but the growth resumes immediately. This was not happening before — started recently.

What Should Happen?

Memory usage should stabilize after initial load, not grow unbounded at ~500MB/minute during a normal conversation.

Error Messages/Logs

No error messages — the process silently consumes memory until the system runs out.

Steps to Reproduce

  1. Run claude in any project directory
  2. Send a few normal messages (no large file reads, no MCP servers, simple text conversation)
  3. Monitor with ps aux | grep claude every 1-2 minutes
  4. Observe RSS growing ~500MB/minute:
  • Fresh start: 483 MB (3.0%)
  • ~2 minutes: 2.3 GB (14.5%)
  • ~4 minutes: 3.5 GB (21.7%)
  • ~6 minutes: 4.6 GB (28.8%)
  1. System RAM went from 4.8 GB → 9.0 GB used, solely from the claude process
  2. /exit immediately frees all memory back to normal

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

Not sure of exact version, but this was not happening before updating to 2.1.100

Claude Code Version

2.1.100 (Claude Code)

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

  • No MCP servers configured
  • No hooks configured
  • Clean git repo (no uncommitted changes)
  • Node.js v25.8.0
  • Ubuntu Linux 25.04 (kernel 6.17.0-20-generic)
  • System RAM: 16GB
  • No other unusual processes running
  • The leak happens consistently across fresh sessions
  • Continuous network activity observed during the leak

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗