[BUG] Memory leak: Claude Code consumes ~3GB RAM within seconds of startup

Resolved 💬 3 comments Opened Jan 12, 2026 by bushidoleg Closed Jan 12, 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 has a severe memory leak. The process consumes ~3GB of RAM within less than a minute of starting, even with MCP servers disabled and minimal usage.

Environment:

  • Claude Code version: [run claude --version]
  • OS: Ubuntu 22.04.5 LTS (Kernel 6.8.0-90-generic)
  • Node.js version: [run node --version]

Memory stats after ~18 seconds of running:

  • RSS: ~3GB (3055776 KB)
  • %MEM: 19.4% of system RAM
  • VSZ: ~71GB virtual memory

Process is a single Node.js instance with ~20 worker threads.

  • Claude Code version: 2.0.76 (Claude Code)
  • OS: Ubuntu 22.04.5 LTS
  • Kernel: Linux 6.8.0-90-generic
  • Node.js version: v20.19.5
  • MCP servers: Disabled (issue persists without MCP)

What Should Happen?

Memory usage should remain stable and reasonable (<500MB for typical usage) and not grow unbounded over time.

Error Messages/Logs

Steps to Reproduce

Steps to Reproduce

  1. Start Claude Code: claude
  2. Resume or start any conversation
  3. Monitor memory: ps aux --sort=-%mem | grep claude
  4. Observe RSS growing rapidly to multiple GB within seconds/minutes

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.76

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

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