[BUG] Memory leak: ArrayBuffers grow at 55-70 GB/hour from session start (v2.1.71, Node v24, Linux/WSL2)

Resolved 💬 2 comments Opened Mar 10, 2026 by zonetech Closed Mar 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?

Environment

  • Claude Code version: 2.1.71
  • Node.js: v24.3.0
  • OS: Linux (WSL2, kernel 6.6.87.2-microsoft-standard-WSL2)
  • Platform: linux

## Description
Claude Code leaks memory at an extreme rate (~55,000–70,000 MB/hour) starting immediately from launch, even when idle. The process
reaches 21+ GB within minutes of starting a session.

The leak is entirely in ArrayBuffers (off-heap), not the V8 JS heap:

  • V8 heap: ~47–64 MB (normal)
  • ArrayBuffers: 4–7+ GB within 2–3 minutes of launch
  • This started today (2026-03-10) — yesterday (2026-03-09) behavior was normal. No version change on my end.

What Should Happen?

There should not be a memory leak.

Error Messages/Logs

## Diagnostics (Session 1 — 135 seconds uptime)
  - heapUsed: 7,891,772,358 bytes
  - arrayBuffers: 7,252,488,288 bytes
  - external: 7,852,825,631 bytes
  - rss: 2,202,353,664 bytes
  - Growth rate: **55,863 MB/hour** (16.27 MB/sec)

  ## Diagnostics (Session 2 — 182 seconds uptime, after npm reinstall)
  - heapUsed: 4,625,531,242 bytes
  - arrayBuffers: 4,125,831,755 bytes
  - external: 4,585,265,187 bytes
  - rss: 3,676,815,360 bytes
  - Growth rate: **69,403 MB/hour** (20.2 MB/sec)

Steps to Reproduce

Steps to reproduce

  1. Launch claude on WSL2 / Linux
  2. Run /heapdump after ~2 minutes
  3. Observe arrayBuffers in the GB range

## Impact
System RAM is exhausted within 5–10 minutes of use, requiring constant session restarts to avoid freezing the machine.

NOTE: RENAME 6dae31b1-88d6-44c6-9dc6-421072fa56fe.heapsnapshot.json to
6dae31b1-88d6-44c6-9dc6-421072fa56fe.heapsnapshot

Github wont show .heapsnapshot for upload select.

6dae31b1-88d6-44c6-9dc6-421072fa56fe.heapsnapshot.json
6dae31b1-88d6-44c6-9dc6-421072fa56fe-diagnostics.json

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

It worked yesterday in the same version 2.1.71

Claude Code Version

2.1.71

Platform

Other

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Windows Terminal

Additional Information

_No response_

View original on GitHub ↗

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