copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

Execution failed: CAPIError: Connection error

Open oasaleh opened this issue 11 months ago • 16 comments

Describe the bug

I'm getting these errors on both: WSL and Windows 11.

username@myname-CP:/mnt/c$ copilot --allow-all-tools
 Welcome to GitHub Copilot CLI
 Version 0.0.374 · Commit 9fecd24

 Copilot can write, test and debug code right from your terminal. Describe a task to get started or enter ? for help. Copilot uses AI, check for mistakes.

 ● Logged in as user: ghalias

 ● Configured MCP servers: microsoft-learn, context7

 ● Connected to GitHub MCP Server

 > Who are you?

 ✗ Model call failed: "Connection error."

 ✗ Execution failed: CAPIError: Connection error.

Affected version

0.0.374

Steps to reproduce the behavior

Just run copilot and send any prompt.

Expected behavior

No response

Additional context

No response

oasaleh avatar Jan 03 '26 00:01 oasaleh

I have the same issue on Ubuntu installed trough npm

SilvianAchim avatar Jan 03 '26 15:01 SilvianAchim

Same here on nixos

thein3rovert avatar Jan 03 '26 20:01 thein3rovert

Same issue on Windows. Here are some sample logs:

{"type":"session.error","data":{"errorType":"model_call","message":"Model call failed: \"Connection error.\"","stack":"Error: \"Connection error.\"\n    at XY.runAgenticLoop (file:///D:/Users/<redacted>/.copilot/pkg/universal/0.0.374/index.js:2068:20791)\n    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n    at async XY.send (file:///D:/Users/<redacted>/.copilot/pkg/universal/0.0.374/index.js:2068:3589)\n    at async file:///D:/Users/<redacted>/.copilot/pkg/universal/0.0.374/index.js:3231:818"},"id":"0be34e3f-9b09-46e4-9bbb-882b0593bd77","timestamp":"2026-01-04T00:30:48.080Z","parentId":"ec61b8a7-ca9c-44dd-a4e7-5fdcf52817db"}
{"type":"session.error","data":{"errorType":"query","message":"Execution failed: CAPIError: Connection error.","stack":"CAPIError: Connection error.\n    at t.fromAPIError (file:///D:/Users/<redacted>/.copilot/pkg/universal/0.0.374/index.js:1549:905)\n    at WUe.getCompletionWithTools (file:///D:/Users/<redacted>/.copilot/pkg/universal/0.0.374/index.js:1549:9392)\n    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n    at async Q2e.getCompletionWithTools (file:///D:/Users/<redacted>/.copilot/pkg/universal/0.0.374/index.js:1554:2239)\n    at async XY.runAgenticLoop (file:///D:/Users/<redacted>/.copilot/pkg/universal/0.0.374/index.js:2068:19586)\n    at async XY.send (file:///D:/Users/<redacted>/.copilot/pkg/universal/0.0.374/index.js:2068:3589)\n    at async file:///D:/Users/<redacted>/.copilot/pkg/universal/0.0.374/index.js:3231:818"},"id":"dadf4476-554e-4a6c-9d65-94ecd05ed18a","timestamp":"2026-01-04T00:31:03.593Z","parentId":"4e7b8999-79e3-4da9-a05e-cb61f551b46f"}

Tonychen0227 avatar Jan 04 '26 07:01 Tonychen0227

Facing the same error on mint. Tried installing an older version like 0.0.370 like mentioned in this issue #256 but faced the same error.

miniMaddy avatar Jan 04 '26 19:01 miniMaddy

Non-interactive mode works, interactive mode is broken.

% copilot -s -p "What are you called?"
I'm the **GitHub Copilot CLI** — a terminal assistant built by GitHub to help with software engineering tasks.

% copilot -i "What are you called?"
 Welcome to GitHub Copilot CLI
 Version 0.0.374 · Commit 9fecd24

 Copilot can write, test and debug code right from your terminal. Describe a task to get started or enter ? for help. Copilot uses AI, check for mistakes.

 ● Logged in as user: classicsc

 ● Configured MCP servers: sosumi, Chrome, XcodeBuildMCP

 > What are you called?

 ● Connected to GitHub MCP Server

 ✗ Model call failed: "Connection error."

 ✗ Execution failed: CAPIError: Connection error.

classicsc avatar Jan 04 '26 21:01 classicsc

Downgrading to 0.0.372 works for me

@miniMaddy Make sure $HOME/.copilot/pkg subdirectories don't have 0.0.374

I renamed pkg directory, installed copilot with: curl -fsSL https://gh.io/copilot-install | VERSION="v0.0.372" PREFIX="$HOME/copilot372" bash

$HOME/copilot372/bin/copilot --version

0.0.372
Commit: 5534560

after starting a session it does still download 0.0.374, so just watch out for it when starting new sessions after

KhYossi avatar Jan 05 '26 02:01 KhYossi

save issue :(

mashanhu2020 avatar Jan 05 '26 08:01 mashanhu2020

Same issue here. Version 0.0.374 · Commit 9fecd24

`PS C:\Repos> copilot Welcome to GitHub Copilot CLI Version 0.0.374 · Commit 9fecd24

Copilot can write, test and debug code right from your terminal. Describe a task to get started or enter ? for help. Copilot uses AI, check for mistakes.

● Logged in as user: yiruiHH

● Connected to GitHub MCP Server

● Folder C:\Repos has been added to trusted folders.

create a new folder named GHCCli

✗ Model call failed: "Connection error."

✗ Execution failed: CAPIError: Connection error.

Show me examples of C# OAuth code

✗ Model call failed: "Connection error."

✗ Execution failed: CAPIError: Connection error.

Init a helloWorld python project

✗ Model call failed: "Connection error."

✗ Execution failed: CAPIError: Connection error.`

yiruiHH avatar Jan 05 '26 10:01 yiruiHH

Downgrading to 0.0.372 works for me Thanks @KhYossi

Yea this whole thing is pretty painful. Full workaround: the downgrade to 0.0.372 does work BUT you have to:

cd ~/.copilot/pkg && rm -fR *
npm install -g @github/[email protected]

and run with

copilot --no-auto-update

Note: if, like me, you like --allow-all-tools, it turns out that position matters so

  • ✔️ copilot --no-auto-update --allow-all-tools works over
  • ❌copilot --allow-all-tools --no-auto-update

MrSimonC avatar Jan 05 '26 11:01 MrSimonC

Downgrading to 0.0.372 works for me Thanks @KhYossi

Yea this whole thing is pretty painful. Full workaround: the downgrade to 0.0.372 does work BUT you have to:

cd ~/.copilot/pkg && rm -fR * npm install -g @github/[email protected] and run with

copilot --no-auto-update

Note: if, like me, you like --allow-all-tools, it turns out that position matters so

  • ✔️ copilot --no-auto-update --allow-all-tools works over
  • ❌copilot --allow-all-tools --no-auto-update

I encountered the same issue. I can confirm that the temporary solution proposed by @KhYossi and @MrSimonC worked for me. Thanks!

kennenlaw5 avatar Jan 05 '26 19:01 kennenlaw5

I'm having the same issue as well, on Win11. Only difference is that I installed it via WinGet.

Tridus avatar Jan 05 '26 19:01 Tridus

Downgrading to 0.0.372 works for me Thanks @KhYossi

Yea this whole thing is pretty painful. Full workaround: the downgrade to 0.0.372 does work BUT you have to:

cd ~/.copilot/pkg && rm -fR * npm install -g @github/[email protected] and run with

copilot --no-auto-update

Note: if, like me, you like --allow-all-tools, it turns out that position matters so

  • ✔️ copilot --no-auto-update --allow-all-tools works over
  • ❌copilot --allow-all-tools --no-auto-update

This worked for me! Thanks a lot.

Julius-Woo avatar Jan 06 '26 07:01 Julius-Woo

I had the same issue with version 0.0.374. After restarting my machine, the problem disappeared and Copilot works correctly.

Given that there are releases almost every week, it might actually be better not to disable auto-update.

soungsid avatar Jan 06 '26 16:01 soungsid

Hello, apologies for the difficulties here. We have published 0.0.375-2 that should address the underlying issue here.

Also for the auto-updating, in the next release if --no-auto-update is passed it will only run the version shipped with the binary. That will avoid needing to manually clear .copilot/pkg in order to downgrade to a specific version.

devm33 avatar Jan 07 '26 03:01 devm33

The fix here is now available in stable release 0.0.375. The change for auto-updating will ship in the next release.

Will close this out. Please feel free to reopen or raise a new issue if you encounter any issues.

devm33 avatar Jan 07 '26 16:01 devm33

╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ │ ╭─╮╭─╮ │ │ ╰─╯╰─╯ GitHub Copilot v1.0.10 │ │ █ ▘▝ █ Describe a task to get started. │ │ ▔▔▔▔ │ │ Tip: /rewind │ │ Copilot uses AI, so always check for mistakes. │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯

● 🧪 Experimental mode is enabled. These features are not stable, may have bugs, and may be removed in the future.

● Environment loaded: 1 custom instruction, 9 MCP servers, 1 plugin, 82 skills, 1 agent, Visual Studio Code connected

❯ What's the version of this app?

✗ Execution failed: CAPIError: 400 400 Bad Request (Request ID: DFCB:EE3A0:3DE2F0:524F39:69BF0831)

● Model changed to: claude-sonnet-4.6 (medium)

I've tried rebooting, uninstalling copilot-cli and deleting its application support package (I'm on macOS 2026.3). I can use Copilot from the Github website, as well as VS Code, but not the command line. Weird that it works from VS Code but not from a standalone terminal.

Also, not all skills are loading correctly. They are symlinked via 'npx skills' utility. There should be at least double that amount of skills. Claude picks them all up with no problem, and he's Symlinked as well. Thoughts?

jaypatrick avatar Mar 21 '26 21:03 jaypatrick