anthropics / anthropics/claude-code

[BUG] Claude Desktop for Mac freezes every 7-10 minutes (EventEmitter listener leak)

Open
#92,785 1 comment 2 reactions 0 assignees View on GitHub
invalid
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?

Claude Desktop for Mac freezes (UI becomes unresponsive) repeatedly, roughly every 7-10 minutes, isolated to the Claude app only. See the attached log excerpt showing a recurring EventEmitter memory leak warning that matches the freeze timing.

[claude_desktop_bug_report.md](https://github.com/user-attachments/files/31939521/claude_desktop_bug_report.md)

### What Should Happen?

Claude Desktop should remain responsive during normal use. The EventEmitter listeners for claude.settings.AppPreferences.preferencesChanged and claude.web.LocalSessions.onEvent should be cleaned up properly instead of accumulating over time.

### Error Messages/Logs

```shell
2026-09-08 14:04:28 [warn] MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 $eipc_message$_ae5dcfbf-2200-4412-99ed-93631947ebe0_$_claude.settings_$_AppPreferences_$_preferencesChanged listeners added. Use emitter.setMaxListeners() to increase limit
2026-09-08 14:04:32 [warn] MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 $eipc_message$_ae5dcfbf-2200-4412-99ed-93631947ebe0_$_claude.web_$_LocalSessions_$_onEvent listeners added. Use emitter.setMaxListeners() to increase limit
2026-09-08 14:11:45 [warn] MaxListenersExceededWarning: (same, preferencesChanged)
2026-09-08 14:11:45 [warn] MaxListenersExceededWarning: (same, LocalSessions_onEvent)
2026-09-08 14:18:18 [warn] MaxListenersExceededWarning: (same, preferencesChanged)
2026-09-08 14:18:19 [warn] MaxListenersExceededWarning: (same, LocalSessions_onEvent)
```

### Steps to Reproduce

1. Open Claude Desktop and use it normally for an extended session (30+ minutes), including the Code tab.
2. No specific trigger is required — the freeze occurs periodically during normal use.
3. Roughly every 7-10 minutes, the Claude window becomes unresponsive and requires a restart to recover. Other applications are unaffected.
4. Check ~/Library/Logs/Claude/claude.ai-web.log around the freeze time — a MaxListenersExceededWarning appears at matching timestamps (see Error Messages/Logs above).

### Claude Model

Sonnet (default)

### Is this a regression?

I don't know

### Last Working Version

_No response_

### Claude Code Version

Claude Desktop 1.46388.4 (embedded Code tab session; not a standalone CLI install, so `claude --version` is not applicable here)

### Platform

Anthropic API

### Operating System

macOS

### Terminal/Shell

Terminal.app (macOS)

### Additional Information

Possibly related to #80056 and #84693 (both Claude Desktop memory/Electron process growth issues on macOS), though the symptom pattern here is different: acute, repeated freezes every ~7-10 minutes isolated to the Claude window only, rather than gradual system-wide memory pressure over ~24 hours.

Contributor guide

No contributing guide indexed for this repository

Research direction

Review the attached claude_desktop_bug_report.md and reproduce an extended session using the embedded Code tab. Correlate ~/Library/Logs/Claude/claude.ai-web.log with the reported 7-10 minute freezes, then verify that the preferencesChanged and LocalSessions_onEvent listeners no longer accumulate and the Claude window remains responsive.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron
Domain
desktop, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.