Just found the solution for me. I also had to delete the copilot/pkg dir in ~/.cache
Search Criteria
Package Details: github-copilot-cli 1.0.48-1
Package Actions
| Git Clone URL: | https://aur.archlinux.org/github-copilot-cli.git (read-only, click to copy) |
|---|---|
| Package Base: | github-copilot-cli |
| Description: | GitHub Copilot CLI brings the power of Copilot coding agent directly to your terminal. |
| Upstream URL: | https://github.com/github/copilot-cli |
| Keywords: | ai cli copilot github |
| Licenses: | LicenseRef-GitHub-Copilot |
| Conflicts: | github-copilot, github-copilot-cli-legacy |
| Provides: | copilot |
| Replaces: | github-copilot |
| Submitter: | Dominiquini |
| Maintainer: | Dominiquini (Edu4rdSHL) |
| Last Packager: | Edu4rdSHL |
| Votes: | 11 |
| Popularity: | 2.06 |
| First Submitted: | 2025-10-23 17:21 (UTC) |
| Last Updated: | 2026-05-14 16:12 (UTC) |
Dependencies (7)
- gcc-libs (gcc-libs-gitAUR, gccrs-libs-gitAUR, gcc-libs-snapshotAUR)
- glib2 (glib2-gitAUR, glib2-patched-thumbnailerAUR)
- glibc (glibc-gitAUR, glibc-eacAUR, glibc-git-native-pgoAUR)
- libsecret
- nodejs (nodejs-gitAUR, python-nodejs-wheelAUR, nodejs-lts-hydrogenAUR, nodejs-lts-iron, nodejs-lts-jod, nodejs-lts-krypton)
- jq (jq-gitAUR, jq-staticAUR, jaq-binAUR, jaq-gitAUR) (make)
- npm (python-nodejs-wheelAUR, npm-corepackAUR) (make)
Required by (1)
- emdash-git (optional)
Sources (2)
prosoitos commented on 2026-05-11 20:48 (UTC)
Edu4rdSHL commented on 2026-05-11 19:26 (UTC)
For everyone having build issues with the shell completion, follow the following steps:
- Remove your
~/.copilot/pkgfolder - Clear your AUR helper cache
- If using
makepkg, use-C
That should solve your problem. However, if the issue persists, build your package in a clean chroot environment.
There aren't problems with packaging, and nothing will be changed on our side, so avoid commenting on a problem that has already been discussed many times. Thanks!
prosoitos commented on 2026-05-11 19:20 (UTC) (edited on 2026-05-11 20:48 (UTC) by prosoitos)
I am still having the issue, even after uninstalling, cleaning the paru cache and the whole ~/.copilot dir (I did not have a pkg subdir in it).
mburakov commented on 2026-05-06 05:33 (UTC)
@ttobsen, @Edu4rdSHL, I removed the mentioned directory before updating to 1.0.41-1. I confirm this resolves the issue! Thank you!
ttobsen commented on 2026-05-04 13:20 (UTC)
Root cause confirmed - workaround available:
The build failure is caused by a leftover ~/.copilot/pkg/ directory from a previous legacy GitHub Copilot CLI installation. This directory contains old code (e.g. version 0.0.418) that does not support the completion subcommand. The new ELF binary picks up this directory at runtime and uses it instead of its own code, causing completion bash to fail.
This explains why clean chroot builds succeed — the directory does not exist there.
Immediate fix for affected users:
rm -rf ~/.copilot/pkg
Then retry the installation normally. No PKGBUILD changes needed.
Verified by reproducing the failure with the directory present and confirming success after removing it.
Edu4rdSHL commented on 2026-05-04 12:27 (UTC)
the native binary does not expose completion. The build succeeds in some environments by coincidence, not by design
That's not how it works. If it builds on a clean chroot environment every time, that's not a coincidence. A clean chroot is the only source of truth and the only way to make sure that we have a package that can be built everywhere without problems; if it builds there, then packaging is fine.
And no, @github/copilot-linux-x64/copilot works fine too:
$ /usr/lib/node_modules/@github/copilot/node_modules/@github/copilot-linux-x64/copilot completion bash
# bash completion for copilot
# Generated by `copilot completion bash`. Do not edit by hand.
___copilot_is_known_path() {
case "$1" in
'login') return 0 ;;
'help') return 0 ;;
'init') return 0 ;;
'update') return 0 ;;
'version') return 0 ;;
'plugin') return 0 ;;
...
ttobsen commented on 2026-05-04 12:14 (UTC)
Update after further investigation:
Confirmed that pkgctl build succeeds on my machine. However, testing the native binary (@github/copilot-linux-x64) directly shows that completion bash fails regardless of version - both 1.0.39 and 1.0.40:
$ /usr/lib/node_modules/@github/copilot/node_modules/@github/copilot-linux-x64/copilot completion bash
error: Invalid command format.
Did you mean: copilot -i "completion bash"?
The JS fallback (index.js) does have the completion subcommand and works correctly:
$ node /usr/lib/node_modules/@github/copilot/index.js completion bash
# bash completion for copilot
# Generated by `copilot completion bash`. Do not edit by hand.
...
Why pkgctl build succeeds while plain makepkg fails for multiple users is unclear — but the underlying issue is the same in both cases: the native binary does not expose completion. The build succeeds in some environments by coincidence, not by design.
Using node index.js directly for completion generation makes the build reliable and environment-independent. The patch from my earlier comment still applies.
Edu4rdSHL commented on 2026-05-04 11:53 (UTC)
Additionally, we have an automated build in Chaotic AUR which hasn't had an issue. Even @mburakov command works fine:
$ curl 'https://aur.archlinux.org/cgit/aur.git/snapshot/github-copilot-cli.tar.gz' | tar xz; cd github-copilot-cli; makepkg
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2761 0 2761 0 0 2745 0 00:01 0
==> Making package: github-copilot-cli 1.0.40-1 (Mon 04 May 2026 06:45:43 AM -05)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Downloading copilot-1.0.40.tgz...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 36.25M 100 36.25M 0 0 71.61M 0 0
-> Downloading CHANGELOG-1.0.40.md...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 114.1k 100 114.1k 0 0 890.6k 0 0
==> Validating source files with b2sums...
copilot-1.0.40.tgz ... Passed
CHANGELOG-1.0.40.md ... Passed
==> Extracting sources...
==> Entering fakeroot environment...
==> Starting package()...
-> Install using Using NPM
-> Fix ownership of ALL FILES
-> Remove references to PKGDIR
-> Fixing 'package.json'
-> More fixes for 'package.json'
-> Generating autocompletions for Bash
-> Generating autocompletions for Zsh
-> Generating autocompletions Fish
For the people reporting, can you reproduce the issue using git clone https://aur.archlinux.org/github-copilot-cli.git && cd github-copilot-cli && pkgctl build ? Also, people reporting here don't have any custom makepkg flags that may be overwriting https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=github-copilot-cli#n27 ?
Edu4rdSHL commented on 2026-05-04 11:50 (UTC)
It isn't a problem with packaging.
@ttobsen, there aren't network restrictions or anything related in the environments where it's being built. It builds fine with pkgctl from devtools (which is where the previous gist comes from), as well as using makepkg -s as you can see in the following code block:
╭─ /tmp/tmp.2lbicELQP6 ─────────────────────────────────────── 06:38:34
╰─❮ gclone ssh://aur@aur.archlinux.org/github-copilot-cli.git
Cloning into 'github-copilot-cli'...
Warning: Permanently added 'aur.archlinux.org' (ED25519) to the list of known hosts.
remote: Enumerating objects: 524, done.
remote: Counting objects: 100% (524/524), done.
remote: Compressing objects: 100% (199/199), done.
remote: Total 524 (delta 323), reused 522 (delta 323), pack-reused 0 (from 0)
Receiving objects: 100% (524/524), 125.29 KiB | 610.00 KiB/s, done.
Resolving deltas: 100% (323/323), done.
╭─ /tmp/tmp.2lbicELQP6 ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 4s 06:38:43
╰─❮ cd github-copilot-cli/
╭─ /tmp/tmp.2lbicELQP6/github-copilot-cli master ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 06:38:45
╰─❮ makepkg -s --rmdeps
==> Making package: github-copilot-cli 1.0.40-1 (Mon 04 May 2026 06:38:56 AM -05)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Downloading copilot-1.0.40.tgz...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 36.25M 100 36.25M 0 0 57.84M 0 0
-> Downloading CHANGELOG-1.0.40.md...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 114.1k 100 114.1k 0 0 503.3k 0 0
==> Validating source files with b2sums...
copilot-1.0.40.tgz ... Passed
CHANGELOG-1.0.40.md ... Passed
==> Extracting sources...
==> Entering fakeroot environment...
==> Starting package()...
-> Install using Using NPM
-> Fix ownership of ALL FILES
-> Remove references to PKGDIR
-> Fixing 'package.json'
-> More fixes for 'package.json'
-> Generating autocompletions for Bash
-> Generating autocompletions for Zsh
-> Generating autocompletions Fish
-> Install README file
-> Install CHANGELOG file
-> Install LICENSE file
==> Tidying install...
-> Removing libtool files...
-> Purging unwanted files...
-> Compressing man and info pages...
==> Checking for packaging issues...
==> Creating package "github-copilot-cli"...
-> Generating .PKGINFO file...
-> Generating .BUILDINFO file...
-> Generating .MTREE file...
-> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: github-copilot-cli 1.0.40-1 (Mon 04 May 2026 06:39:04 AM -05)
pkr commented on 2026-05-04 11:10 (UTC)
Can confirm that the build is broken. Using yay and zsh. Cleaned everything multiple times.
Pinned Comments
Edu4rdSHL commented on 2026-05-11 19:26 (UTC)
For everyone having build issues with the shell completion, follow the following steps:
~/.copilot/pkgfoldermakepkg, use-CThat should solve your problem. However, if the issue persists, build your package in a clean chroot environment.
There aren't problems with packaging, and nothing will be changed on our side, so avoid commenting on a problem that has already been discussed many times. Thanks!