microsoft / microsoft/vscode-docs

Clarify Agent Hooks harness support, enterprise deployment, and GA status

Open
#10,282 0 comments 0 reactions 1 assignee View on GitHub

@digitarald is already working on this.

Since Sep 14, 2026.

doc-enhancement
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:

  1. When do Copilot Policy Hooks apply to a VS Code session?
  2. Are “VS Code Agent Hooks” and “GitHub Copilot Hooks” competing approaches or two product views of the same lifecycle-hook model?
  3. What does the VS Code Preview label cover when the shared Copilot SDK hooks implementation is GA?
  4. 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"]: true force-enables the plugin; it is not only a marketplace allowlist.
  • false force-disables it.
  • An omitted plugin remains under normal user enablement.
  • allowManagedHooksOnly: true allows hooks only from managed sources and plugins force-enabled by policy; it does not itself enable a plugin.
  • Enterprises should pair this with extraKnownMarketplaces and/or strictKnownMarketplaces to 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.md
  • docs/enterprise/policies.md
  • docs/agents/run/agent-harnesses.md
  • The hooks section of the Agent Plugins documentation, where useful for the managed distribution example

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.