Memory leak: ArrayBuffers not released, ~6 GB/hour growth rate

Resolved 💬 4 comments Opened Mar 13, 2026 by fthbng77 Closed Apr 10, 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?

Memory leak: ArrayBuffers not released, ~6 GB/hour growth rate

What Should Happen?

Claude Code exhibits a significant memory leak during normal usage. A single session grows at ~6.2 GB/hour, eventually
consuming all available RAM. I had 3 sessions open and total usage reached ~21 GB.

Environment

  • Claude Code version: 2.1.73
  • Node.js: v24.3.0
  • Platform: Linux (Ubuntu, 5.15.0-139-generic)
  • RAM: 32 GB

Diagnostics (from /heapdump)

{
"uptimeSeconds": 919,
"memoryUsage": {
"heapUsed": 1899456187,
"heapTotal": 56487936,
"external": 1854342951,
"arrayBuffers": 1286141871,
"rss": 1657004032
},
"memoryGrowthRate": {
"bytesPerSecond": 1801763,
"mbPerHour": 6185.86
},
"analysis": {
"potentialLeaks": ["High memory growth rate: 6185.9 MB/hour"],
"recommendation": "WARNING: 1 potential leak indicator(s) found."
}
}

Key observations

  • ~1.2 GB in arrayBuffers and ~1.7 GB in external memory after only ~15 minutes
  • Another session (PID 43844) running for ~50 minutes reached 17 GB RSS and kept growing
  • No large file reads, diffs, or unusual tool usage — just normal conversation
  • The leak appears to be in native/external memory (ArrayBuffers), not in the V8 heap itself

Steps to reproduce

  1. Start a Claude Code session
  2. Have a normal conversation (no large file operations needed)
  3. Monitor RSS with ps aux or run /heapdump
  4. Memory grows continuously at ~6 GB/hour

Error Messages/Logs

Claude Code exhibits a significant memory leak during normal usage. A single session grows at ~6.2 GB/hour, eventually
   consuming all available RAM. I had 3 sessions open and total usage reached ~21 GB.

  Environment

  - Claude Code version: 2.1.73
  - Node.js: v24.3.0
  - Platform: Linux (Ubuntu, 5.15.0-139-generic)
  - RAM: 32 GB

  Diagnostics (from /heapdump)

  {
    "uptimeSeconds": 919,
    "memoryUsage": {
      "heapUsed": 1899456187,
      "heapTotal": 56487936,
      "external": 1854342951,
      "arrayBuffers": 1286141871,
      "rss": 1657004032
    },
    "memoryGrowthRate": {
      "bytesPerSecond": 1801763,
      "mbPerHour": 6185.86
    },
    "analysis": {
      "potentialLeaks": ["High memory growth rate: 6185.9 MB/hour"],
      "recommendation": "WARNING: 1 potential leak indicator(s) found."
    }
  }

  Key observations

  - ~1.2 GB in arrayBuffers and ~1.7 GB in external memory after only ~15 minutes
  - Another session (PID 43844) running for ~50 minutes reached 17 GB RSS and kept growing
  - No large file reads, diffs, or unusual tool usage — just normal conversation
  - The leak appears to be in native/external memory (ArrayBuffers), not in the V8 heap itself

  Steps to reproduce

  1. Start a Claude Code session
  2. Have a normal conversation (no large file operations needed)
  3. Monitor RSS with ps aux or run /heapdump
  4. Memory grows continuously at ~6 GB/hour

Steps to Reproduce

Claude Code exhibits a significant memory leak during normal usage. A single session grows at ~6.2 GB/hour, eventually
consuming all available RAM. I had 3 sessions open and total usage reached ~21 GB.

Environment

  • Claude Code version: 2.1.73
  • Node.js: v24.3.0
  • Platform: Linux (Ubuntu, 5.15.0-139-generic)
  • RAM: 32 GB

Diagnostics (from /heapdump)

{
"uptimeSeconds": 919,
"memoryUsage": {
"heapUsed": 1899456187,
"heapTotal": 56487936,
"external": 1854342951,
"arrayBuffers": 1286141871,
"rss": 1657004032
},
"memoryGrowthRate": {
"bytesPerSecond": 1801763,
"mbPerHour": 6185.86
},
"analysis": {
"potentialLeaks": ["High memory growth rate: 6185.9 MB/hour"],
"recommendation": "WARNING: 1 potential leak indicator(s) found."
}
}

Key observations

  • ~1.2 GB in arrayBuffers and ~1.7 GB in external memory after only ~15 minutes
  • Another session (PID 43844) running for ~50 minutes reached 17 GB RSS and kept growing
  • No large file reads, diffs, or unusual tool usage — just normal conversation
  • The leak appears to be in native/external memory (ArrayBuffers), not in the V8 heap itself

Steps to reproduce

  1. Start a Claude Code session
  2. Have a normal conversation (no large file operations needed)
  3. Monitor RSS with ps aux or run /heapdump
  4. Memory grows continuously at ~6 GB/hour

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.73 (Claude Code)

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

Claude Code exhibits a significant memory leak during normal usage. A single session grows at ~6.2 GB/hour, eventually
consuming all available RAM. I had 3 sessions open and total usage reached ~21 GB.

Environment

  • Claude Code version: 2.1.73
  • Node.js: v24.3.0
  • Platform: Linux (Ubuntu, 5.15.0-139-generic)
  • RAM: 32 GB

Diagnostics (from /heapdump)

{
"uptimeSeconds": 919,
"memoryUsage": {
"heapUsed": 1899456187,
"heapTotal": 56487936,
"external": 1854342951,
"arrayBuffers": 1286141871,
"rss": 1657004032
},
"memoryGrowthRate": {
"bytesPerSecond": 1801763,
"mbPerHour": 6185.86
},
"analysis": {
"potentialLeaks": ["High memory growth rate: 6185.9 MB/hour"],
"recommendation": "WARNING: 1 potential leak indicator(s) found."
}
}

Key observations

  • ~1.2 GB in arrayBuffers and ~1.7 GB in external memory after only ~15 minutes
  • Another session (PID 43844) running for ~50 minutes reached 17 GB RSS and kept growing
  • No large file reads, diffs, or unusual tool usage — just normal conversation
  • The leak appears to be in native/external memory (ArrayBuffers), not in the V8 heap itself

Steps to reproduce

  1. Start a Claude Code session
  2. Have a normal conversation (no large file operations needed)
  3. Monitor RSS with ps aux or run /heapdump
  4. Memory grows continuously at ~6 GB/hour

View original on GitHub ↗

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