[BUG] Claude Code VSCode extension: ConnectionRefused behind corporate PAC proxy (Windows)
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
- Windows machine on a corporate network with proxy configured via PAC file (AutoConfigURL in registry, ProxyEnable: 0)
- Install Claude Code VSCode extension
- Set API key
- 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
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗