Skip to content

chat.pluginLocations: absolute paths and tilde (~/) paths not resolved in Remote WSL #301167

Closed

Description

Bug Report

Summary

When using VS Code with the Remote - WSL extension, (set in Remote [WSL] settings / ) does not recognize:

  • Absolute Linux paths:
  • Tilde paths:

Only relative paths (e.g., ) work, but these are resolved against the current workspace root, making them useless for cross-workspace/global plugin registration.

Steps to Reproduce

  1. Install VS Code with Remote - WSL extension on Windows + Ubuntu WSL.
  2. Open any workspace via WSL Remote.
  3. Add the following to Remote [WSL: Ubuntu] settings ():
"chat.pluginLocations": {
  "/home/myuser/my-plugins/.agents": true,
  "~/.copilot/agents-skills": true
}
  1. Reload VS Code window.
  2. Open Chat → ⚙ → Plugins.

Expected Behavior

The plugin at the specified absolute or tilde path should be discovered and listed under installed plugins.

Actual Behavior

The plugin is not recognized. No error is shown. The plugin simply does not appear.

A relative path like (resolved against workspace root) does work, but only when the current workspace contains that folder.

Root Cause Analysis

Looking at in :

private _resolvePluginPath(path: string, userHome: string): URI[] {
  if (path.startsWith("~")) {
    path = untildify(path, userHome);
  }
  if (win32.isAbsolute(path) || posix.isAbsolute(path)) {
    return [URI.file(path)];
  }
  // ...relative: resolved against workspace folders
}

In Remote WSL, creates a URI. However, the VS Code file service in WSL Remote uses URIs. The file service cannot resolve plain URIs for paths that live inside WSL — they must use the scheme.

The call correctly expands to , but the resulting URI still uses the wrong scheme for the remote context.

Environment

  • VS Code version: 1.111.0 (ce099c1)
  • Remote - WSL extension
  • OS: Windows 11 + Ubuntu 22.04 (WSL2)
  • : true
  • Setting scope: Remote [WSL: Ubuntu] / Machine

Workaround

None currently. Relative paths work only within the workspace that contains the plugin folder.

Suggested Fix

When running in a remote context (WSL/SSH/Dev Container), should be replaced with the appropriate remote URI, e.g. using or to construct the correct scheme-aware URI.

Activity

  1. jagoqui commented on Mar 12, 2026

    @jagoqui
    Author

    Related/duplicate of #293768 which describes the same root cause for chat.agentFilesLocations, chat.promptFilesLocations, and chat.agentSkillsLocations in Remote SSH. Same behavior reproduced here with chat.pluginLocations in Remote WSL — paths are resolved on the remote host using URI.file() instead of the appropriate vscode-remote://wsl+... scheme, causing all absolute and tilde paths to silently fail.

  2. jagoqui commented on Mar 20, 2026

    @jagoqui
    Author

    Temporary Workaround — Symlink-based plugin registration

    While waiting for a fix, here's a workaround that avoids touching absolute paths entirely.

    Root cause: `chat.pluginLocations` with absolute paths (e.g. `/home/user/my-plugin`) silently fails in Remote WSL because `URI.file()` produces the wrong scheme for the remote file service. Relative paths still work because they're resolved against the workspace root.

    Strategy: maintain the plugin in one place, symlink it into each workspace

    1. Keep your plugin in a central location:

    ```
    ~/my-plugins/
    └── shared-agents/ ← your plugin lives here (plugin.json, skills/, etc.)
    ```

    2. Create a helper script `link-plugin.sh` inside the plugin repo:

    ```bash
    #!/usr/bin/env bash

    Run from the target workspace root to register the plugin via symlink

    set -euo pipefail

    PLUGIN_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
    TARGET="$(pwd)/.my-plugin-link"

    if [[ -L "$TARGET" && "$(readlink "$TARGET")" == "$PLUGIN_DIR" ]]; then
    echo "✓ Symlink already correct."
    exit 0
    fi

    [[ -d "$TARGET" ]] && echo "ERROR: $TARGET is a real directory. Rename it first." && exit 1

    ln -s "$PLUGIN_DIR" "$TARGET"
    echo ".my-plugin-link" >> .gitignore
    echo "✓ Symlink created: .my-plugin-link → $PLUGIN_DIR"
    echo "Add to .vscode/settings.json: "chat.pluginLocations": { ".my-plugin-link": true }"
    ```

    3. From any workspace that needs the plugin:

    ```bash
    cd ~/projects/my-other-project
    ~/my-plugins/shared-agents/link-plugin.sh
    ```

    4. Add to `.vscode/settings.json` of that workspace:

    ```json
    {
    "chat.pluginLocations": {
    ".my-plugin-link": true
    }
    }
    ```

    5. Reload VS Code window (`Ctrl+Shift+P` → `Reload Window`).

    Why this works

    VS Code resolves the relative path `.my-plugin-link` against the workspace root — it finds the symlink, follows it, and loads the plugin from the actual directory. No absolute path resolution needed.

    Limitations

    • Each new workspace needs the one-time script execution + the `.vscode/settings.json` entry.
    • The symlink name (`.my-plugin-link`) must not conflict with an existing folder in the workspace. Use a unique name to avoid this.

    Hope this helps others hitting the same wall until the fix lands.

  3. cheops commented on May 18, 2026

    @cheops

    I tried the symlink in my repo and adding the symlink to my settings.json but did NOT get it working

    in my wsl workspace: copilot chat does not pick up the plugin
    .superpowers-plugin -> /mnt/c/Users/xxxx/.vscode/agent-plugins/github.com/obra/superpowers/

    also tried this: copilot chat does not pick up the plugin
    .my-plugin-link -> /home/xxxx/.vscode/agent-plugins/github.com/obra/superpowers/

    in my winodws user global settings.json

        "chat.pluginLocations": {
            "~/.vscode/agent-plugins/github.com/obra/superpowers": true,
            "superpowers-plugin": true,
            ".my-plugin-link": true
        }

    in the wsl repository .vscode/settings.json

    {
        "chat.pluginLocations": {
            "superpowers-plugin": true,
            ".my-plugin-link": true
    
        }
    }

    but my AI agent notes: "The actual superpowers skill files are accessible via vscode-local: when I need to read them."

    Version: 1.120.0 (system setup)
    Commit: 0958016
    Date: 2026-05-12T20:17:22Z
    Electron: 39.8.8
    ElectronBuildId: 13870025
    Chromium: 142.0.7444.265
    Node.js: 22.22.1
    V8: 14.2.231.22-electron.0
    OS: Windows_NT x64 10.0.26100

    github copilot chat version = 0.48.1

  4. brandonh-msft commented on Jul 22, 2026

    @brandonh-msft
    Contributor

    It's worth noting this works for hook, agent, and skill locations, just not for plugin locations.
    Or at least this is what I'm seeing when using Dev Containers and trying to set the locations to places w/in the container environment.

    Version: 1.131.0-insider (user setup)
    Commit: d7465d6
    Date: 2026-07-22T02:34:01+10:00 (9 hrs ago)
    Electron: 42.7.0
    ElectronBuildId: 14710161
    Chromium: 148.0.7778.280
    Node.js: 24.18.0
    V8: 14.8.178.38-electron.0
    OS: Windows_NT arm64 10.0.28000

  5. added
    unreleased
    on Sep 17, 2026
  6. added this to the 1.139.0 milestone on Sep 17, 2026
  7. added
    insiders-released
    and removed
    unreleased
    on Sep 18, 2026
  8. added
    bug
    on Sep 19, 2026
  9. added
    verified
    on Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

buginsiders-releasedverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions