[BUG] Extreme latency — memory leak found via /heapdump (348,766 MB/hour growth rate)

Resolved 💬 2 comments Opened Jun 26, 2026 by matheusmagnani Closed Jun 29, 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?

Extreme latency for 3+ days. Tasks take up to 20 minutes to start, even simple ones on brand new sessions. The /heapdump command revealed a memory growth rate of 348,766.7 MB/hour and warnings about native memory exceeding heap size.

What Should Happen?

Tasks should start responding within seconds, as they did before this issue began approximately 3 days ago.

Error Messages/Logs

/heapdump output:
RSS 0.31 GB (peak 0.31 GB)
  JS heap         0.05 GB  in snapshot
  array buffers   0.00 GB  not in snapshot
  other external  0.04 GB  not in snapshot
  unaccounted     0.21 GB  not in snapshot (code/JIT/stacks/allocator)
  ⚠ Native memory > heap - leak may be in native addons (node-pty, sharp, etc.)
  ⚠ High memory growth rate: 348766.7 MB/hour

Steps to Reproduce

  1. Open Claude Code in any project
  2. Start a new session (even with a simple prompt)
  3. Observe 10-20 minute delay before any response begins
  4. Run /heapdump — warnings about native memory leak and abnormal growth rate appear

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

Unknown — issue started approximately 3 days ago

Claude Code Version

2.1.181 (stable) — also reproduced on 2.1.193 (latest)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

  • Issue persists in --safe-mode (all plugins, MCP servers, hooks disabled)
  • Tested on multiple different networks — no difference
  • Tried /compact — no improvement
  • Downgraded from 2.1.193 to 2.1.181 — issue persists on both versions
  • Status page (claude.status) shows no incidents during the slowness
  • Diagnostic files attached: .heapsnapshot and -diagnostics.json

6d53f3a1-21c6-4e75-91ae-41592043be1b-diagnostics.json

heapdump.zip

View original on GitHub ↗

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