github / github/copilot-cli

Windows: plugin install/update fails with "Access is denied. (os error 5)" while VS Code is running

Offen
#4,570 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

area:platform-windows area:plugins
Vorherrschende Sprache
Shell
Sterne
11.2k
Forks
1.9k
Ø Merge
14 Std. 16 Min.
Gemergte PRs (30 T.)
6

Beschreibung

On Windows, copilot plugin install / plugin update fails whenever VS Code is running. Closing VS Code makes the same command succeed. It affects every plugin, not one specific plugin.

Repro

With VS Code open:

> copilot plugin update superpowers@superpowers-marketplace
Failed to update plugin: Error: Request plugins.update failed with message: Failed to install plugin: Access is denied. (os error 5)

Close VS Code, run the same command again -> succeeds.

Cause: open directory handles on the plugin store

On Windows a directory that has an open handle cannot be renamed or deleted. Probing which paths can be renamed:

rename DENIED: ~/.copilot/installed-plugins
rename DENIED: ~/.copilot/installed-plugins/superpowers-marketplace
rename DENIED: ~/.copilot/installed-plugins/superpowers-marketplace/superpowers
rename OK    : ~/.copilot/installed-plugins/superpowers-marketplace/superpowers/skills

creating and deleting a file inside those directories: OK

The denied set is exactly the store root, the marketplace root and the plugin root. One level deeper is free, and file I/O inside them works normally. That is the signature of one open directory handle per plugin root, opened without FILE_SHARE_DELETE, so the install/update step that replaces a plugin directory gets ACCESS_DENIED.

Worth noting for anyone else debugging this: Restart Manager reports no holders for any file under installed-plugins, because these are directory handles rather than file handles. The usual "which process has this file open" tooling shows nothing.

VS Code ships its own copy of the CLI (resources/app/node_modules.asar.unpacked/@github/copilot-win32-x64) and runs it against the same ~/.copilot home, registering itself in ~/.copilot/ide/<uuid>.lock. That instance appears to hold the handles for its whole lifetime.

Expected

Plugin install / update should work while an IDE-hosted CLI instance is running — e.g. open plugin directories with FILE_SHARE_DELETE, or release the handles after enumeration.

Impact

Anyone who keeps VS Code open cannot install or update any plugin, and the error message gives no hint about the cause. plugin uninstall hits the same error and can leave a partial state behind (marketplace entry removed, plugin directory still on disk).

Environment

  • Windows 11 Enterprise 10.0.26200
  • GitHub Copilot CLI 1.0.81-7
  • VS Code 1.132.0

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne bei den Pfaden für die Plugin-Installation, -Aktualisierung und -Deinstallation, die Verzeichnisse unter ~/.copilot/installed-plugins ersetzen, und untersuche anschließend, wie die vom IDE gehostete CLI Plugin-Stammverzeichnisse aufzählt und Verzeichnishandles hält. Reproduziere das Problem bei laufendem VS Code und verifiziere, dass die Plugin-Operationen erfolgreich abgeschlossen werden, einschließlich der Deinstallation, ohne einen unvollständigen Zustand zu hinterlassen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
vscode
Bereich
cli, operating-systems
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Aktiv
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
50/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.