Skip to content

Enterprise-managed plugin (extraKnownMarketplaces/enabledPlugins) marked installed/enabled but never synced to disk #4039

Description

@mohammadrayan

Describe the bug

A plugin registered via an enterprise managed-settings.json (extraKnownMarketplaces + enabledPlugins) is marked as installed and enabled in ~/.copilot/config.json (with a version and a cache_path), but the plugin's files are never actually downloaded/synced to disk. The referenced cache_path directory does not exist, and the mirrored ~/.copilot/plugin-data/<marketplace>/<plugin>/ directory exists but is completely empty. As a result, none of the plugin's agents/skills ever become usable, with no error surfaced anywhere. Removing the plugin doesn't stick either — it gets re-added with a new installed_at timestamp shortly after (apparently re-enforced by the enterprise policy), but the cache directory is still never populated.

Also filed against the VS Code Copilot Chat extension (which bundles this same CLI), since the underlying ~/.copilot state is shared: microsoft/vscode#324611

Config structures (redacted)

Enterprise managed-settings.json — registers a private marketplace and auto-enables one of its plugins:

{
    "extraKnownMarketplaces": {
        "<marketplace-name>": {
            "source": {
                "source": "github",
                "repo": "<org>/<private-marketplace-repo>"
            }
        }
    },
    "enabledPlugins": {
        "<plugin-name>@<marketplace-name>": true
    },
    "permissions": {
        "model": "auto"
    }
}

The same enablement is also reflected in VS Code's settings.json (bundled Copilot CLI shares state):

"chat.plugins.enabledPlugins": {
  "<plugin-name>@<marketplace-name>": true
}

Resulting entry written to ~/.copilot/config.jsoninstalledPlugins — marked installed with a cache_path that never gets populated:

{
  "name": "<plugin-name>",
  "marketplace": "<marketplace-name>",
  "version": "2.2.0",
  "installed_at": "2026-07-06T19:31:21.215Z",
  "cache_path": "/Users/<user>/.copilot/installed-plugins/<marketplace-name>/<plugin-name>",
  "enabled": true
}

Affected version

GitHub Copilot CLI 1.0.68.

Steps to reproduce the behavior

  1. As an enterprise owner, add copilot/managed-settings.json with extraKnownMarketplaces pointing at a custom GitHub-hosted marketplace repo, and enabledPlugins set to auto-install one of its plugins ("<plugin-name>@<marketplace-name>": true).
  2. Authenticate copilot (or VS Code's bundled Copilot CLI) with an account under that enterprise, and wait for the managed settings to sync (docs state ~hourly).
  3. The plugin auto-installs per policy. Inspect ~/.copilot/config.json — the plugin appears under installedPlugins with enabled: true, a version, and a cache_path (see structure above).
  4. Check the filesystem — the cache_path directory referenced in config does not exist. The parallel ~/.copilot/plugin-data/<marketplace>/<plugin>/ directory exists but is empty (0 files), with a stale mtime from an earlier registration attempt.
  5. Attempt to remove the plugin. Config re-adds it shortly after with a new installed_at timestamp, but the cache directory is still never populated.
  6. Compare against the default github-awesome-copilot marketplace, whose cache directory (~/.copilot/marketplace-cache/github-awesome-copilot/) is fully populated with hundreds of skill/instruction files — confirming the general marketplace-sync mechanism works, and the failure is specific to marketplaces added via extraKnownMarketplaces.

Expected behavior

The plugin's content should be fully downloaded/synced before being marked installed: true/enabled: true, or install status should reflect a failed/incomplete sync with a visible error and retry path. Removal should also either succeed, or clearly explain that it's being re-enforced by enterprise policy.

Additional context

The plugin declares a couple of MCP servers. The CLI still tries to launch them, using the (nonexistent) plugin dir as cwd. npx tolerates the missing cwd, so the MCP servers actually start and connect successfully — confirming the MCP spawn is a symptom, not the cause. Note also that the [ERROR] prefix here is just how the CLI logs all MCP lifecycle events (including successful connected / Started lines):

[ERROR] Starting MCP client for <server-a> with command: npx and args: -y <redacted-mcp-package>
[ERROR] Starting MCP client for <server-b> with command: npx and args: -y <redacted-mcp-package>
       cwd: /Users/<user>/.copilot/installed-plugins/<marketplace>/<plugin>   <-- directory does not exist
[ERROR] MCP client for <server-b> connected, took 3134ms
[ERROR] Started MCP client for <server-a>

The real problem remains that the plugin's own bundled content (agents/skills) is never downloaded to cache_path.

  • OS: macOS 26.5.2 (Darwin 25.5.0)
  • CPU architecture: arm64
  • Terminal: integrated VS Code terminal (bash)
  • Shell: bash

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:enterpriseGitHub Enterprise (GHE/GHES) support, org policies, and enterprise settingsarea:pluginsPlugin system, marketplace, hooks, skills, extensions, and custom agents

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions