anthropics / anthropics/claude-code

[BUG] Claude Desktop on macOS grows to 131–140 GB and freezes system; CLI remains under 200 MB

Open
#94,559 1 comment 0 reactions 0 assignees View on GitHub
area:desktop bug has repro perf:memory platform:macos
Dominant language
Python
Stars
145k
Forks
23.1k
PR merge metrics
PR metrics pending

Description

### Preflight Checklist

- [x] I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) 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?

## Summary

Claude Desktop repeatedly grows to approximately 131–140 GB of application memory and completely freezes macOS. The standalone Claude CLI remains stable under the same repository workload.

## Environment

- Hardware: MacBook with 48 GB physical memory
- macOS version: [enter version from Apple menu → About This Mac]
- Claude Desktop: 1.52386.6
- Desktop embedded runtime: 2.1.270
- Standalone Claude CLI after update: 2.1.272
- Repository: large Git/Salesforce repository

## Observed behavior

Image
Image
Image

Claude Desktop has reproduced the failure multiple times:

- 140.46 GB application memory
- 131.51 GB application memory
- 137.09 GB application memory

macOS displays “Your system has run out of application memory,” and the entire computer becomes unresponsive. Force Quit or a forced restart is required.

## Controlled comparison

I ran the same bounded, read-only repository inspection through Terminal:

- `claude --safe-mode`: approximately 177 MB
- Normal `claude`: approximately 187 MB
- Memory pressure remained green
- Swap remained 0 bytes
- No runaway growth occurred

This strongly isolates the problem to Claude Desktop or its embedded local-session runtime rather than plugins, MCP servers, hooks, or the standalone CLI.

## Troubleshooting already performed

- Restarted macOS
- Completely uninstalled and reinstalled Claude Desktop
- Removed Claude Application Support and cache data
- Started a new session instead of resuming an old session
- Limited access to one specific repository rather than the home directory
- Tested standalone CLI in safe mode
- Tested standalone CLI in normal mode

The Desktop memory leak returned after reinstalling.

## Expected behavior

Claude Desktop should maintain bounded memory usage comparable to the standalone CLI and should not freeze the operating system.

## Diagnostics

I have screenshots showing Claude at 131–140 GB. I do not have a Desktop `-diagnostics.json` file because the application freezes the entire machine before one can be captured safely.

I will not upload a `.heapsnapshot` publicly because it may contain conversations and credentials.

Image

### What Should Happen?

Claude Desktop should maintain bounded memory usage and remain responsive without triggering macOS application-memory warnings or freezing the system.

-

### Error Messages/Logs

```shell

```

### Steps to Reproduce

Restart macOS.
Open Claude Desktop 1.52386.6.
Start a new local session restricted to one repository.
Perform ordinary repository inspection and Git operations.
Observe the Claude process grow beyond available physical memory, reaching 131–140 GB.
macOS displays “Your system has run out of application memory,” then becomes unresponsive.

### Claude Model

Not sure / Multiple models

### Is this a regression?

Yes, this worked in a previous version

### Last Working Version

_No response_

### Claude Code Version

2.1.272 (Claude Code).

### Platform

Anthropic API

### Operating System

macOS

### Terminal/Shell

Terminal.app (macOS)

### Additional Information

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

No source file or test is named. Start by reproducing the bounded repository inspection in Claude Desktop on macOS and compare its embedded runtime with the standalone CLI; done means memory remains bounded and the system stays responsive without an application-memory warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, macos
Domain
cli, desktop, operating-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.