claude-code - 💡(How to fix) Fix Memory leak: RSS grows to ~6 GB on ARM64 in 2.1.121 (regression similar to #28763) [3 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#54572Fetched 2026-04-30 06:41:59
View on GitHub
Comments
3
Participants
3
Timeline
11
Reactions
0
Author
Timeline (top)
labeled ×6commented ×3closed ×1cross-referenced ×1

Same memory leak pattern as #28763 has reappeared in 2.1.121. The claude process grows unbounded and is killed by the OOM killer within 30–60 minutes of an active session. #28763 was reported fixed in 2.1.58 — this is a fresh regression on a later version.

Root Cause

  • Started after an auto-update yesterday — system had been stable on a prior version for weeks before this.
  • ARM64-specific? Possibly — original issue had platform:wsl label, but the failure mode (unbounded heap growth → OOM) is identical.
  • 1M-context tier may amplify it but probably not the root cause; growth pattern suggests an ArrayBuffer / heap accumulation that doesn't release.

Code Example

Out of memory: Killed process 3695213 (claude) total-vm:75207488kB, anon-rss:5914480kB
Out of memory: Killed process 3695820 (claude) total-vm:75207536kB, anon-rss:5912752kB
Out of memory: Killed process 3697675 (claude) total-vm:75174704kB, anon-rss:5908048kB
Out of memory: Killed process 3698554 (claude) total-vm:75207552kB, anon-rss:5952128kB
Out of memory: Killed process 3699091 (claude) total-vm:75240240kB, anon-rss:5942944kB
RAW_BUFFERClick to expand / collapse

Summary

Same memory leak pattern as #28763 has reappeared in 2.1.121. The claude process grows unbounded and is killed by the OOM killer within 30–60 minutes of an active session. #28763 was reported fixed in 2.1.58 — this is a fresh regression on a later version.

Environment

  • Claude Code: 2.1.121
  • Node: v20.19.2
  • npm: 9.2.0
  • OS: Debian 13 (trixie), Linux 6.12.75+rpt-rpi-2712
  • Arch: aarch64 (Raspberry Pi 5, 8 GB RAM, 2 GB swap)
  • Model: claude-opus-4-7[1m] (Opus 4.7, 1M context tier)

Repro

Normal usage — read/edit files, multi-turn coding session on a small repo. Within ~30–60 minutes the OS kills the claude process. Restart, repeat, same outcome.

Evidence (dmesg, 5 consecutive OOM kills)

Out of memory: Killed process 3695213 (claude) total-vm:75207488kB, anon-rss:5914480kB
Out of memory: Killed process 3695820 (claude) total-vm:75207536kB, anon-rss:5912752kB
Out of memory: Killed process 3697675 (claude) total-vm:75174704kB, anon-rss:5908048kB
Out of memory: Killed process 3698554 (claude) total-vm:75207552kB, anon-rss:5952128kB
Out of memory: Killed process 3699091 (claude) total-vm:75240240kB, anon-rss:5942944kB

Every kill: virtual ~75 GB, RSS ~5.9 GB. RSS is consistent across runs which suggests the leak grows until the OOM-killer fires at roughly the same point relative to total system memory.

Notes

  • Started after an auto-update yesterday — system had been stable on a prior version for weeks before this.
  • ARM64-specific? Possibly — original issue had platform:wsl label, but the failure mode (unbounded heap growth → OOM) is identical.
  • 1M-context tier may amplify it but probably not the root cause; growth pattern suggests an ArrayBuffer / heap accumulation that doesn't release.

References: #28763, #27421

extent analysis

TL;DR

The memory leak in the claude process can be mitigated by downgrading to version 2.1.58, where the issue was previously reported fixed.

Guidance

  • Verify the memory leak pattern by monitoring the claude process's memory usage over time to confirm it grows unbounded.
  • Check the system's memory configuration and usage to ensure it's not a system-wide issue, but rather specific to the claude process.
  • Consider testing on a different architecture or platform to determine if the issue is ARM64-specific.
  • Review the changes made between version 2.1.58 and 2.1.121 to identify potential causes of the regression.

Example

No code snippet is provided as the issue seems to be related to a specific version regression rather than a code-level problem.

Notes

The issue may be specific to the ARM64 architecture, but further testing is needed to confirm. The fact that the issue reappeared after an auto-update suggests a regression in the newer version.

Recommendation

Apply workaround: Downgrade to version 2.1.58, as it was previously reported to have fixed the memory leak issue. This should provide a temporary solution until the root cause is identified and fixed in a newer version.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Memory leak: RSS grows to ~6 GB on ARM64 in 2.1.121 (regression similar to #28763) [3 comments, 3 participants]