microsoft / microsoft/vscode-docs
Clarify Agent Hooks harness support, enterprise deployment, and GA status
@digitarald is already working on this.
Since Sep 14, 2026.
- Dominant language
- Markdown
- Stars
- 6.6k
- Forks
- 5.8k
- Avg merge
- 11h 43m
- Merged PRs (30d)
- 123
Description
Documentation gap
The current hook documentation leaves several related concepts looking like separate or conflicting product directions:
- Agent hooks in VS Code are labeled Preview and described from the VS Code authoring/runtime perspective.
- GitHub Copilot hooks are described for Copilot CLI and cloud agent, with Policy Hooks documented as CLI-only.
- The VS Code documentation does not explain how hook behavior changes when a user runs the legacy local harness versus the Agent Host Copilot SDK harness.
- The enterprise documentation lists
ChatEditorPreferCopilotHarness, but the hooks documentation does not connect that policy to hook rollout. - The docs do not explain the recommended enterprise distribution model for hooks through force-enabled Agent Plugins.
This makes it difficult to answer basic deployment questions such as:
- When do Copilot Policy Hooks apply to a VS Code session?
- Are “VS Code Agent Hooks” and “GitHub Copilot Hooks” competing approaches or two product views of the same lifecycle-hook model?
- What does the VS Code Preview label cover when the shared Copilot SDK hooks implementation is GA?
- How should an enterprise deploy hooks without permitting arbitrary user/workspace hooks?
Requested updates
Explain the harness boundary
Add a short compatibility section to the VS Code Agent Hooks page:
- New Agent Host / Copilot SDK-based sessions use the shared Copilot SDK hooks implementation.
- Policy Hooks apply when the VS Code session is running on that harness.
- Sessions that remain on the legacy local harness do not receive Copilot SDK Policy Hooks.
- Existing hook scripts should be validated during cutover, especially scripts that depend on tool argument shapes or chat transcript formatting.
Document the device policy that moves new Copilot editor-chat sessions to the new harness:
- Policy:
ChatEditorPreferCopilotHarness - Setting:
chat.editor.preferCopilotHarness - Minimum VS Code version: 1.134
Implementation: microsoft/vscode#330068.
Reconcile the terminology
Explain that VS Code Agent Hooks and GitHub Copilot Hooks share the same lifecycle-hook direction. The VS Code page focuses on editor authoring, discovery, and UX; the GitHub page focuses on Copilot runtime surfaces and their deployment models.
Call out where behavior is shared on the SDK harness and where client-specific configuration, event payloads, or legacy behavior still differs.
Document the enterprise plugin path
Add a managed deployment example that packages hooks in an Agent Plugin and uses managed settings to control provenance and activation:
{
"strictPluginOnlyCustomization": ["hooks"],
"allowManagedHooksOnly": true,
"enabledPlugins": {
"security-hooks@company-marketplace": true
}
}
Explain that:
enabledPlugins["plugin@marketplace"]: trueforce-enables the plugin; it is not only a marketplace allowlist.falseforce-disables it.- An omitted plugin remains under normal user enablement.
allowManagedHooksOnly: trueallows hooks only from managed sources and plugins force-enabled by policy; it does not itself enable a plugin.- Enterprises should pair this with
extraKnownMarketplacesand/orstrictKnownMarketplacesto control plugin sources.
Relevant implementations: microsoft/vscode#318623 and microsoft/vscode#327843.
Clarify Preview versus GA
The VS Code Agent Hooks page currently labels the entire feature Preview. Clarify that:
- The Copilot SDK hooks implementation is GA.
- The VS Code Preview label covers the VS Code product transition from the legacy hook implementation to the SDK-based harness, including compatibility risk for existing hook scripts.
- Organizations that enforce the SDK-based harness are using the GA SDK implementation, while the overall VS Code surface remains formally Preview during the transition.
Do not imply a GA date unless one is committed. Instead, describe what must be validated during migration and what the Preview label currently applies to.
Suggested pages
docs/agent-customization/hooks.mddocs/enterprise/policies.mddocs/agents/run/agent-harnesses.md- The hooks section of the Agent Plugins documentation, where useful for the managed distribution example
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.