Skip to content

Agent templates write unknown tools into globalStorage causing diagnostics #4721

@Hayvey

Description

@Hayvey

Summary:
The extension github.copilot-chat writes agent template files to globalStorage that include tool identifiers which are not registered in the current VS Code environment, causing repeated "Unknown tool" diagnostics on startup.

Reproduction:

  1. Install/enable GitHub Copilot Chat extension.
  2. Start VS Code and observe files under %APPDATA%\\Code\\User\\globalStorage\\github.copilot-chat\\ such as ask-agent/Ask.agent.md.
  3. Files contain tools like github/issue_read, github.vscode-pull-request-github/issue_fetch, github.vscode-pull-request-github/activePullRequest which the diagnostics provider reports as unknown.

Observed:

  • On each VS Code start the extension re-writes these agent files (from dist/extension.js), so manual fixes are overwritten and diagnostics reappear.

Relevant files:

  • Extension installed at C:\Users\059183\.vscode\extensions\github.copilot-chat-0.41.1
  • Package repository points to https://github.com/microsoft/vscode-copilot-chat
  • The dist/extension.js contains the template/tools array (variable UJ) that includes the above tool ids.

Suggested fix:

  • Remove or conditionally include tools that are not available/registered in the host VS Code environment when writing agent templates to globalStorage.
  • Alternatively, guard the diagnostics by ignoring unknown tools in these generated templates.

Environment:

  • OS: Windows
  • VS Code extension: github.copilot-chat v0.41.1

I can provide logs, exact file excerpts, and steps I used to locate the code if helpful.

Metadata

Metadata

Assignees

No one assigned

    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