You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Memory spike: 3 processes peaked at 12.7 GB combined on 18 GB machine (v2.1.34, macOS native) #24113
WebKit malloc is responsible for 6.3 GB out of 9.3 GB total dirty memory. IOAccelerator (GPU) adds another 2.3 GB. These two categories alone account for 93% of all memory used.
This suggests the WebView layer is not releasing DOM/rendering memory between conversation turns or after context compaction.
Environment
Claude Code: 2.1.34 (native macOS app)
macOS: 26.1 (Tahoe, Build 25B78)
Chip: Apple M3 Pro
RAM: 18 GB
Model: Opus 4.6 (1M context)
Steps to Reproduce
Use Claude Code native for a few hours across multiple sessions
Still happening on v2.1.34 — confirms the leak is not fixed across 4 versions (2.1.19 → 2.1.34)
footprint profiling with malloc zone breakdown — WebKit malloc alone accounts for 6.3 GB out of 9.3 GB dirty. This points directly at the WebView rendering layer, not Node.js or the npm CLI process
Zombie processes — PIDs alive for 16 and 26 days after sessions ended. This is a separate process lifecycle bug not mentioned in any of the three issues
Native CLI, not npm CLI or VSCode — different runtime (Electron-based native app vs Node.js), same memory behavior
If anything, this report strengthens the case that the WebKit malloc leak is a cross-platform, cross-version systemic issue — not limited to one trigger or one version.
Update: Root cause identified — this is a Ghostty terminal bug, not Claude Code
After further investigation, the memory consumption I reported was caused by a memory leak in Ghostty (my terminal emulator), not Claude Code itself.
Root cause: Ghostty has a bug in scrollback pruning where non-standard pages are resized to standard size, causing munmap to never be called. Claude Code's output (heavy multi-codepoint grapheme sequences) triggers this leak at scale.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.
Activity
github-actions commentedon Feb 8, 2026
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Piesson commentedon Feb 8, 2026
Not a duplicate — this report covers a different version, platform, and trigger from all three flagged issues, and provides new diagnostic data.
What this issue adds that the others don't:
footprintprofiling with malloc zone breakdown — WebKit malloc alone accounts for 6.3 GB out of 9.3 GB dirty. This points directly at the WebView rendering layer, not Node.js or the npm CLI processIf anything, this report strengthens the case that the WebKit malloc leak is a cross-platform, cross-version systemic issue — not limited to one trigger or one version.
Piesson commentedon Feb 25, 2026
Update: Root cause identified — this is a Ghostty terminal bug, not Claude Code
After further investigation, the memory consumption I reported was caused by a memory leak in Ghostty (my terminal emulator), not Claude Code itself.
Root cause: Ghostty has a bug in scrollback pruning where non-standard pages are resized to standard size, causing
munmapto never be called. Claude Code's output (heavy multi-codepoint grapheme sequences) triggers this leak at scale.References:
Status: Fixed on Ghostty's main branch. Will ship in Ghostty 1.3.0 (expected March 2026). Workaround:
scrollback-limit = 2500in Ghostty config.Apologies for the noise — closing this issue.
Piesson commentedon Feb 25, 2026
Closing — root cause is Ghostty memory leak, not Claude Code.
github-actions commentedon Mar 4, 2026
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.