Skip to content

GitHub Copilot breaks custom prompt link when editing #293403

Closed as not planned
Closed as not planned

Description

Editing a previous prompt that uses a custom prompt breaks the representation of the custom prompt so that the LLM cannot access it. (This bug was originally filed as a second part of #286920, but seemed to be ignored/overlooked, so I am splitting it out so that it can get the attention it needs.)

  1. Create default.instructions.md using applyTo: '**'.
  2. Submit a prompt such as "Print hello.". GitHub Copilot will show "Used 1 reference" as expected, indicating default.instructions.md.
  3. Create a custom prompt in a file such as foo.prompt.md.
  4. Submit a prompt such as "/foo Print world.".
  5. Edit the previous prompt by clicking on it.
  6. The edited text now says

    Follow instructions in [foo.prompt.md](vscode-userdata:/c%3A/Users/user/AppData/Roaming/Code/User/prompts/foo.prompt.md).

  7. Resubmit the previous prompt.

Expected: GitHub Copilot uses the custom prompt again.

Actual: The custom prompt link is broken, and the LLM responds:

I don't have access to that file. …

GitHub Copilot broke the previous link, so that the custom prompt link turned into the raw text [foo.prompt.md](vscode-userdata:/c%3A/Users/user/AppData/Roaming/Code/User/prompts/foo.prompt.md) which the LLM could not access directly, rather than an actual linked custom prompt. (But because of #286920, it's even hard to tell without digging into the debug output.)

Version: 1.108.0 (user setup)
Commit: 94e8ae2b28cb5cc932b86e1070569c4463565c37
Date: 2026-01-08T13:53:10.781Z
Electron: 39.2.7
ElectronBuildId: 12953945
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Windows_NT x64 10.0.26200
Version: 1.109.0 (user setup)
Commit: bdd88df003631aaa0bcbe057cb0a940b80a476fa
Date: 2026-02-04T02:01:38.288Z
Electron: 39.3.0
ElectronBuildId: 13168319
Chromium: 142.0.7444.265
Node.js: 22.21.1
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26200

Activity

  1. added
    chat-ext-issue
    on Feb 6, 2026
  2. removed
    chat-ext-issue
    on Feb 6, 2026
  3. vs-code-engineering commented on Nov 12, 2026

    @vs-code-engineering
    Contributor

    Thanks for the detailed report. This flow was fixed in e2db449: custom prompt submissions now retain the original /foo invocation instead of rewriting it to a raw vscode-userdata Markdown link, so editing and resubmitting resolves and attaches the prompt file again. The fix shipped in 1.112.0.

    This issue was closed automatically: the fix shipped in 1.112.0, proposed by the VS Code sweeper and confirmed by an independent second review. It is closed as "not planned" rather than "completed" only because a "completed" close would put this already-shipped fix back into the current milestone's verification queue. If it still reproduces on 1.112.0 or later, reply here or reopen the issue and a maintainer will take a look.

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