-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Describe the bug
When launching copilot interactively on Windows, the UI opens briefly, clears/returns to the top of the terminal, and exits without showing any error message.
The root trigger appears to be invalid proxy environment variables. In my case, HTTP_PROXY, HTTPS_PROXY, and ALL_PROXY were set to http://127.0.0.1:9. Instead of displaying a clear network/proxy error, the CLI silently exits.
Affected version
GitHub Copilot CLI 1.0.10
Steps to reproduce the behavior
-
On Windows, set invalid proxy variables in the shell:
$env:HTTP_PROXY='http://127.0.0.1:9'
$env:HTTPS_PROXY='http://127.0.0.1:9'
$env:ALL_PROXY='http://127.0.0.1:9'
$env:NO_PROXY='localhost,127.0.0.1,::1' -
Launch Copilot CLI interactively:
copilot -
Observe that the terminal switches briefly, then returns to the top and exits with no visible error.
-
copilot --help and copilot --version still work:
copilot --version
Output:
GitHub Copilot CLI 1.0.10.
Run 'copilot update' to check for updates. -
Check the Copilot log file. It shows a proxy-related fetch failure:
[INFO] Proxy configuration: HTTP_PROXY=http://127.0.0.1:9, HTTPS_PROXY=http://127.0.0.1:9, NO_PROXY=localhost,127.0.0.1,::1
[ERROR] Error fetching copilot user: TypeError: fetch failed
[ERROR] Unhandled Rejection: fetch failed -
If I clear the proxy variables first, the silent-exit behavior no longer occurs:
Remove-Item Env:HTTP_PROXY,Env:HTTPS_PROXY,Env:ALL_PROXY,Env:NO_PROXY,Env:GIT_HTTP_PROXY,Env:GIT_HTTPS_PROXY,Env:http_proxy,Env:https_proxy,Env:all_proxy,Env:no_proxy -ErrorAction SilentlyContinuecopilot --no-alt-screen
Expected behavior
If Copilot CLI cannot reach GitHub because of invalid proxy settings, it should show a clear and actionable error message in the terminal, such as a proxy/network configuration failure.
It should not silently exit after briefly taking over the terminal screen.
Additional context
Environment:
- Windows
- Installed with winget
- Command resolves to the WinGet link under %LOCALAPPDATA%\Microsoft\WinGet\Links\copilot.exe
Notes:
- help and --version work normally
- The failure happens during startup/auth/user fetch
- This looks like an error-handling issue in interactive mode rather than an installation issue
- A more user-friendly error would make this much easier to diagnose