Skip to content

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

Closed

Description

@DDKinger

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

Activity

  1. MilkyWay008 commented on Aug 23, 2026

    @MilkyWay008

    The Access is denied. (os error 5) on plugin update while VS Code runs is the classic Windows directory-handle lock, and your Restart Manager probe showing zero holders is exactly the trap, those are directory handles so no file-lock tooling reports them. VS Code's bundled CLI copy at resources\app\node_modules.asar.unpacked\@github\copilot-win32-x64 holding ~/.copilot/ide/<uuid>.lock is the culprit, the FILE_SHARE_DELETE direction is right. Oh also, btw, I built a portable Hermes OTG and I run it on USB as my rescue agent; super handy doing quick diagnose & fix on Windows boxes, check it, imo it'll help you. https://github.com/MilkyWay008/Hermes-OTG

  2. added
    area:platform-windowsWindows-specific: PowerShell, cmd, Git Bash, WSL, Windows Terminal
    area:pluginsPlugin system, marketplace, hooks, skills, extensions, and custom agents
    on Aug 24, 2026
  3. copilot-cli-bot commented on Nov 11, 2026

    @copilot-cli-bot

    This appears to be resolved as of GitHub Copilot CLI v1.0.109. Please update to that release or a newer stable version. We're closing this as completed. If it still happens, please comment with your version and reproduction steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:platform-windowsWindows-specific: PowerShell, cmd, Git Bash, WSL, Windows Terminalarea:pluginsPlugin system, marketplace, hooks, skills, extensions, and custom agents

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions