anthropics / anthropics/claude-code

[BUG] [BUG] Auto-updater blocks main process event loop — Claude Desktop becomes unresponsive on Windows

Ouverte
#88,072 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
bug
Langage dominant
Python
Étoiles
145k
Forks
23.1k
Métriques de merge des PR
Métriques de PR en attente

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?

While Claude Desktop was actively in use, a background auto-update (app updated to release "Claude 1.32885.1"; embedded Claude Code CLI component swapped 2.1.229 → 2.1.234) triggered a burst of main-process event-loop stalls, the worst being 5516ms. Windows then marked the app "Not Responding". Ending it via Task Manager did not reliably work, and restarting Claude was difficult — even after a full PC restart. This has now happened repeatedly (5 times).

### What Should Happen?

Background updates should not block the Electron main process / UI thread. The app should remain responsive during and after an update, and should not leave the process in an unrecoverable "Not Responding" state.

### Error Messages/Logs

```shell
[info] [updater] Update downloaded and ready to install { releaseName: 'Claude 1.32885.1' }
[warn] [event-loop-stall] main process blocked for 4284ms (task none, total 1, cumulative 4284ms, rss 331MB)
[warn] [event-loop-stall] main process blocked for 1672ms (task none, total 2, cumulative 5956ms, rss 329MB)
[info] [CCD] Installed at ...\claude-code\2.1.234\claude.exe
[warn] [CCD] Could not remove old version 2.1.229 (in use?): [Error: EPERM: operation not permitted, unlink '...\claude-code\2.1.229\claude.exe']
[warn] [event-loop-stall] main process blocked for 720ms (task none, total 1, cumulative 720ms, rss 328MB)
[warn] [event-loop-stall] main process blocked for 5516ms [likely sleep: duration_heuristic] (task none, total 1, cumulative 720ms, rss 331MB)
```

### Steps to Reproduce

1. Use Claude Desktop normally with an active session (in our case: a Browser Preview session was warm).
2. Let a background app update download and begin installing while the app stays open/in use.
3. Observe main-process event-loop stalls in %APPDATA%\Claude\logs\main.log around the update timestamp.
4. If a stall exceeds ~5s, Windows marks the app "Not Responding"; recovery is unreliable via Task Manager.
Note: not manually/deterministically reproducible on demand — depends on an update landing while the app is in active use. Reproduced 5 times over the past week per user report.

### Claude Model

None

### Is this a regression?

Yes, this worked in a previous version

### Last Working Version

_No response_

### Claude Code Version

2.1.198 (Claude Code) — standalone CLI per `claude --version`. Note: embedded CCD component inside Claude Desktop shows 2.1.229→2.1.234 in logs, suggesting two separate installs.

### Platform

Anthropic API

### Operating System

macOS

### Terminal/Shell

Terminal.app (macOS)

### Additional Information

This affects Claude Desktop (Electron shell), not just the CLI. No Crashpad report was generated for these hangs (Crashpad/reports empty) — consistent with a main-thread hang rather than a crash. System RAM was never under pressure (stable ~1.3-2.1GB / 98GB free). Orphaned version folder "2.1.229" still present on disk next to "2.1.234" due to the failed EPERM cleanup.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Start by examining the Electron desktop auto-updater and the embedded Claude Code component installation path; the report does not name source files or tests. Review the main-process event-loop stall logs alongside update installation and old-version cleanup on Windows. Done means updates no longer make the app unresponsive; the issue gives no deterministic reproduction steps or test target.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
electron
Domaine
desktop, performance
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
Active
Clarté
Plutôt claire
Accessibilité débutants
43/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.