[BUG] Native memory leak in Claude Code - 844GB/hour growth rate
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:
- macOS 26.5.1 (25F80)
- Claude Desktop version: 1.10628.2
- Hardware: MacBook Pro 16" 2019, Intel i9, 32GB RAM
Issue:
Native memory leak causing extreme memory growth in Claude Code terminal.
Diagnostics from /heapdump:
- RSS: 0.30 GB (peak 0.30 GB)
- JS heap: 0.05 GB
- Unaccounted native memory: 0.21 GB
- Memory growth rate: 844,474 MB/hour
- Warning: "Native memory > heap - leak may be in native addons (node-pty, sharp, etc.)"
The leak is in native code, not JavaScript objects.
Reproducible: Yes, 100% of the time
4b99a546-7b3f-4b39-a672-27c83e06a387-diagnostics.json
4b99a546-7b3f-4b39-a672-27c83e06a387.heapsnapshot.zip
What Should Happen?
The memory should not bloat like this. I am not performing any task (on the desktop app), yet the memory already grew by 40MB in the last 2 minutes.
I have stored all relevant learnings from all sessions in all projects that were long and resource-intensive
Error Messages/Logs
Environment:
- macOS 26.5.1 (25F80)
- Claude Desktop version: 1.10628.2
- Hardware: MacBook Pro 16" 2019, Intel i9, 32GB RAM
Issue:
Native memory leak causing extreme memory growth in Claude Code terminal.
Diagnostics from /heapdump:
- RSS: 0.30 GB (peak 0.30 GB)
- JS heap: 0.05 GB
- Unaccounted native memory: 0.21 GB
- Memory growth rate: 844,474 MB/hour
- Warning: "Native memory > heap - leak may be in native addons (node-pty, sharp, etc.)"
The leak is in native code, not JavaScript objects.
Reproducible: Yes, 100% of the time
Steps to Reproduce
Environment:
- macOS 26.5.1 (25F80)
- Claude Desktop version: 1.10628.2
- Hardware: MacBook Pro 16" 2019, Intel i9, 32GB RAM
Issue:
Native memory leak causing extreme memory growth in Claude Code terminal.
Diagnostics from /heapdump:
- RSS: 0.30 GB (peak 0.30 GB)
- JS heap: 0.05 GB
- Unaccounted native memory: 0.21 GB
- Memory growth rate: 844,474 MB/hour
- Warning: "Native memory > heap - leak may be in native addons (node-pty, sharp, etc.)"
The leak is in native code, not JavaScript objects.
Reproducible: Yes, 100% of the time
Claude Model
Sonnet (default)
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
Claude 1.10628.2 (deee0a) 2026-06-03T20:08:36.000Z
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗