[BUG] Memory leak in windows

Resolved 💬 7 comments Opened Feb 10, 2026 by raghavpatnecha Closed Apr 21, 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?

<img width="1611" height="621" alt="Image" src="https://github.com/user-attachments/assets/9588ff68-da49-49d8-9ed4-b127a3170a25" />

What Should Happen?

<img width="1611" height="621" alt="Image" src="https://github.com/user-attachments/assets/093774e1-f317-4c84-b669-0165e4e2569d" />

Error Messages/Logs

During compacting claude is continuously giving heap memory error. This is more frequent in .37 and windows specific

Steps to Reproduce

Let the compact window overflow
claude goes for autocompact
Heap error

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

v2.1.20

Claude Code Version

v2.1.38

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

_No response_

View original on GitHub ↗

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