claude-code - 💡(How to fix) Fix Desktop app freezes during large builds — token stream stalls while timer continues

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Claude Code in the desktop app (not terminal CLI) consistently freezes during large builds. The token stream stalls completely — the token counter stops incrementing — but the session timer continues running indefinitely. The UI becomes unresponsive to the build task, with no error message, no timeout, and no recovery.

This is not an intermittent/random issue. It reproduces reliably when large multi-file builds are initiated in the desktop app. The only workaround is to clear the conversation, which destroys all session context.

Error Message

[REACT_QUERY_CLIENT] QueryClient error: {"type":"authentication_error","statusCode":401,...,"message":"You must authenticate with GitHub."}

Root Cause

Claude Code in the desktop app (not terminal CLI) consistently freezes during large builds. The token stream stalls completely — the token counter stops incrementing — but the session timer continues running indefinitely. The UI becomes unresponsive to the build task, with no error message, no timeout, and no recovery.

This is not an intermittent/random issue. It reproduces reliably when large multi-file builds are initiated in the desktop app. The only workaround is to clear the conversation, which destroys all session context.

Fix Action

Fix / Workaround

This is not an intermittent/random issue. It reproduces reliably when large multi-file builds are initiated in the desktop app. The only workaround is to clear the conversation, which destroys all session context.

Code Example

[REACT_QUERY_CLIENT] QueryClient error: {"type":"authentication_error","statusCode":401,...,"message":"You must authenticate with GitHub."}

---

[REACT_QUERY_CLIENT] QueryClient error: {"type":"not_found_error","statusCode":404,...,"endpoint":"/api/organizations/.../model_configs/claude-opus-4-7[1m]"}
RAW_BUFFERClick to expand / collapse

Description

Claude Code in the desktop app (not terminal CLI) consistently freezes during large builds. The token stream stalls completely — the token counter stops incrementing — but the session timer continues running indefinitely. The UI becomes unresponsive to the build task, with no error message, no timeout, and no recovery.

This is not an intermittent/random issue. It reproduces reliably when large multi-file builds are initiated in the desktop app. The only workaround is to clear the conversation, which destroys all session context.

Steps to Reproduce

  1. Open Claude Code in the Claude Desktop app
  2. Start a large build task (multi-file generation, significant codebase modifications)
  3. Observe the token counter and timer in the bottom status bar
  4. After some initial progress, the token count freezes (e.g., at 438 tokens)
  5. The timer continues running (observed from 6m05s to 12m49s with zero additional tokens)
  6. The build never completes — the session is effectively dead

Expected Behavior

The token stream should continue flowing, or if a timeout/error occurs, the app should surface it and allow the user to retry without losing session context.

Actual Behavior

  • Token count freezes mid-stream (screenshots show it stuck at 438 tokens)
  • Timer keeps incrementing (6m → 12m+)
  • No error message displayed
  • No automatic retry or recovery
  • Only option is to clear the conversation, losing all context

Screenshots

Screenshot 1 — 6m05s into the build, frozen at 438 tokens: The orange spark icon indicates the model is supposedly still processing, but no tokens are arriving.

Screenshot 2 — 12m49s, still frozen at 438 tokens: The indicator has changed to a red/orange dot. Nearly 7 additional minutes elapsed with zero token progress.

(Note: Screenshots are from the desktop app status bar. Happy to provide additional screenshots or screen recordings if needed.)

Environment

DetailValue
Claude Desktop App Version1.3109.0
Claude Code CLI Version2.1.104
OSmacOS 15.7.3 (Build 24G419)
Architecturearm64 (Apple Silicon)
CPUApple M4 Pro, 14 cores
RAM24 GB
Disk637 GB free of 926 GB

Relevant Log Findings

From ~/Library/Logs/Claude/:

  1. 27 MCP servers connected at session focus time — this is a significant number of concurrent server connections that may contribute to resource pressure:

    • Includes: Bigdata.com, Gmail, Chrome, registry, sequential-thinking, unityMCP, browsermcp, scheduled-tasks, plus 14 plugin servers (finance, design)
  2. Recurring authentication errors (every 2-5 minutes throughout the session):

    [REACT_QUERY_CLIENT] QueryClient error: {"type":"authentication_error","statusCode":401,...,"message":"You must authenticate with GitHub."}

    These 401 errors fire on a polling loop even when GitHub integration isn't actively being used, suggesting unnecessary background request overhead.

  3. Model config 404s:

    [REACT_QUERY_CLIENT] QueryClient error: {"type":"not_found_error","statusCode":404,...,"endpoint":"/api/organizations/.../model_configs/claude-opus-4-7[1m]"}
  4. System memory pressure (from system-info.txt at time of capture):

    • Free Memory: 0.07 GB
    • Memory Usage: 99.7%
    • Process Memory (Private): 252.56 MB
  5. No explicit error, crash, or timeout logged when the freeze occurs — the main.log shows normal session activity then silence. No hang detection, no watchdog timeout, no recovery attempt.

Impact

  • Context loss is the critical issue. When the freeze occurs mid-build, the user must clear the conversation to recover. On large projects, the session context (architecture decisions, file state, build plan) cannot be reconstructed.
  • This makes the desktop app unreliable for its primary use case — extended coding sessions with large builds.
  • The terminal CLI version does not exhibit this behavior on the same machine with the same tasks.

Possible Contributing Factors

  • 27 concurrent MCP server connections creating resource/memory pressure
  • Recurring 401 GitHub polling errors adding unnecessary network overhead
  • High system memory utilization (99.7%) potentially triggering OS-level throttling
  • No timeout/retry mechanism for stalled token streams in the desktop app
  • Electron renderer may be blocking on the main thread during heavy operations

Suggested Improvements

  1. Implement a stall detector — if no tokens arrive for N seconds, surface an error and offer retry
  2. Don't require conversation clear to recover — allow resending the last message or reconnecting the stream
  3. Reduce background polling overhead — the GitHub 401 errors fire every few minutes even when unused
  4. Add memory pressure monitoring — warn when system memory is critically low rather than silently degrading

extent analysis

TL;DR

Implementing a stall detector to surface an error and offer retry when the token stream freezes is the most likely fix to address the issue of Claude Code freezing during large builds in the desktop app.

Guidance

  • Investigate the impact of 27 concurrent MCP server connections on system resources and consider optimizing or limiting these connections to reduce memory pressure.
  • Address the recurring 401 GitHub polling errors to minimize unnecessary network overhead, potentially by implementing a more efficient authentication mechanism or reducing the polling frequency.
  • Monitor system memory utilization and consider adding warnings or throttling mechanisms to prevent the app from freezing due to high memory usage.
  • Consider implementing a retry mechanism that allows resending the last message or reconnecting the stream without requiring conversation clearance, to mitigate context loss.

Example

No specific code example can be provided without more details on the implementation, but a stall detector could be implemented using a timer that checks for token stream activity and triggers an error if no tokens are received within a certain timeframe.

Notes

The provided information suggests that the issue is specific to the desktop app and does not occur in the terminal CLI version, indicating a potential problem with the Electron renderer or the app's handling of large builds. Further investigation into the app's architecture and resource management is necessary to fully resolve the issue.

Recommendation

Apply a workaround by implementing a stall detector and retry mechanism to address the immediate issue, as upgrading to a fixed version is not mentioned as an option in the provided information. This will help mitigate the context loss and allow users to recover from freezes without losing their work.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Desktop app freezes during large builds — token stream stalls while timer continues