You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
VS Code Copilot sandbox on Windows: PowerShell 5.1 cannot reach Stripe API despite outbound network being allowed #349282
Does this issue occur when all extensions are disabled?: Yes/No
VS Code Version:
OS Version:
Steps to Reproduce:
Hai ragione: ti ho preparato io il testo in italiano. Scusa. Non è un errore, ma in inglese è più facile che il team VS Code lo esamini. Puoi sostituire il testo con questo:
Hello,
I’m using GitHub Copilot in VS Code on a second Windows PC. I need to make a read-only request to the Stripe API while keeping the terminal sandbox enabled, but the request fails with WebException and socket error AccessDenied.
The session’s /sandbox policy report shows:
Outbound: allowed
Local network: allowed
No domain lists, proxy details, or managed-policy information are displayed.
Environment and checks:
Windows version 24H2, build 26100.9711
Windows PowerShell 5.1.26100.9711; PowerShell 7 is not installed
Stripe CLI 1.40.9 and Git 2.53.0.windows.3 are available
git pull from GitHub succeeded in the same session
HTTP_PROXY and HTTPS_PROXY are set to a local endpoint; I have not shared their values
The default .NET proxy reports that it is bypassed for api.stripe.com
A harmless, credential-free request to the local listener returned HTTP 400. This only confirms that a listener responded; it does not identify it as the sandbox’s authorized proxy.
Stripe and other services worked on my first PC. I cannot tell whether the difference on this PC comes from its local configuration, the client used, or sandbox settings. I have no evidence that the policy changed.
Could you advise:
How can I verify that the proxy provided to this session is the sandbox’s authorized proxy?
How should PowerShell 5.1 or .NET use it without disabling the sandbox or changing the system-wide proxy?
How can I check for domain restrictions or managed settings not shown in /sandbox policy?
Which diagnostics would help, and how can I collect them without exposing credentials or project data?
My immediate goal is only to read the Stripe Test account. I do not want to create payments or disable the sandbox. Thank you.
This looks like a PowerShell 5.1 proxy problem, not a sandbox policy problem.
The sandbox routes network traffic through a local proxy and points programs at it with the HTTP_PROXY and HTTPS_PROXY environment variables. PowerShell 5.1 ignores those variables. It uses the Windows system proxy instead, and on your PC that proxy bypasses api.stripe.com. So the request goes out directly, the sandbox blocks it, and you get AccessDenied. Git works in the same session because git reads the environment variables.
To confirm:
Run the same request with curl.exe in that terminal. If it succeeds, the sandbox allows the traffic and only PowerShell 5.1 is affected.
Run netsh winhttp show proxy and check Settings, Network and Internet, Proxy. A system proxy or bypass list there would explain why this PC behaves differently from your first one. /sandbox policy does not show Windows proxy settings.
Check the http.proxy and http.noProxy settings in VS Code too, since they can change which proxy is applied.
Workarounds that keep the sandbox on:
Pass the proxy to the command: Invoke-RestMethod -Proxy $env:HTTPS_PROXY ...
Or use PowerShell 7 (pwsh), which reads those environment variables.
One thing you did not mention: how did you make the request? Invoke-RestMethod, curl, or the Stripe CLI? The fix depends on the client.
Activity
rossdonald commentedon Nov 19, 2026
This looks like a PowerShell 5.1 proxy problem, not a sandbox policy problem.
The sandbox routes network traffic through a local proxy and points programs at it with the HTTP_PROXY and HTTPS_PROXY environment variables. PowerShell 5.1 ignores those variables. It uses the Windows system proxy instead, and on your PC that proxy bypasses api.stripe.com. So the request goes out directly, the sandbox blocks it, and you get AccessDenied. Git works in the same session because git reads the environment variables.
To confirm:
netsh winhttp show proxyand check Settings, Network and Internet, Proxy. A system proxy or bypass list there would explain why this PC behaves differently from your first one. /sandbox policy does not show Windows proxy settings.Workarounds that keep the sandbox on:
Invoke-RestMethod -Proxy $env:HTTPS_PROXY ...One thing you did not mention: how did you make the request? Invoke-RestMethod, curl, or the Stripe CLI? The fix depends on the client.