Refs: #324209
Complexity: 4
Create Issue
Test: Agent Host respects HTTP proxy configuration
Verify that chat requests made from the Agent Host process honor the configured HTTP proxy, both when the proxy is set explicitly via the http.proxy setting and when it is resolved from the OS (PAC URL).
Two windows: the test proxy runs inside a dev container in one VS Code window (the "proxy window"). The actual testing happens in a separate VS Code window/install (the "test window") — it is easier to use two different installs (e.g. run the dev container in VS Code Stable and test in VS Code Insiders). Steps below that mention Settings, restarting, and making chat requests apply to the test window.
Setup
- In the proxy window, start the test proxy from the
vscode-proxy-agent repo:
- Clone
https://github.com/microsoft/vscode-proxy-agent.
- Important: switch to branch
chrmarti/quarrelsome-gibbon.
Dev Containers: Reopen in Container > HTTP Proxy Test.
- This starts 3 log terminals in the dev container: 1 for the PAC config and 2 for the two proxies. (See
.devcontainer/http-proxy-test/README.md for details.)
- Keep the proxy log terminals visible so you can observe requests as they arrive.
- In the test window, ensure the Agent Host is enabled: set
chat.agentHost.enabled to true in Settings.
Test 1: Explicit http.proxy setting
- Set
http.proxy in Settings to the test proxy, e.g. http://127.0.0.1:3155.
- Restart VS Code (current limitation: the Agent Host does not pick up proxy changes without a restart).
- Make a chat request that runs in the Agent Host's Copilot.
- Verify in the proxy log terminal that the chat request(s) go through the proxy.
Test 2: PAC URL configured in the OS
- Remove the
http.proxy setting.
- Configure the PAC URL at the OS level, pointing at the test PAC, e.g.
http://127.0.0.1:4444:
- macOS: System Settings → Network → (active interface) → Details… → Proxies → enable "Automatic proxy configuration" and set the URL.
- Windows: Settings → Network & Internet → Proxy → "Use setup script" → turn on and set the "Script address".
- Linux (GNOME): Settings → Network → Network Proxy → set Method to "Automatic" and set the "Configuration URL".
- Restart VS Code (current limitation, as above).
- Make a chat request that runs in the Agent Host's Copilot.
- Verify in the proxy log terminal that the chat request(s) go through the proxy resolved from the PAC file.
Cleanup
- Remove the
http.proxy setting if it is still set.
- Remove the OS-level PAC URL / automatic proxy configuration.
- Restart VS Code so it no longer routes traffic through the test proxy.
Refs: #324209
Complexity: 4
Create Issue
Test: Agent Host respects HTTP proxy configuration
Verify that chat requests made from the Agent Host process honor the configured HTTP proxy, both when the proxy is set explicitly via the
http.proxysetting and when it is resolved from the OS (PAC URL).Setup
vscode-proxy-agentrepo:https://github.com/microsoft/vscode-proxy-agent.chrmarti/quarrelsome-gibbon.Dev Containers: Reopen in Container>HTTP Proxy Test..devcontainer/http-proxy-test/README.mdfor details.)chat.agentHost.enabledtotruein Settings.Test 1: Explicit
http.proxysettinghttp.proxyin Settings to the test proxy, e.g.http://127.0.0.1:3155.Test 2: PAC URL configured in the OS
http.proxysetting.http://127.0.0.1:4444:Cleanup
http.proxysetting if it is still set.