anthropics / anthropics/claude-code

[BUG] Desktop app (Windows): Electron main process pins a full CPU core during agent work — whole app freezes; reproduces across 1.32885 and 1.49585

オープン
#93,121 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
area:desktop bug has repro performance platform:windows
主要言語
Python
スター
145k
フォーク
23.1k
PR マージ指標
PR 指標を取得中

説明

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

## Environment

- **App**: Claude desktop app 1.49585.0.0 (MSIX, `Claude_pzs8sxrjxfjjc`); also reproduced on 1.32885.1.0
- **Bundled Claude Code runtime**: 2.1.260 (previously reproduced on 2.1.234)
- **OS**: Windows 11 Pro 25H2, build 10.0.26200, September 2026 cumulative installed
- **Hardware**: desktop, 20 logical cores, Intel UHD 770 (driver 32.0.101.7088)

## Symptoms

Intermittent freezes of the entire app — input, scrolling, all UI — correlated
with agent activity (file generation, code execution, streamed tool output).
Typing lag between freezes. Ongoing since ~mid-August 2026 across app updates.

## Measurements

Per-process CPU deltas sampled over 6 s during freeze episodes
(`TotalProcessorTime`; process types from `--type=` flags):

**App 1.49585 / runtime 2.1.260 (2026-09-09), 3 session tabs open:**

| Process | Mem (MB) | CPU-sec in 6 s |
|-----------------------------|----------|----------------|
| **Electron main** (no --type) | 520 | **6.31** |
| other app processes (each) | 122–461 | ≤ 0.55 |
| session children (each) | ~280–296 | ≤ 0.11 |

**App 1.32885 / runtime 2.1.234 (2026-09-05), 4 session tabs open:**

| Process | Mem (MB) | CPU-sec in 6 s |
|-------------------|----------|----------------|
| **Electron main** | 378 | **4.61** |
| renderer | 447 | 0.27 |
| gpu-process | 226 | 0.17 |
| session children | 420–489 | ≤ 0.06 |

The main process saturates ≥1 core while renderer and GPU are essentially
idle; since window input and IPC route through the Electron main process,
this explains the whole-app freeze. Each open session tab runs a
`claude.exe --output-format stream-json --verbose ...` child whose streamed
output (including full tool results) the main process ingests single-threaded;
freezes coincide with bursts of this traffic.

## Ruled out on this machine (tested individually)

- Norton 360: fully uninstalled (was injecting aswhook.dll; removal did not fix)
- Gigabyte kernel drivers (gdrv3/uiomap): unloaded and disabled — no change
- Grammarly / screen-recorder hooks: exited — no change
- GPU driver: updated Oct-2024 → Jun-2026 build — no change
- Windows: Aug + Sep 2026 cumulatives — no change
- GPU/disk/network load during freezes: all near idle (5% GPU, 0.2 MB/s disk)
- A concurrent Adobe Acrobat freeze issue on the same machine was separately
traced to an Adobe-acknowledged Acrobat 26.x bug — unrelated

**Clear Cache and Restart** gives temporary relief; lag/freezes return with use.

## Suggested direction

Move stream-json ingestion/persistence for session children off the Electron
main thread, or batch/throttle it. Severity scales with number of open session
tabs and with session length.

## Possibly related
#55149, #42045, #31643

### What Should Happen?

No freeze should happen

### Error Messages/Logs

```shell

```

### Steps to Reproduce

1. On Windows 11, open the Claude desktop app with 3–4 session tabs (each tab spawns a `claude.exe --output-format stream-json` child process).
2. In one session, ask Claude to do output-heavy agent work — e.g. generate a PowerPoint/large file, or run code producing large tool results.
3. While output streams, interact with the app: type in the input box, scroll the conversation.
4. Observe: typing lags by seconds, then the entire app window becomes unresponsive (all tabs — input, scrolling, buttons).
5. In Task Manager, observe the Claude process group at ~5% CPU on a 20-core machine (= one core pinned) with "Very high" power usage. Per-process sampling shows the Electron main process (Claude.exe, no `--type=` flag) consuming a full core while renderer, GPU, and session-child processes stay near idle.

Frequency: intermittent but reliably triggered by heavy streamed output; worsens with session length and number of open tabs. Temporarily relieved by Help → Troubleshooting → Clear Cache and Restart; returns with use.

### 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.260 (bundled in Claude desktop app 1.49585.0.0, Windows MSIX). Also reproduced on 2.1.234 / app 1.32885.1.0.

### Platform

Anthropic API

### Operating System

Windows

### Terminal/Shell

Other

### Additional Information

_No response_

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

No source files or tests are named. Start by reproducing the Windows freeze with three to four session tabs and output-heavy agent work, then inspect the Electron main process's ingestion of streamed `claude.exe --output-format stream-json` output. Done means heavy streamed output no longer makes the app's input, scrolling, or other UI unresponsive.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
electron
領域
desktop, performance
issue の種類
バグ
難易度
5/5
見積もり時間
1週間以上
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。