[BUG] Excessive RAM usage with multiple parallel chats (~10 sessions → 30 GB memory pressure, macOS OOM)

Resolved 💬 2 comments Opened May 28, 2026 by AlexSerbinov Closed Jun 1, 2026

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.

View original on GitHub ↗

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