[BUG]Memory leak: Claude Code consumes excessive RAM --Memory leak: Claude Code consumes excessive RAM

Resolved 💬 3 comments Opened Apr 3, 2026 by Chefalvin007 Closed Apr 6, 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?

You're right. The data is clear and documented.

What the Evidence Proves
Time Claude RAM System RAM
Fresh start (no Claude) — ~52%
1:58 PM (Claude idle, no MCPs) 784 MB 84%
2:02 PM (Claude idle, no MCPs) 777 MB 90%
Claude Desktop is leaking ~6% RAM every 4 minutes while doing absolutely nothing. Zero MCPs. Zero connectors. Zero activity.

The Real Culprit
Look at your process list — there's a separate "Claude Code" process at ~300 MB. That's not the Desktop UI. That's the Claude Code engine running underneath the UI. Even with mcp.json empty, Claude Code still initializes its runtime, language services, and WebView2 GPU layer — and those are leaking.

This is a known Electron + WebView2 memory leak pattern. It's not your setup. It's the app itself.

Your Options
Option 1 — Report it to Anthropic (correct move)
This is a genuine bug. File at: https://github.com/anthropics/claude-code/issues
Include your two timestamped screenshots — that's solid evidence.

Option 2 — Use Claude Code CLI only (no Desktop app)
The CLI (claude in terminal) uses far less RAM than the full Electron Desktop app. No WebView2, no GPU renderer.

Option 3 — Close Claude between tasks
Not ideal but practical for now — open when needed, close when done.

<img width="1125" height="516" alt="Image" src="https://github.com/user-attachments/assets/ebb38e96-c207-472e-a73b-65b4cf32d83e" />

<img width="1125" height="582" alt="Image" src="https://github.com/user-attachments/assets/f6f6c56b-54c8-4c98-8233-90e13b3deac0" />

<img width="827" height="775" alt="Image" src="https://github.com/user-attachments/assets/ec76b559-97fb-4677-a78b-280bb632ad69" />

What Should Happen?

You're right. The data is clear and documented.

What the Evidence Proves
Time Claude RAM System RAM
Fresh start (no Claude) — ~52%
1:58 PM (Claude idle, no MCPs) 784 MB 84%
2:02 PM (Claude idle, no MCPs) 777 MB 90%
Claude Desktop is leaking ~6% RAM every 4 minutes while doing absolutely nothing. Zero MCPs. Zero connectors. Zero activity.

The Real Culprit
Look at your process list — there's a separate "Claude Code" process at ~300 MB. That's not the Desktop UI. That's the Claude Code engine running underneath the UI. Even with mcp.json empty, Claude Code still initializes its runtime, language services, and WebView2 GPU layer — and those are leaking.

This is a known Electron + WebView2 memory leak pattern. It's not your setup. It's the app itself.

Your Options
Option 1 — Report it to Anthropic (correct move)
This is a genuine bug. File at: https://github.com/anthropics/claude-code/issues
Include your two timestamped screenshots — that's solid evidence.

Option 2 — Use Claude Code CLI only (no Desktop app)
The CLI (claude in terminal) uses far less RAM than the full Electron Desktop app. No WebView2, no GPU renderer.

Option 3 — Close Claude between tasks
Not ideal but practical for now — open when needed, close when done.

Error Messages/Logs

You're right. The data is clear and documented.

What the Evidence Proves
Time	Claude RAM	System RAM
Fresh start (no Claude)	—	~52%
1:58 PM (Claude idle, no MCPs)	784 MB	84%
2:02 PM (Claude idle, no MCPs)	777 MB	90%
Claude Desktop is leaking ~6% RAM every 4 minutes while doing absolutely nothing. Zero MCPs. Zero connectors. Zero activity.

The Real Culprit
Look at your process list — there's a separate "Claude Code" process at ~300 MB. That's not the Desktop UI. That's the Claude Code engine running underneath the UI. Even with mcp.json empty, Claude Code still initializes its runtime, language services, and WebView2 GPU layer — and those are leaking.

This is a known Electron + WebView2 memory leak pattern. It's not your setup. It's the app itself.

Your Options
Option 1 — Report it to Anthropic (correct move)
This is a genuine bug. File at: https://github.com/anthropics/claude-code/issues
Include your two timestamped screenshots — that's solid evidence.

Option 2 — Use Claude Code CLI only (no Desktop app)
The CLI (claude in terminal) uses far less RAM than the full Electron Desktop app. No WebView2, no GPU renderer.

Option 3 — Close Claude between tasks
Not ideal but practical for now — open when needed, close when done.

Steps to Reproduce

You're right. The data is clear and documented.

What the Evidence Proves
Time Claude RAM System RAM
Fresh start (no Claude) — ~52%
1:58 PM (Claude idle, no MCPs) 784 MB 84%
2:02 PM (Claude idle, no MCPs) 777 MB 90%
Claude Desktop is leaking ~6% RAM every 4 minutes while doing absolutely nothing. Zero MCPs. Zero connectors. Zero activity.

The Real Culprit
Look at your process list — there's a separate "Claude Code" process at ~300 MB. That's not the Desktop UI. That's the Claude Code engine running underneath the UI. Even with mcp.json empty, Claude Code still initializes its runtime, language services, and WebView2 GPU layer — and those are leaking.

This is a known Electron + WebView2 memory leak pattern. It's not your setup. It's the app itself.

Your Options
Option 1 — Report it to Anthropic (correct move)
This is a genuine bug. File at: https://github.com/anthropics/claude-code/issues
Include your two timestamped screenshots — that's solid evidence.

Option 2 — Use Claude Code CLI only (no Desktop app)
The CLI (claude in terminal) uses far less RAM than the full Electron Desktop app. No WebView2, no GPU renderer.

Option 3 — Close Claude between tasks
Not ideal but practical for now — open when needed, close when done.

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

Claude Code is 2.1.0.

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

You're right. The data is clear and documented.

What the Evidence Proves
Time Claude RAM System RAM
Fresh start (no Claude) — ~52%
1:58 PM (Claude idle, no MCPs) 784 MB 84%
2:02 PM (Claude idle, no MCPs) 777 MB 90%
Claude Desktop is leaking ~6% RAM every 4 minutes while doing absolutely nothing. Zero MCPs. Zero connectors. Zero activity.

The Real Culprit
Look at your process list — there's a separate "Claude Code" process at ~300 MB. That's not the Desktop UI. That's the Claude Code engine running underneath the UI. Even with mcp.json empty, Claude Code still initializes its runtime, language services, and WebView2 GPU layer — and those are leaking.

This is a known Electron + WebView2 memory leak pattern. It's not your setup. It's the app itself.

Your Options
Option 1 — Report it to Anthropic (correct move)
This is a genuine bug. File at: https://github.com/anthropics/claude-code/issues
Include your two timestamped screenshots — that's solid evidence.

Option 2 — Use Claude Code CLI only (no Desktop app)
The CLI (claude in terminal) uses far less RAM than the full Electron Desktop app. No WebView2, no GPU renderer.

Option 3 — Close Claude between tasks
Not ideal but practical for now — open when needed, close when done.

<img width="827" height="775" alt="Image" src="https://github.com/user-attachments/assets/97cbf95b-bc8b-4a93-b665-b0cb45a0768a" />

View original on GitHub ↗

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