anthropics / anthropics/claude-code

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

Abierto
#92,785 1 comentario 2 reacciones 0 asignados Ver en GitHub
invalid
Lenguaje dominante
Python
Estrellas
145k
Forks
23.1k
Métricas de merge de PR
Métricas de PR pendientes

Descripción

### 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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
electron
Área
desktop, performance
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Activo
Claridad
Bastante claro
Aptitud para principiantes
42/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.