Memory leak: Claude process using 304GB+ memory

Resolved 💬 10 comments Opened Jan 12, 2026 by shindonghwi Closed Apr 8, 2026

<img width="891" height="67" alt="Image" src="https://github.com/user-attachments/assets/319fc0c5-348a-4d90-9ef5-906fad155835" />

Bug Description

Claude Code process is consuming an extreme amount of memory (304.17GB) on a 64GB RAM system, causing severe system slowdown and excessive swap usage (19.63GB).

Environment

  • Claude Code Version: 2.1.3
  • OS: macOS Darwin 24.3.0 (Apple Silicon)
  • Physical RAM: 64GB
  • Node.js: (via Homebrew Caskroom)

Symptoms

  • Single claude process using 304.17GB memory
  • Multiple additional claude processes (631MB, 461MB, 460MB, 334MB, 285MB)
  • System swap usage: 19.63GB
  • CPU usage: 99.91%
  • System becomes unresponsive

Steps to Reproduce

  1. Start Claude Code CLI
  2. Have a long session with multiple file edits and code refactoring
  3. Memory usage grows unbounded over time

Screenshots

Activity Monitor showing claude process at 304.17GB:

  • Used memory: 55.96GB (of 64GB physical)
  • Swap used: 19.63GB
  • Compressed: 33.04GB

Expected Behavior

Memory usage should remain reasonable and not exceed available physical RAM.

Workaround

pkill -9 claude

Additional Context

This occurred during a code refactoring session involving multiple file reads, edits, and grep operations across a Go backend codebase (~33 modules).

View original on GitHub ↗

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