"Connection error." with CAPIError in the logs
Describe the bug
I use Copilot in enterprise environment. I switched to Node 24.9 so that it respects my proxy settings and I logged in successfully. However, when I enter any prompt, it thinks for a while and then I get the following error:
Model call failed: "Connection error." Execution failed: Connection error.
In the copilot logs I see:
Failed to list models: Forbidden {"name": "CAPIError" }
Can you help me understand whether:
- Does the above mean that Copilot CLI is disabled for my organization
- Or not necessarily, but the proxy blocks connection to copilot CLI api?
- Something else?
Affected version
0.0.328
Steps to reproduce the behavior
- Type 'copilot'
- Enter "How are you today?"
Expected behavior
I'd like to know how to distinguish an error caused by Copilot CLI being disabled in my organisation vs network connection error so that I get a clue how to resolve it.
Additional context
- Operating system - Windows
I've enabled the Copilot CLI policy and it still doesn't work. ~~I'm betting on 2.~~ Not a proxy issue either.
There is an open issue to support proxies: https://github.com/github/copilot-cli/issues/41
However, "Forbidden" makes me suspicious that this is a 4xx error. Flagging this for the team to look at
✅ Tested version 0.0.330 with node 22.11.0 and 24.9.0
✅ Re-ran the CLI on a Mac (no version upgrade) and it also worked Can this be a delay between enabling the Copilot CLI policy and it actually taking effect?
I updated to 0.0.331. I observe now the following:
- When I type
/model, the tool very often crashes withERROR: No supported model available. However it showed me a list of models available a couple of times. But the list of models was different than I see in VS Code, so I'm wondering where it came from? - When I finally managed to select a model which I don't have in VS Code (e.g. gpt-5), I get error
fetch failed - When I changed the model to 'claude-sonnet-4' which I have in VS Code, I get a different error
Connection error.
I'm not sure how to progress. What my company needs to enable in GitHub to make it work exactly? Is it:
- GitHub CLI
- MCP
It all works fine when I use VS Code, Visual Studio or Pycharm. Does Copilot CLI use a different API than these tools?
+1 that 0.0.331 gets ERROR: No supported model available which works in 0.0.330
node version: 22.17.1
how to distinguish an error caused by Copilot CLI being disabled in my organization
Check the setting of Copilot CLI in Copilot page.
I'm using Copilot CLI 0.0.333 (installed by npm i -g @github/[email protected], copilot --version shows 0.0.330) + Node.js 24.9.0 with NODE_USE_ENV_PROXY=1 behind corporate proxy. It login successfully on WSL/Windows. But still can't send message due to this problem. And using proxychains4 on WSL is OK. I think the proxy support problem is not totally solved.
npm i -g @github/[email protected], copilot --version shows 0.0.33
That looks like the npm update might not have worked correctly. Can you try npm i -g @github/copilot again? You should see the latest version (currently 0.0.333)
$ npm i -g @github/copilot
added 22 packages, and changed 11 packages in 5s
23 packages are looking for funding
run `npm fund` for details
$ copilot --version
0.0.330
Commit: a8bfefe
I did this at first, found that the version is still 0.0.330. I had checked npm @github/copilot - Versions that shown 0.0.333 as latest. Then tried @0.0.333 to make sure it's the specific version. And I also tried @0.0.334 failed, but @0.0.334-1 succeeded. But the versions were all 0.0.330. I guess that it's the CLI itself not showing the correct version number.
I can't find the commit hash a8bfefe on Releases or even Commits. I don't know where it comes from.
@ChrisTorng maybe there's some disconnect between npm i and what copilot is linked to. Can you check which copilot?
I shutdown WSL (wsl --shutdown), then get into Ubuntu again. The copilot --version is now 0.0.333 (without reinstall). The error of sending message is now ✗ Execution failed: fetch failed, as issue #115 Copilot CLI shows Error when submit any request: TypeError: fetch failed; Execution failed: fetch failed.
I checked Node.js version again, it's 22.20.0. I don't know why. I'm sure that it was 24.9.0 previously before WSL restart. After install with nvm install --latest-npm again, it's 24.9.0. And copilot is working well now! I don't know why. Maybe sometimes it's using Windows's Node.js? And I did update Windows's Node.js previously (without restart Windows). And Windows version is working too. Thanks for helps.
+1 similar issue on Mac, same error in the logs. Fresh install of 0.0.337 (first time install), connection errors, downgraded to 0.0.330 and it works now. Business account. Maybe interesting, 0.337/broken tried to connect to GH MCP at https://api.individual.githubcopilot.com/mcp/readonly, whereas 0.330/working (correctly, for me) uses https://api.business.githubcopilot.com/mcp/readonly.
@mikewaters are you still experiencing this? Can you share a screenshot on CLI startup? It makes sense that you would be getting an error if you are using a business account but the request is going to api.individual.githubcopilot.com, but the question is why are you getting that URL? Would be interested to know which user the CLI thinks you are acting as.
FWIW @andyfeller and I worked on improving logs for this specific issue. Hopefully landing in a release soon so we can gather more info about the underlying problem.
@sergiou87 downgrade to 0.0.330 fixes the issue, so diff may be helpful. Copilot subscription enabled by the org for personal account.