[BUG] VS Code extension: ECONNRESET/ECONNREFUSED while bundled binary works when launched directly (2.1.226)

Status Open
Reported on v2.1.226
Maintainer reply None cached
Activity 2 comments · opened Aug 10, 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?

The VS Code extension (2.1.226, Windows 11) cannot connect to the API.
It fails immediately at startup with ECONNREFUSED / ECONNRESET and retries 11 times.

Key finding: the extension's own bundled binary works fine when launched
directly from cmd:
C:\Users\<user>\.vscode\extensions\anthropic.claude-code-2.1.226-win32-x64\resources\native-binary\claude.exe
It authenticates, loads agents, and responds normally.
The same binary fails when launched by the extension.

Log excerpts:
[Bootstrap] fetchBootstrapData failed: Error: connect ECONNREFUSED 160.79.104.10:443
Failed to fetch MCP registry: connect ECONNREFUSED 160.79.104.10:443
[claudeai-mcp] Fetch failed (ECONNRESET) after 3 attempt(s)
API error (attempt 1/11): undefined Connection error.
Connection error details: code=ECONNRESET

Failures occur in 13-30ms, suggesting a local rejection rather than a network timeout.

Ruled out:

  • Network: curl POST to /v1/messages returns a valid JSON error response at the

exact moment the extension fails. Same behaviour on a separate 4G connection.

  • Antivirus (Kaspersky): suspended, no change.
  • Account: CLI is authenticated (Claude Max) and works.
  • Environment: launching VS Code via code . from cmd makes no difference.
  • Project settings: .claude/settings.json contains only env + permissions, no proxy or base URL.

request_id: req_011CdugB8ZNUV8gd5oxv8rxH
x-client-request-id: ea2b9a95-d926-4391-aa6b-7d5f1d09403d

Environment: Windows 11, VS Code extension 2.1.226, Claude Max plan.

What Should Happen?

The Claude Code panel in VS Code should connect to the API and respond to prompts,
exactly as the bundled binary does when launched directly from a terminal.

Error Messages/Logs

[Bootstrap] Fetch failed: ECONNREFUSED
[Bootstrap] fetchBootstrapData failed: Error: connect ECONNREFUSED 160.79.104.10:443
Failed to fetch org fast mode status, standing on disabled (network_error): Error: connect ECONNREFUSED 160.79.104.10:443
Failed to fetch MCP registry: connect ECONNREFUSED 160.79.104.10:443
[Bootstrap] Fetch failed: ECONNRESET
[claudeai-mcp] Transient fetch error (ECONNRESET), retrying in 500ms (attempt 1/3)
[claudeai-mcp] Fetch failed (ECONNRESET) after 3 attempt(s)
[API REQUEST] /v1/messages x-client-request-id=ea2b9a95-d926-4391-aa6b-7d5f1d09403d source=sdk
API error (attempt 1/11): undefined Connection error.
[...retries 2-11, each failing in 13-30ms...]
Error in API request: Connection error.
Connection error details: code=ECONNRESET, message=The socket connection was closed unexpectedly
API connection_error after retries: Connection error.
Failed to flush logs to Datadog: Error: read ECONNRESET

Steps to Reproduce

  1. Install the Claude Code VS Code extension (2.1.226) on Windows 11
  2. Open a workspace folder and open the Claude Code panel
  3. Send any prompt (or simply let the panel start)
  4. The panel fails with "read ECONNRESET" / retries indefinitely

Counter-test that isolates the issue:

  1. From cmd, launch the extension's OWN bundled binary directly:

"C:\Users\<user>\.vscode\extensions\anthropic.claude-code-2.1.226-win32-x64\resources\native-binary\claude.exe"

  1. It authenticates, loads agents and responds normally.

Same binary, same machine, same network, same moment: works when launched
directly, fails when launched by the extension.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.226

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

Ruled out during troubleshooting:

  • Network: curl POST to /v1/messages returns a valid JSON response at the exact

moment the extension fails (request_id: req_011CdugB8ZNUV8gd5oxv8rxH).
Same behaviour on a separate 4G connection.

  • Antivirus (Kaspersky): suspended, no change.
  • Account: CLI is authenticated (Claude Max) and works.
  • Launch environment: starting VS Code with code . from cmd makes no difference.
  • Project settings: .claude/settings.json only contains an env var and permissions,

no proxy, no ANTHROPIC_BASE_URL, no third-party provider.

  • Extension globalStorage: no anthropic.claude-code folder present.

Failures occur in 13-30ms, which suggests a local socket rejection rather than a
network timeout.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗