Memory leak: RSS reaches 2.6GB in ~3 minutes with 45GB/hour growth rate
Bug Description
Claude Code exhibits abnormal memory growth, reaching ~2.6GB RSS within approximately 3 minutes of usage (201 seconds uptime). The diagnostics indicate a memory growth rate of ~45,506 MB/hour, which is clearly a leak.
Diagnostics Summary
| Metric | Value |
|--------|-------|
| RSS | 2,674 MB (~2.6 GB) |
| Heap Used | 2,674 MB |
| External Memory | 2,641 MB |
| ArrayBuffers | 2,329 MB |
| Growth Rate | ~13.3 MB/s (45,506 MB/hour) |
| Uptime at dump | 201 seconds (~3.4 min) |
| CC Version | 2.1.72 |
| Node Version | v24.3.0 |
| Platform | Linux (6.19.6-zen1-1-zen) |
The bulk of memory is in external / arrayBuffers (2.3GB of the 2.6GB total), suggesting the leak is in native/buffer allocations rather than JS heap objects.
Diagnostics Analysis Output
potentialLeaks: ["High memory growth rate: 45506.7 MB/hour"]
recommendation: "WARNING: 1 potential leak indicator(s) found."
Reproduction
The leak occurs during normal interactive usage. A heapdump (34MB .heapsnapshot) and full diagnostics JSON were captured via /heapdump and are available upon request.
Environment
- OS: Arch Linux, kernel 6.19.6-zen1-1-zen
- Claude Code: 2.1.72
- Node.js: v24.3.0
- Shell: zsh
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗