[BUG] Memory leak: Process grows from 2.4GB to 8.4GB in ~2 minutes with minimal tool usage (v2.1.80)

Resolved 💬 3 comments Opened Mar 21, 2026 by Real-Sayya Closed Mar 25, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Version: 2.1.80
OS: Linux (Debian 13, KDE Wayland)
RAM: 16 GB

What Should Happen?

Claude Code process starts at ~2.4 GB RSS and grows to ~8.4 GB (~51% of total RAM)
within approximately 2 minutes. The session only had 4 Bash tool calls with small
outputs (~50KB total).

Error Messages/Logs

Steps to Reproduce

  1. Open Claude Code in a project with a large CLAUDE.md (~15KB)
  2. Run a few simple Bash commands (e.g. ps aux, free -h)
  3. Watch RAM: process grows exponentially, not linearly

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.80

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

PyCharm terminal

Additional Information

Title:
Memory leak: Process grows from 2.4GB to 8.4GB in ~2 minutes with minimal tool usage (v2.1.80)

Body:
Version: 2.1.80
OS: Linux (Debian 13, KDE Wayland)
RAM: 16 GB

What happened:
Claude Code process starts at ~2.4 GB RSS and grows to ~8.4 GB (~51% of total RAM)
within approximately 2 minutes. The session only had 4 Bash tool calls with small
outputs (~50KB total).

Reproduction:

  1. Open Claude Code in a project with a large CLAUDE.md (~15KB)
  2. Run a few simple Bash commands (e.g. ps aux, free -h)
  3. Watch RAM: process grows exponentially, not linearly

System context:

  • Large CLAUDE.md injected as system-reminder every turn
  • Explanatory output style active (additional system-reminder each turn)
  • Started via PyCharm terminal

Impact:
System becomes unresponsive and crashes. With 16GB RAM + 15GB Swap,
crash occurs within ~3-5 minutes of starting a session.

This did NOT happen in previous versions.

View original on GitHub ↗

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