Skip to content

Agent plugins: hooks, MCP servers and instructions work in the Local harness but not in the Copilot harness (SDK / Agent Host), Copilot CLI or Copilot Desktop #342924

Closed as not planned

Description

Summary

An Agent Plugin (OpenPlugin-style plugin.json that declares hooks, mcpServers and rules through paths + exclusive, with its content under a com.github.copilot/ folder) works end to end in the VS Code Local harness: hooks run, MCP servers start, instructions load. The same installed plugin does not behave the same in:

  1. VS Code Copilot harness (Copilot SDK / Agent Host)
  2. Copilot CLI
  3. GitHub Copilot Desktop / Agents window

Each surface seems to use its own plugin loader and its own hook format, so a plugin cannot be authored once and behave the same everywhere.

Environment

  • VS Code 1.142.x, GitHub Copilot Chat extension, Windows 11
  • Copilot CLI 1.0.x
  • Plugin installed from a marketplace into ~/.copilot/installed-plugins/<marketplace>/<plugin>

Observed behavior

Capability VS Code Local Copilot harness (SDK / Agent Host) Copilot CLI Desktop / Agents window
Hooks discovered yes yes (Customizations > Hook Discovery Results lists every file as loaded) /hooks shows nothing from the plugin not verified
Hooks executed yes no no not verified
Plugin MCP servers yes not started automatically not verified not shown
Plugin instructions / rules yes not loaded n/a not verified
Custom hook path (hooks.paths, exclusive) honored unclear appears ignored unclear

Likely causes (partly from reading existing issues, not all verified)

Expected behavior

A plugin that installs correctly should expose the same hooks, MCP servers, instructions and agents in every client, or the docs should state exactly which manifest fields and hook formats each client supports.

Requests

  1. Document, per client (Local, Copilot harness / Agent Host, Copilot CLI, Desktop), which plugin.json fields are honored: hooks, mcpServers, rules, paths, exclusive, and the com.github.copilot/ folder convention.
  2. Accept both hook entry formats (command plus per-OS overrides, and bash / powershell) in every client, or log a clear warning when an entry is skipped.
  3. When a hook is discovered but cannot run, surface the reason in the Hook Discovery Results view and in the output channel.
  4. Make Copilot CLI /hooks list hooks contributed by installed plugins, including those declared through plugin.json.
  5. Provide a single supported way to declare plugin MCP servers and instructions that all clients load.

Related issues

microsoft/vscode: #342664, #342022, #302865, #302350, #334153, #342860, #342085, #335006, #342671, #342595, #341862
github/copilot-cli: #4629, #4520

Activity

  1. lupuscaoticus commented on Oct 28, 2026

    @lupuscaoticus

    Additional isolated reproduction for file-scoped plugin MDC instructions on VS Code 1.144.0 (Windows x64, commit 2c33b50).

    Tested with the exact bundled SDK 1.0.27-unstable.40031404408.gba6c003 and runtime 1.0.103-unstable.r40031404408.gba6c003, using a synthetic plugin and a localhost-only model stub. No external model request or private plugin content is involved.

    The plugin contains com.github.copilot/rules/scoped.mdc:

    ---
    alwaysApply: true
    globs: ["**/*.probe"]
    ---
    HARNESS_GATED_2509

    A native view tool call reads matching.probe; the stub captures marker presence in the actual follow-up model request.

    Session configuration Scoped rule after matching view Scoped rule after nonmatching view Plugin skill invocation
    enableOnDemandInstructionDiscovery omitted Absent Absent Succeeds
    enableOnDemandInstructionDiscovery: true Present Absent Succeeds

    Both configurations enable enableConfigDiscovery, enableSkills and enableFileHooks. The global plugin rule is present in both. Twelve asserted cases cover initial prompts, matching/nonmatching views, source-disable-list clearing and actual skill invocation. Clearing disabledInstructionSources alone does not activate scoped discovery.

    Static inspection of the shipped Agent Host _buildSessionConfig shows discovery, skills and file hooks enabled, but no explicit enableOnDemandInstructionDiscovery. The bundled SDK forwards this option without enabling it by default in copilot-cli mode. The additional session-configuration spreads inspected do not enable it either.

    In a fresh actual VS Code Copilot session after updating, the plugin skill now loads successfully, but the agent reports no scoped instruction after a matching file read. This live-session observation is a context self-report, not a raw prompt capture.

    Could maintainers check whether normal Copilot Agent Host sessions should enable on-demand instruction discovery and ensure it also triggers for client-bridged file tools? The isolated test uses native view; the live Agent Host may bridge file tools differently. The evidence narrows the issue but does not capture effective options of that live session.

    This finding concerns scoped instructions specifically; it does not establish a common cause for the hooks or MCP symptoms in this issue.

  2. aeschli commented on Nov 9, 2026

    @aeschli
    Contributor

    Can you provide the sample plugin that demonstrates the problems?

  3. added
    info-needed
    on Nov 9, 2026
  4. vs-code-engineering commented on Nov 17, 2026

    @vs-code-engineering
    Contributor

    This issue has been closed as it has been labeled with info-needed and has not received the additional information that was requested from the issue author. It has been labeled as info-needed for 7 days.

  5. no-identd commented on Nov 20, 2026

    @no-identd

    aeschi why is this closed as info needed? Info was provided. And this is still not working correctly in 147. Can you guys PLEASE FOR THE LOVE OF GOD TEST PROPERLY? It's EXTREMELY tiresome. EVERY DAMN VSCODE RELEASE MSFT changes the plugins layout. STANDARDISE INTERNALLY HOW THE MSFT EXTENSION OF THE PLUGINS ARCHITECTURE SHOULD WORK. PLEASE.

    I have a list of upstream issues related to plugins and scoped instructions not applying as long as my arm. Copilot CLI and vscode are a completely unusable mess and if I weren't stuck with it as the only game in town for powershell sandboxing I'd by now have thrown it out.

    Please don't take it personally but what you guys ship at the moment is a steaming pile of slop.

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

Metadata

Metadata

Labels

info-needed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions