Repository navigation
agentPlugins: expand PLUGIN_ROOT in Agent Plugin MCP servers - #338995
Merged
Merged
Conversation
Co-authored-by: Copilot <[email protected]>
Connor Peet (connor4312)
previously approved these changes
Sep 30, 2026
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The interpolation exceeds Agent Plugins v1 field semantics and lacks required working-directory containment validation.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Adds ${PLUGIN_ROOT} handling for Agent Plugin MCP definitions and local server environments.
Changes:
- Configures Agent Plugins to interpolate
PLUGIN_ROOT. - Updates parser coverage for interpolation and placeholder preservation.
- Documents the new MCP behavior.
| File | Description |
|---|---|
pluginParsers.ts |
Enables Agent Plugin MCP root interpolation. |
pluginParsers.test.ts |
Tests MCP field and environment expansion. |
AGENTS_PLUGINS.md |
Documents MCP interpolation behavior. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Paul (pwang347)
marked this pull request as ready for review
September 30, 2026 22:57
Paul (pwang347)
enabled auto-merge (squash)
September 30, 2026 22:57
Bryan Chen (bryanchen-d)
approved these changes
Sep 30, 2026
This was referenced Oct 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
${PLUGIN_ROOT}in Agent Plugins v1 stdio arguments, environment values, and working directoriesPLUGIN_ROOTin local MCP server environments./commands and the default working directory against the plugin root${PLUGIN_DATA}and other runtime placeholders while leaving command and remote fields literalFollow-up to #338967.
Reproduction
Agent Plugins v1 MCP definitions currently leave
${PLUGIN_ROOT}unresolved in portable stdio arguments, environment values, and working directories. MCP servers that reference plugin-bundled resources through those fields therefore fail in the Local harness.Validation
npm run eslint -- src/vs/platform/agentPlugins/common/pluginParsers.ts src/vs/platform/agentPlugins/test/common/pluginParsers.test.ts— passednpm run transpile-client— passed./scripts/test.sh --run src/vs/platform/agentPlugins/test/common/pluginParsers.test.ts --run src/vs/workbench/contrib/chat/test/common/plugins/agentPluginFormatDetection.test.ts— 106 passingnpm run typecheck-client— passedFFMPEG_PATH=/opt/homebrew/opt/ffmpeg-full/bin/ffmpeg FFPROBE_PATH=/opt/homebrew/opt/ffmpeg-full/bin/ffprobe node test/scenario/out/runScenario.js .build/vscode-playwright-mcp/pr-338995-plugin-root-evidence.cjs --dev— 4 steps passed on macOS arm64 using VS Code 1.141.0 DevEvidence
The captioned dev-build run opens an Agent Plugin
mcp.json, discovers its MCP server, launches it with resolved argument/cwd/environment values, and confirms the server is running.annotated.mp4