Skip to content

chat.agentFilesLocations, chat.promptFilesLocations, and chat.agentSkillsLocations resolve custom paths on remote host instead of local host during Remote SSH sessions #293768

Open

Description

@jmerkow
  • Copilot Chat Extension Version: 0.37.1
  • VS Code Version: 1.109
  • OS Version: Windows 11 (local) → Remote SSH to Ubuntu Linux
  • Feature: Agent mode — custom agents, prompts, and skills discovery via Remote SSH
  • Selected model: N/A
  • Logs: Diagnostics output included below

Steps to Reproduce:

  1. On the LOCAL machine, configure User settings:
    "chat.agentFilesLocations": {
        "~/.copilot/myagent/agents": true
    },
    "chat.promptFilesLocations": {
        "~/.copilot/myagent/prompts": true
    },
    "chat.agentSkillsLocations": {
        "~/.copilot/myagent/skills": true
    }
  2. Place valid .agent.md, .prompt.md, and skill files in those
    directories on the LOCAL machine. Confirm they exist locally.
  3. Open a LOCAL VS Code window (no remote) — agents, prompts, and skills
    ARE discovered correctly. ✅
  4. Connect to a remote machine via Remote SSH.
  5. Open Chat Diagnostics (right-click Chat view → Diagnostics).
  6. All three custom paths show: ❌ "Folder does not exist" ❌
    The paths exist on the local machine but are not found.
  7. Place the same files at the same paths on the REMOTE machine.
    The files ARE now discovered. ✅
    However, this is not the expected behavior — these are User settings
    with files on the local machine.

Expected: Paths in chat.agentFilesLocations, chat.promptFilesLocations,
and chat.agentSkillsLocations should resolve on the LOCAL machine during
Remote SSH sessions, since these are User settings and the files exist
locally. The built-in "User Data" path (%APPDATA%/Code/User/prompts/)
correctly resolves on the local machine in remote sessions — custom
location paths should behave the same way.

Actual: Custom paths are resolved on the REMOTE host instead of the local
host. The ~ expands to the remote user's home directory, not the local
user's home directory. This forces users to duplicate files onto every
remote machine, defeating the purpose of User-level settings.

Diagnostics output (during Remote SSH session):

Custom Agents — 2 files loaded
❌ ~/.copilot/myagent/agents - Folder does not exist
❌ %userprofile%/.copilot/myagent/agents - Folder does not exist
User Data ← (this works, resolves locally)
└─ test-in-prompts-dir.agent.md (from %APPDATA%/Code/User/prompts/)

Prompt Files — 5 files loaded
❌ ~/.copilot/myagent/prompts - Folder does not exist
User Data ← (this works, resolves locally)

Skills
❌ ~/.copilot/myagent/skills - Folder does not exist

Workaround for agents and prompts: Place .agent.md and .prompt.md files
in %APPDATA%/Code/User/prompts/ on the local machine — the built-in
"User Data" path resolves locally even during remote sessions.

Workaround for skills: Must duplicate skill files onto every remote machine
at the configured path (e.g. ~/.copilot/myagent/skills/). There is no
way to have skills load from the local machine during Remote SSH sessions.

This may be related to PR #289275 which updated path resolution in
promptFilesLocator.ts. The custom location paths appear to be completely
non-functional during Remote SSH sessions, unlike the built-in "User Data"
path which correctly resolves locally.

Activity

  1. added
    chat-ext-issue
    on Feb 8, 2026
  2. removed
    chat-ext-issue
    on Feb 8, 2026
  3. changed the title [-]`chat.agentFilesLocations`, `chat.promptFilesLocations`, and `chat.agentSkillsLocations` do not resolve custom paths during Remote SSH sessions[/-] [+]`chat.agentFilesLocations`, `chat.promptFilesLocations`, and `chat.agentSkillsLocations` resolve custom paths on remote host instead of local host during Remote SSH sessions[/+] on Feb 8, 2026
  4. arkottke commented on Feb 8, 2026

    @arkottke

    Seems like this is related to this issue: Issue #292750

  5. xingjy10 commented on Feb 12, 2026

    @xingjy10

    related to this too #294077

  6. jagoqui commented on Mar 12, 2026

    @jagoqui

    Same issue reproduced with chat.pluginLocations in Remote WSL (not just Remote SSH). Absolute paths like /home/user/... and tilde paths ~/... are silently ignored — only relative paths (resolved against the workspace root) work. Filed as #301167 for tracking.

  7. zuberek commented on Aug 29, 2026

    @zuberek

    what is the status here? Copilot is great but this a bit annoying, having to manually setup skills on every machine i'm working on

  8. JulianJvn commented on Sep 22, 2026

    @JulianJvn

    These settings have been deprecated (apparently in 1.137.0) and will be removed, see #336299.

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions