Skip to content

[AgentPluginManager] Failed to sync plugin (WSL) #341862

Closed

Description

Type: Bug

I'm using GitHub Copilot Chat in VS Code connected to WSL. After recent updates, Copilot Chat has become nearly unusable.

My organization requires certain agent plugins to be installed, but the Agent Plugin Manager fails to sync them. As a result, every Copilot Chat prompt stalls for approximately 4 minutes before proceeding.

The following error appears in the Agent Host output:

2026-10-15 22:15:47.131 [error] [AgentPluginManager] Failed to sync plugin file:///home/dominik/.copilot/installed-plugins/cnd-ai-marketplace/adidas-gh-actions: Access to file:///home/dominik/.copilot/installed-plugins/cnd-ai-marketplace/adidas-gh-actions is not granted.

Expected behavior: Copilot Chat should sync the required plugins successfully and process prompts without significant delays.

Actual behavior: Plugin synchronization fails with an access error, and Copilot Chat prompts stall for approximately 4 minutes.

This was working before the recent updates.

VS Code version: Code 1.142.0 (6d62b1d, 2026-10-15T03:02:17Z)
OS version: Windows_NT x64 10.0.26200
Modes:
Remote OS version: Linux x64 5.15.167.4-microsoft-standard-WSL2

System Info
Item Value
CPUs AMD Ryzen AI 9 HX 370 w/ Radeon 890M (24 x 1996)
GPU Status 2d_canvas: enabled
GPU0: VENDOR= 0x10de, DEVICE=0x2860 [NVIDIA GeForce RTX 4070 Laptop GPU], DRIVER_VENDOR=NVIDIA, DRIVER_VERSION=32.0.15.7628 ACTIVE
GPU1: VENDOR= 0x1002, DEVICE=0x150e [AMD Radeon(TM) 890M Graphics], DRIVER_VERSION=32.0.31041.1004
GPU2: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.26100.9711
Machine model name:
Machine model version:
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 31.12GB (8.79GB free)
Process Argv --folder-uri=vscode-remote://wsl+Ubuntu/home/dominik/git/test --remote=wsl+Ubuntu --crash-reporter-id 2c4f2a88-25bc-424e-9955-55d954beb74d
Screen Reader no
VM 0%
Item Value
Remote WSL: Ubuntu
OS Linux x64 5.15.167.4-microsoft-standard-WSL2
CPUs AMD Ryzen AI 9 HX 370 w/ Radeon 890M (24 x 0)
Memory (System) 15.18GB (12.37GB free)
VM 0%
Extensions (14)
Name Identifier Author Version
Dev Containers ms-vscode-remote.remote-containers ms-vscode-remote 0.469.0
Remote - SSH ms-vscode-remote.remote-ssh ms-vscode-remote 0.128.0
Remote - SSH: Editing Configuration Files ms-vscode-remote.remote-ssh-edit ms-vscode-remote 0.87.0
WSL ms-vscode-remote.remote-wsl ms-vscode-remote 0.104.3
Remote Development ms-vscode-remote.vscode-remote-extensionpack ms-vscode-remote 0.26.0
Remote Explorer ms-vscode.remote-explorer ms-vscode 0.5.0
Remote - Tunnels ms-vscode.remote-server ms-vscode 1.5.4
GitLens — Git supercharged eamodio.gitlens eamodio 19.3.0
Prettier - Code formatter esbenp.prettier-vscode esbenp 12.4.0
C# Dev Kit ms-dotnettools.csdevkit ms-dotnettools 3.40.210
C# ms-dotnettools.csharp ms-dotnettools 2.160.4
.NET Install Tool ms-dotnettools.vscode-dotnet-runtime ms-dotnettools 3.2.0
Live Share ms-vsliveshare.vsliveshare ms-vsliveshare 1.1.122
Code Spell Checker streetsidesoftware.code-spell-checker streetsidesoftware 4.10.0
A/B Experiments
vsliv368:30146709
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
envsactivate1:31551504
478i5457:31544283
cloudbuttont:31379625
3efgi100_wstrepl:31403338
ec5jj548:31422691
cp_cls_t_966_ss:31526232
4je02754:31466945
c3h7c220:31478652
ge8j1254_inline_auto_hint_haiku:31490510
cp_cls_c_1081:31454833
conptydll_true:31498968
e9c30283:31461165
46204921:31447328
ei9d7968:31496641
chat:31457767
8hig5102:31480529
89g7j272:31518289
2d1bi976:31596492
i2gc6536:31499202
52612955:31516516
ddid_c:31478207
hmra_i5g22:31518061
7df3h592:31512476
cp_cls_t_1082:31535311
608b4df9:31595861
logging_enabled_new:31498466
db5d2638:31499441
jb_cp_cls_t_632:31543129
56dj4588:31512888
32d76977:31512328
ha629193:31508444
jh5f2457_c:31540921
jbcp_cls_pctr_t:31531130
cp_intellij_t_nes:31548657
ahp-both-windows:31556933
ihg5j128:31534457
7g2b5551:31542111
enable_editor_pane_layout:31569726
allow-none:31555437
36h42362:31564511
1h923230:31564177
treatment-23-1:31555779
unuse_dynamic_mcp:31555281
0d8dfbc3:31570291
switchtoauto:31559321
0c1h4866:31566224
session-mark-done:31591648
multi-root:31593626
5b8j3302:31564601
autotiers:31584978
mangle-name-control:31572633
atk_rai_validation_enable:31598258
allow-signed-out:31592042
b17abb00-cfec-4134-90da-ee5e32ce4426:31589248
intellij_nes_preview_t:31580086
multiv2:31574985
links-treatment:31596176
aw-autom-on:31583758
issue9151-8b8b39eb:31597539
revealsession_treatment_7ed7e840:31597558
usage_tips_endabled_0911:31587631
7g328426_fixed:31595622
codex-agent-host-stable-editor:31599810
54hd3363:31600021
skill-budget-30000:31597277
sessioninlinediffenabled_disabled:31587634
intellij_copilot_command_preview_c:31598260
welcomesignin9359t:31590011
b169b0b1-b17e-475c-9032-91b9b24dde97:31589214
ca19f5eb-b04f-4f52-8e6b-9f6927d4e0dc:31589210
5a177259:31599157
i67i8290:31599156
edbgf432:31599155
msft-auth-on:31593345
variation7-original-dismiss:31600297
permission_prompt_control:1332567
ccr_pr_nudge_control:1319470
vsc_wsm_c:1340633
cfee5631:1379228
jc553158:1433349
hdfaf120:1453755
cmc_aa_c:1435710
plus-and-new:1456316
c_ws_f8jhi663:1455089
h56ae855:1456854
seataa-a98d0257:1447868

Activity

  1. DKorosec commented on Oct 15, 2026

    @DKorosec
    Author

    #341863 is a related to the 4 minute stall I've mentioned - switching to local the delay is gone.

  2. Referralconsequently commented on Oct 18, 2026

    @Referralconsequently

    Same failure on a different remote type, same build (1.142.0, 6d62b1d): macOS client → Remote Tunnel → Linux arm64 host.

    Additional observations:

    • Affects all 10 plugins installed with copilot plugin install (they land in ~/.copilot/installed-plugins/…). Their sync targets under ~/.vscode-server/data/agentPlugins/file-home-…-copilot-installed-plugins-* have stayed empty since the first attempt — it has never succeeded on this host, not a regression from an earlier working state for me.
    • copilot plugin uninstall + install of one plugin does not help: the fresh copy fails with the identical Access to … is not granted within seconds. No approval/grant prompt appears in the client.
    • Not affected on the same host/window: plugins from a directory marketplace (copilot plugin list shows them as "Live Plugins … never copied"), and plugins that live on the macOS client and are synced to the host — those copy fine.
    • The standalone Copilot CLI loads all 10 plugins without error, so the plugin contents are fine.
    • Volume: the agent host retries continuously (SessionPluginController: Retrying 10 previously-failed client customization(s)), producing ~1,700 Failed to sync plugin errors per session in agenthost.log.

    Possible cause, from reading the shipped out/vs/platform/agentHost/node/agentHostMain.js (so treat as a hint, not a diagnosis): AgentPluginManager._syncPlugin only short-circuits for the host-local scheme; every other file: URI is mapped through the client connection before fileService.copy. These plugins are on the agent host's own filesystem, but arrive as plain file:///home/<user>/.copilot/installed-plugins/... URIs, so the copy is routed through the client, whose resource-access check refuses a path it never granted. Tagging host-discovered CLI plugins with the host-local scheme (or skipping the copy for paths already on the host) would likely avoid both the error and the retry loop.

  3. bomtobe-hgkim commented on Oct 18, 2026

    @bomtobe-hgkim

    Could a regression test compare the plugin URI with the WSL-side canonical path and configured allowed roots (including any symlink resolution), then verify denial fails promptly instead of delaying every prompt for four minutes? A local Windows vs WSL path pair may isolate the boundary. I’m with BOMTOBE/Orke and haven’t reproduced this.

  4. patrick-5546 commented on Oct 19, 2026

    @patrick-5546

    Same failure on 1.142.0 (commit 6d62b1d5dace93a33b3a6d3eca1317bd5e15bcb1): VS Code desktop on Windows, connected through Remote Tunnels (code tunnel) to a Linux x64 host, with the Copilot harness, whose agent host runs on the remote host. The _syncPlugin analysis above matches what I see. A few details that aren't in this thread yet:

    Plugins from chat.pluginLocations fail too, not only Copilot CLI installs. On the remote host, create this plugin:

    /home/<user>/repo/plugins/my-plugin/plugin.json:

    { "name": "my-plugin", "version": "0.0.1", "description": "Repro plugin" }

    /home/<user>/repo/plugins/my-plugin/skills/hello/SKILL.md:

    ---
    name: hello
    description: Use when the user says hello.
    ---
    Reply with "hello from my-plugin".

    Then add it in Remote settings (Preferences: Open Remote Settings (JSON)):

    "chat.pluginLocations": { "/home/<user>/repo/plugins/my-plugin": true }

    Start a new Copilot harness session and ask it to list its skills. The hello skill is missing, even though the plugin is on the same machine as the agent host. The remote agenthost.log repeats this pair for each plugin about every 0.3–0.7 seconds until the plugin is removed:

    [info] [AgentPluginManager] Syncing plugin: file:///home/<user>/repo/plugins/my-plugin → file:///home/<user>/.vscode-server/data/agentPlugins/file-home-<user>-repo-plugins-my-plugin-…
    [error] [AgentPluginManager] Failed to sync plugin file:///home/<user>/repo/plugins/my-plugin: Access to file:///home/<user>/repo/plugins/my-plugin is not granted.
    

    With two chat.pluginLocations entries and one Copilot CLI install, the log recorded 7,250 of these errors in 31 minutes.

    Client side. The client's AgentHostResourceService treats the tunnel's agent host as a remote identity. It allows a read only when chat.agentHost.localFilePermissions or an implicit grant covers the URI. The implicit grant for the plugin seems to be registered for its remote (vscode-remote://) URI, so the file:// request is rejected.

    Suggested fix: Publish plugin directories that are on the agent host's machine with the vscode-agent-host-file scheme, so they are used without a copy. Otherwise, register the implicit grant for the URI that the agent host requests. Also back off after a failed sync.

    Related: #327404 (directory marketplaces in .github/copilot/settings.json are ignored).

  5. jdeboscker commented on Oct 21, 2026

    @jdeboscker

    Still happening on 1.143.0 (2d0b7506a3) with VS Code desktop on Windows → Remote WSL, Copilot harness. The agent host runs inside WSL.

    Environment

    • VS Code 1.143.0 (2d0b7506a3), Windows client
    • Remote: WSL2, kernel 6.18.40.1-microsoft-standard-WSL2
    • Copilot CLI 1.0.101; plugins installed with copilot plugin install into ~/.copilot/installed-plugins/…

    What I see

    Every CLI-installed plugin fails to sync, with the same error as the original report. Remote ~/.vscode-server/data/logs/<session>/agenthost.log:

    2026-10-21 17:20:29.412 [info] [AgentPluginManager] Syncing plugin: file:///home/<user>/.copilot/installed-plugins/endor-labs/endor-labs-agent-kit → file:///home/<user>/.vscode-server/data/agentPlugins/file-home-<user>-copilot-installed-plugins-endor-labs-endor-labs-agent-kit…
    2026-10-21 17:20:29.545 [error] [AgentPluginManager] Failed to sync plugin file:///home/<user>/.copilot/installed-plugins/endor-labs/endor-labs-agent-kit: Access to file:///home/<user>/.copilot/installed-plugins/endor-labs/endor-labs-agent-kit is not granted.
    

    The same pair appears for all enabled plugins. Between sessions the controller retries:

    [info] [Copilot:SessionPluginController] Retrying 7 previously-failed client customization(s) for <sessionId>
    

    Numbers

    • 2,378 Failed to sync plugin errors across the 8 agent host logs since 2026-10-14 11:55, when the first one appeared. Every one is is not granted, with no other failure reason.
    • It has never succeeded on this machine. All 11 sync folders under ~/.vscode-server/data/agentPlugins/file-home-<user>-copilot-installed-plugins-* contain 0 files.
    • Client-side customizations sync fine in the same window. agentPlugins/vscode-synced-customization-remote-hex-<wsl:Ubuntu>-copilotcli-* folders are populated, and VS Code built-in skills such as troubleshoot load in the session. Only plugins that already live on the WSL side fail. That matches Referralconsequently's observation.

    User-visible impact

    Nothing from these plugins reaches the Copilot harness session: no skills, no agents, and no com.github.copilot/rules/ instructions. In my case, an applyTo rule for pom.xml (Endor Labs "Dependency Introduction Check") never loads. The standalone Copilot CLI 1.0.101 loads the same plugin from the same folder, so the plugin contents are fine.

    Confirmation from the 1.143.0 client code (Windows workbench.desktop.main.js), consistent with Patrick Creighton (@patrick-5546)'s analysis:

    • The error is AgentHostResourcePermissionError, thrown by AgentHostResourceService._gate() when check() fails.

    • _isCovered() short-circuits only for the local host identity. For any other host, the only things that allow access are:

      • in-memory grants (grantImplicitRead / allow)
      • persisted grants read from chat.agentHost.localFilePermissions[<hostAddress>]

      The WSL agent host is treated as a remote identity (wsl:Ubuntu-workstation).

    • The request uses a plain file:///home/<user>/… URI. On the client side, _canonicalize() resolves it against the Windows file system, where that path doesn't exist.

    • So even a manual grant in chat.agentHost.localFilePermissions wouldn't be a real workaround: the client would then try to read a Linux path from Windows.

    Suggested fix (same as above): detect plugin folders that are on the agent host's own machine and use them in place with vscode-agent-host-file, without a client round-trip or copy. Also back off after an AgentHostResourcePermissionError rather than retrying every session.

    Related: #342924 (plugin rules/hooks/MCP not honoured in the Copilot harness, which applies once sync works).

  6. shahinsaleh commented on Oct 23, 2026

    @shahinsaleh

    We see the same Failed to sync plugin file:///root/.copilot/installed-plugins/... : Access to ... is not granted in a
    Dev Container, with VS Code 1.142.0, 1.143.1 and 1.144.0-insider, for plugins installed with the Copilot CLI inside the
    container.

    What turns this into "no plugins at all" on 1.143 and older: the Agent Host then passes pluginDirectories: [], and
    copilot-sdk 1.0.23 and older (1.143.1 bundles 1.0.23-preview.5) ignore the runtime's own installs in that case. Skills,
    MCP servers and hooks are all missing; for a guard plugin, that means no guard. In a headless run with installed plugins
    and pluginDirectories: [], 1.0.23 loads nothing and 1.0.24 loads everything. 1.144.0-insider (SDK 1.0.26) loads them
    in the Copilot harness, although the sync error above still appears. Plugins installed from the Extensions view (on the
    client) sync without errors in the same window.

  7. added
    agent-host
    on Oct 29, 2026
  8. added
    unreleased
    on Oct 31, 2026
  9. added this to the 1.145.0 milestone on Oct 31, 2026
  10. added
    insiders-released
    and removed
    unreleased
    on Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

agent-hostinsiders-releasedon-testplan

Type

No type

Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions