microsoft / microsoft/vscode

Enterprise-managed plugin (extraKnownMarketplaces/enabledPlugins) marked installed but plugin files never synced to cache_path

Open
#324,611 0 comments 0 reactions 1 assignee Claimed by @connor4312 View on GitHub
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

- Copilot Chat Extension Version: Built-in with VS Code (bundles the Copilot CLI; no separate marketplace extension entry under installed extensions on this build)
- VS Code Version: 1.127.0 (commit 4fe60c8b1cdac1c4c174f2fb180d0d758272d713, arm64)
- OS Version: macOS 26.5.2 (Darwin 25.5.0, arm64)
- Feature: Enterprise-managed plugin/agent marketplace (`managed-settings.json` plugin standards)
- Selected model: N/A — not model related

## Summary

An enterprise-managed plugin registered through a custom marketplace (`extraKnownMarketplaces` + `enabledPlugins` in `managed-settings.json`) is reported as `installed: true` / `enabled: true` in `~/.copilot/config.json`, but its content is **never synced to disk**. The `cache_path` directory referenced in config does not exist, so none of the plugin's agents/skills ever load — and no error is surfaced to the user.

## Config structures (redacted)

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

```json
{
"extraKnownMarketplaces": {
"": {
"source": {
"source": "github",
"repo": "/"
}
}
},
"enabledPlugins": {
"@": true
},
"permissions": {
"model": "auto"
}
}
```

The same enablement is also reflected in VS Code's own settings (`settings.json`):

```json
"chat.plugins.enabledPlugins": {
"@": true
}
```

**Resulting entry written to `~/.copilot/config.json` → `installedPlugins`** — marked installed with a `cache_path` that never gets populated:

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

## Steps to Reproduce

1. As an enterprise owner, configure `managed-settings.json` with an `extraKnownMarketplaces` entry pointing to a private GitHub-hosted marketplace repo, and set `enabledPlugins` to auto-install one of that marketplace's plugins (`"@": true`).
2. Sign in to VS Code (whose Copilot Chat bundles the Copilot CLI) with an account under that enterprise, and wait for the client to pull the managed settings (docs say this happens ~once per hour).
3. The plugin auto-installs per policy. Inspect `~/.copilot/config.json`: the plugin appears under `installedPlugins` with `enabled: true`, a version string, and a `cache_path` (see structure above).
4. Inspect the filesystem: the `cache_path` directory referenced in config **does not exist** (`~/.copilot/installed-plugins//` contains only `.DS_Store`), and the mirrored `~/.copilot/plugin-data///` directory exists but is **empty** (0 files, stale mtime from a much earlier registration attempt).
5. Try to remove the plugin. Shortly after, `config.json` re-adds it with a *new* `installed_at` timestamp (re-enforced by the enterprise policy) — but the cache directory is still never populated.
6. For comparison, the default `github-awesome-copilot` marketplace *does* fully populate `~/.copilot/marketplace-cache/github-awesome-copilot/` with hundreds of agents/skills/instructions files, confirming the general marketplace-sync mechanism works. The failure appears specific to marketplaces registered via `extraKnownMarketplaces` in enterprise managed settings.

**Expected:** The plugin's content should be fully downloaded before it is marked `installed: true`, or the install status should reflect a failed/incomplete sync with a visible error/retry to the user.

**Actual:** Config silently reports the plugin as installed and enabled while zero files exist on disk for it, so none of its agents/skills ever become available in chat — with no error surfaced anywhere in the UI.

## Note on the MCP log below (this is a *symptom*, not the cause)

The plugin declares a couple of MCP servers. Copilot 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 — which confirms the MCP spawn is **not** the failure. The `[ERROR]` prefix here is simply how the Copilot CLI logs all MCP lifecycle events (including successful `connected` / `Started` lines). The real problem remains that the plugin's own bundled content (agents/skills) is never downloaded to `cache_path`.

```
[ERROR] Starting MCP client for with command: npx and args: -y
[ERROR] Starting MCP client for with command: npx and args: -y
cwd: /Users//.copilot/installed-plugins// <-- directory does not exist
[ERROR] MCP client for connected, took 3134ms
[ERROR] Started MCP client for
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.