[BUG] Claude Code VSCode extension: ConnectionRefused behind corporate PAC proxy (Windows)

Resolved 💬 2 comments Opened Mar 24, 2026 by GodJohnson Closed Apr 21, 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?

Claude Code VSCode extension fails to connect to the API on Windows behind a corporate proxy
configured via PAC file (AutoConfigURL). Node.js fetch() does not support PAC file
auto-configuration, so the extension cannot resolve the correct proxy and fails immediately.

Other VSCode extensions (GitHub Copilot, Cline) work correctly in the same environment
because they rely on VSCode/Chromium's built-in proxy handling, which supports PAC files natively.

What Should Happen?

Claude Code should respect the system proxy configuration (PAC file) like other VSCode extensions do.

Error Messages/Logs

API Error: Unable to connect to API (ConnectionRefused)

Steps to Reproduce

  1. Windows machine on a corporate network with proxy configured via PAC file (AutoConfigURL in registry, ProxyEnable: 0)
  2. Install Claude Code VSCode extension
  3. Set API key
  4. Attempt any request

→ Try connecting for a while then issues the error. No fallback, no PAC resolution attempted.

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.81

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

  • Registry: ProxyEnable = 0, AutoConfigURL = http://[pac-server]/proxy.pac
  • GitHub Copilot works in the same VSCode instance on the same machine on the same network
  • This is a follow-up to #4560 (automatically closed after 60 days of inactivity without resolution — root cause was identified there)
  • Workaround via px-proxy or CNTLM is not acceptable in a managed corporate environment

View original on GitHub ↗

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