[BUG]

Resolved 💬 3 comments Opened Mar 13, 2026 by mmbilal2725 Closed Apr 11, 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?

Here's a summary of what I found and what to do:

---
Root cause: This is likely a memory leak in Claude Code v2.1.73 on Windows. The conversation transcript and context accumulate in the
Node.js heap and aren't getting garbage collected properly. Going from 4.5GB → 9GB → 23GB → 30 GB in minutes is abnormal.

What's NOT causing it:

  • No ralph-loop state file is active (that loop plugin is present but dormant)
  • No cron jobs running
  • No runaway background processes

---
To stop it immediately:

  1. Kill and restart Claude Code — open Task Manager, end claude.exe, then reopen it. The process memory will reset.
  2. Run /heapdump before killing if you want to capture the leak for reporting (creates a .heapsnapshot file).
  3. Update Claude Code — run this in a separate terminal:

npm update -g @anthropic-ai/claude-code

  1. or however you installed it (if via installer, rerun the installer).
  2. If it persists after updating — report the bug at https://github.com/anthropics/claude-code/issues with your OS (Windows 10), Claude

Code version (2.1.73), and the memory growth rate.

Workaround in the meantime: Keep sessions short and restart claude.exe when memory climbs above a threshold that slows your machine.

What Should Happen?

plz resovle this

Error Messages/Logs

Steps to Reproduce

just opened new session in VS code.
run new terminal
launch claude code
and the memory started to increase / leak

Claude Model

Sonnet (default)

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.73

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

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