Skip to content

Memory spike: 3 processes peaked at 12.7 GB combined on 18 GB machine (v2.1.34, macOS native) #24113

@Piesson

Description

@Piesson

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report
  • I am using the latest version of Claude Code

What's Wrong?

Three Claude Code processes spiked to a combined peak of 12.7 GB on an 18 GB machine (71% of total RAM). System swap hit 96%.

This is not a team/multi-agent session. Just normal single-user work — reading files, editing code, running tools.

The Numbers

Captured with footprint -p claude --swapped on Feb 8, 2026:

Peak memory per process:

PID Current Peak Top Consumer
97354 4,414 MB 5,810 MB WebKit malloc: 3,057 MB
94672 1,597 MB 3,715 MB WebKit malloc: 850 MB
63744 2,276 MB 3,215 MB WebKit malloc: 1,738 MB
3 others 1,015 MB ~1,200 MB
Total 9,301 MB ~12,740 MB WebKit malloc: 6,381 MB

Two additional problems:

  • Zombie processes found: PID 64816 alive for 16 days, PID 28807 alive for 26 days. These sessions ended long ago but the processes never exited.
  • Swap nearly full: 24,581 / 25,600 MB used (96%). Swapins: 765M.

Root Cause Hint

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

  1. Use Claude Code native for a few hours across multiple sessions
  2. Run footprint -p claude --swapped
  3. Observe memory growth and zombie processes

Workaround

pkill -9 claude reclaims all memory.

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions