claude-code - 💡(How to fix) Fix [BUG] Excessive RAM usage with multiple parallel chats (~10 sessions → 30 GB memory pressure, macOS OOM)

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…

Running multiple Claude Code chats in parallel (around 10 concurrent sessions) causes total memory consumption to climb to ~30 GB (RAM + compressed + swap), which triggers the macOS "Your system has run out of application memory" error and forces apps to be killed.

Error Message

Running multiple Claude Code chats in parallel (around 10 concurrent sessions) causes total memory consumption to climb to ~30 GB (RAM + compressed + swap), which triggers the macOS "Your system has run out of application memory" error and forces apps to be killed.

Root Cause

Running multiple Claude Code chats in parallel (around 10 concurrent sessions) causes total memory consumption to climb to ~30 GB (RAM + compressed + swap), which triggers the macOS "Your system has run out of application memory" error and forces apps to be killed.

Fix Action

Fix / Workaround

  • This appears related to the existing memory-leak reports (#4953, #51077, #56693, #58067, #61425) but specifically about the multi-session workflow which is a common pattern for power users (one chat per repo / per task).
  • Even if each session stays under the ~700 MB RSS mentioned in #61425, that already implies ~7 GB just for 10 idle sessions — and with growth over time it quickly exceeds available RAM on a 16 GB Mac.
  • Suggested mitigations worth investigating:
    • Hard memory cap / configurable RSS limit per session.
    • Better cleanup of large tool outputs / transcript buffers between turns.
    • Documentation guidance on max recommended concurrent sessions per RAM tier.
RAW_BUFFERClick to expand / collapse

Summary

Running multiple Claude Code chats in parallel (around 10 concurrent sessions) causes total memory consumption to climb to ~30 GB (RAM + compressed + swap), which triggers the macOS "Your system has run out of application memory" error and forces apps to be killed.

Environment

  • Claude Code version: 2.1.154
  • OS: macOS 26.5 (Build 25F5042g)
  • Hardware: Apple Silicon, 16 GB physical RAM
  • Install method: native CLI (claude)
  • Shell: zsh

Steps to Reproduce

  1. Open ~10 terminal tabs / panes (iTerm2 or Terminal.app).
  2. Start a claude session in each one (typical workflow: parallel chats for different repos / tasks).
  3. Use them for normal coding work over an extended period (read files, run tools, edit code).
  4. Watch Activity Monitor → memory used by node / Claude Code processes climbs steadily.
  5. After a while, macOS reports memory pressure and eventually shows the OOM dialog: "Your system has run out of application memory."

Expected Behavior

A single Claude Code session should have a bounded memory footprint. Running ~10 sessions on a 16 GB machine should not exhaust system memory + swap.

Actual Behavior

Combined RSS + swap across the Claude Code processes reaches ~30 GB, swap usage spikes, and macOS forces processes to be killed (sometimes including unrelated apps).

Notes

  • This appears related to the existing memory-leak reports (#4953, #51077, #56693, #58067, #61425) but specifically about the multi-session workflow which is a common pattern for power users (one chat per repo / per task).
  • Even if each session stays under the ~700 MB RSS mentioned in #61425, that already implies ~7 GB just for 10 idle sessions — and with growth over time it quickly exceeds available RAM on a 16 GB Mac.
  • Suggested mitigations worth investigating:
    • Hard memory cap / configurable RSS limit per session.
    • Better cleanup of large tool outputs / transcript buffers between turns.
    • Documentation guidance on max recommended concurrent sessions per RAM tier.

Impact

Forces me to manually close chats or restart the machine, which interrupts ongoing work and loses session context. Multi-session parallel workflows are effectively unusable on 16 GB Macs.

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