Share scoped customizations with Agent Host automations - #333698
Draft
Paul (pwang347) wants to merge 6 commits into
Draft
Share scoped customizations with Agent Host automations#333698Paul (pwang347) wants to merge 6 commits into
Paul (pwang347) wants to merge 6 commits into
Conversation
Forward local plugin customizations to Agent Host automation sessions so scheduled and headless runs can use their MCP servers. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 49b955ef-d7c2-471d-b207-e6c03e99ad19
Contributor
There was a problem hiding this comment.
Copilot review overview
Review tier: Balanced
Findings: 3
New issues introduced by this change (3)
| Severity | Finding |
|---|---|
src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostAutomationPluginsContribution.ts — This converts the current workspace-effective state into a Global decision. A workspace override… |
|
src/vs/platform/agentHost/node/agentConfigurationService.ts — This queues a duplicate disk write for each matching client update. Client RootConfigChanged… |
|
src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostAutomationPluginsContribution.ts — The new workbench producer is untested; the AgentService test injects automationClientPlugins… |
What changed in this PR
Enables local file-backed plugins in host-created Automation sessions.
Changes:
- Forwards and persists local plugin snapshots.
- Seeds Automation sessions with a reserved synthetic active client.
- Materializes host-local plugins and rejects synthetic identity spoofing.
| File | Description |
|---|---|
agentHostAutomationPluginsContribution.ts |
Publishes local plugin snapshots. |
agentHost.contribution.ts |
Registers the contribution. |
agentHostCustomizationConfig.ts |
Defines snapshot schema and conversion. |
agentConfigurationService.ts |
Persists forwarded snapshots. |
agentService.ts |
Seeds Automation sessions. |
agentPluginManager.ts |
Reads synthetic-client plugins locally. |
protocolServerHandler.ts |
Protects the reserved identity. |
agentConfigurationService.test.ts |
Tests snapshot persistence. |
agentPluginManager.test.ts |
Tests host-local materialization. |
agentService.test.ts |
Tests Automation session seeding. |
protocolServerHandler.test.ts |
Tests spoofing rejection. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 49b955ef-d7c2-471d-b207-e6c03e99ad19
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 49b955ef-d7c2-471d-b207-e6c03e99ad19
Persist each Automation's scoped active-client customizations, materialize them through the originating client, and retain their cached plugin revisions for headless runs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 49b955ef-d7c2-471d-b207-e6c03e99ad19
Use one host-owned virtual client with scope-keyed snapshots, shared materialized artifacts, continuous client refresh, and per-run retention. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 49b955ef-d7c2-471d-b207-e6c03e99ad19
Paul (pwang347)
requested review from
Ben Villalobos (benvillalobos),
Connor Peet (connor4312) and
Ulugbek Abdullaev (ulugbekna)
and removed request for
Ben Villalobos (benvillalobos) and
Connor Peet (connor4312)
September 1, 2026 21:40
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 49b955ef-d7c2-471d-b207-e6c03e99ad19
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Design
Regular Agent Host chats resolve customizations in the workbench because plugin discovery, MCP configuration, enablement, and client-backed files live there. Scheduled Automations must also run when no UI client is connected.
A connected provider client therefore publishes a full snapshot resolved through the existing
IAgentHostActiveClientServicescope. Agent Host materializes all referenced plugin artifacts before atomically committing the snapshot under(session provider, working directories). Automation definitions store only a small capture acknowledgement; Automations sharing a scope reuse the same snapshot and plugin directories.At run time, Agent Host creates the session with the reserved
vscode-automationsvirtual client. It contributes the latest committed customization snapshot and no client-executed tools. Each non-terminal run independently pins the revision it started with, while the shared scope can continue advancing. External AHP clients cannot connect or publish actions using the reserved identity.Malformed cache entries are ignored without disabling the Automation catalog, and prior per-Automation snapshots are migrated into the shared scope store. A failed scope resolution never replaces the last successful snapshot; a failed plugin refresh retains that plugin's previous materialized revision when available.
Validation
npm run typecheck-client