github / github/copilot-cli

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

オープン
#4,570 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

area:platform-windows area:plugins
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

~/.copilot/installed-plugins 配下のディレクトリを置き換える plugin のインストール、更新、アンインストールのパスから始め、次に IDE ホスト型 CLI が plugin のルートを列挙し、ディレクトリハンドルを保持する仕組みを調べます。VS Code を起動した状態で再現し、アンインストールを含む plugin 操作が、部分的な状態を残さず正常に完了することを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
vscode
領域
cli, operating-systems
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
50/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。