[BUG][Windows/Desktop] Code hangs ~7.5 min then ECONNREFUSED; bundled claude.exe works standalone

Status Open
Reported on v2.1.286
Maintainer reply None cached
Activity 0 comments · opened Oct 5, 2026

Preflight Checklist

  • [x] I have searched existing issues 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?

Possibly related to #88562, but this case consistently ends in ECONNREFUSED and the exact bundled Claude Code binary works when invoked directly outside the Desktop integration.

On Windows 11, Claude Desktop Code accepts a prompt and then hangs for several minutes before failing with:

API Error: Connection refused — a firewall or proxy may be blocking it (ECONNREFUSED)

A minimal prompt such as:

Reply only with ALIVE.

took roughly 7.5 minutes before failing.

Important isolation:

  • Claude Desktop Chat works normally.
  • Standalone Claude Code CLI works normally.
  • The exact Claude Code binary bundled with Claude Desktop also works when invoked directly from PowerShell.
  • The issue reproduces in a fresh Desktop Code conversation with no repository selected.
  • The issue reproduces across multiple models.
  • A full Claude Desktop reset did not fix it.
  • A complete uninstall, removal of the old MSIX package data, and reinstall did not fix it.

The Desktop log shows the Code session starts successfully, but eventually records:

api_error (success): API Error: Connection refused — a firewall or proxy may be blocking it (ECONNREFUSED)

One failed cycle recorded:

init=10641ms
first_assistant=436366ms
total_to_assistant=448529ms

Windows/security/network checks already performed:

  • No relevant Windows Application log events during the failure.
  • No relevant AppLocker EXE/DLL events.
  • No relevant Code Integrity events.
  • McAfee Advanced Firewall reports 0 blocked connections and 0 apps with blocked connections.
  • No HTTP_PROXY, HTTPS_PROXY, ALL_PROXY, or NO_PROXY environment variables.
  • No user proxy variables configured.
  • netsh winhttp show proxy reports Direct access (no proxy server).

Environment:

  • Windows 11
  • Claude Desktop MSIX: Claude_2.19675.0.0_x64__pzs8sxrjxfjjc
  • Desktop-bundled Claude Code: 2.1.286
  • Standalone Claude Code: 2.1.289

Because the exact bundled claude.exe works when executed directly, while the Desktop Code session fails, this appears specific to the Desktop-to-Code integration/launch path rather than the Claude Code binary itself.

What Should Happen?

Claude Desktop Code should process and return responses normally, just as the standalone Claude Code CLI and the exact bundled Claude Code executable do when run directly.

A minimal prompt such as “Reply only with ALIVE.” should return within seconds rather than hanging for several minutes and terminating with ECONNREFUSED.

Error Messages/Logs

API Error: Connection refused — a firewall or proxy may be blocking it (ECONNREFUSED)

Desktop log:

[CCD start-timing] init=10641ms first_assistant=436366ms total_to_assistant=448529ms

[CCD CycleHealth] api_error (success): API Error: Connection refused — a firewall or proxy may be blocking it (ECONNREFUSED)

Steps to Reproduce

  1. Install/open the current Claude Desktop app on Windows 11.
  2. Sign in and confirm the normal Chat tab works.
  3. Switch to the Code tab.
  4. Start a new Code conversation with no project folder selected.
  5. Send a minimal prompt such as:

Reply only with ALIVE.

  1. Observe that the request remains pending for several minutes.
  2. After roughly 7.5 minutes, the request fails with:

API Error: Connection refused — a firewall or proxy may be blocking it (ECONNREFUSED)

  1. Open PowerShell and run the exact Claude Code binary bundled with Desktop directly using:

& "$env:LOCALAPPDATA\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\claude-code\2.1.286\635c1867224a\claude.exe" -p "Reply only with ALIVE."

  1. Observe that the bundled binary responds normally with:

ALIVE

The same issue also reproduces in Desktop Code with project folders and across multiple models.

Claude Model

_No response_

Is this a regression?

Yes, this worked in a previous version

Last Working Version

Unknown

Claude Code Version

2.1.289 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

Additional version/context details:

  • Standalone claude --version reports 2.1.289.
  • Claude Desktop currently bundles Claude Code 2.1.286.
  • The bundled executable path used by Desktop is under the Claude MSIX package container.
  • Invoking that bundled 2.1.286 binary directly from PowerShell succeeds immediately, while launching Code through Claude Desktop hangs and eventually returns ECONNREFUSED.

I also contacted Claude support and followed their suggested Windows-side checks. No AppLocker, Code Integrity, firewall, proxy, or endpoint-security evidence was found.

Related issue:
#88562 appears similar, but that report describes an indefinite "Sending..." hang. In this case, the Desktop Code request eventually terminates with a reproducible ECONNREFUSED after several minutes.

View original on GitHub ↗