Manage AI settings in enterprise environments

As an IT or Copilot admin, choose where to manage AI access, tools, and execution in VS Code, then verify the controls in the clients and environments your developers use.

You can use Copilot enterprise-managed settings, VS Code device policies, and GitHub organization or enterprise settings. These solutions control different layers of the AI experience. Configure an overlapping control in only one system when possible.

Start with an admin task

If you're a developer rather than an administrator, start with the AI troubleshooting guidance.

Choose a management solution

Choose the solution for each control based on its scope. An organization can use all three solutions.

Control you need Where to manage it
Consistent Copilot guardrails across supported clients and keys. Use enterprise-managed settings with GitHub-supported server, MDM, or file delivery.
An editor-specific control on managed VS Code installations. Use VS Code device policies through operating system or device management tools.
Copilot access, model availability, or GitHub-hosted organization behavior. Use GitHub organization and enterprise settings for account-level and service-side controls.

Some controls are available through more than one solution. Review the order of precedence before you combine them.

Understand the three management solutions

Before you choose a solution, understand where each one is configured, what it controls, and which agent harness enforces it:

  • Copilot enterprise-managed runtime controls, such as permissions.* rule lists and sandbox, are enforced by the Copilot harness (Agent Host). They are not enforced by the deprecated Local harness The Local harness is deprecated and will be removed in February 2027. Move your workflows to the Copilot harness before then. Learn more about Local harness deprecation. , Claude, or Codex.

  • VS Code device policies apply at the editor layer and can behave differently across harnesses.

  • GitHub organization and enterprise settings are complementary service-side controls that govern the signed-in account and GitHub-hosted features rather than client or device configuration.

Copilot enterprise-managed settings

Use enterprise-managed settings for Copilot guardrails that should apply across supported clients, such as VS Code, Copilot CLI, GitHub Copilot app, and other supported clients.

Administrators can deliver these settings in three ways:

  • Server-managed: Store copilot/managed-settings.json in your enterprise's .github-private repository on GitHub. GitHub delivers the settings automatically to signed-in enterprise members.
  • MDM-managed: Deploy individual keys to Windows or macOS devices through your MDM platform. Even when you use MDM, these settings use the Copilot format and policy path, not the VS Code device-policy namespace.
  • File-based: Place a local managed-settings.json file directly on each machine, such as on Linux or in containers.

Server-managed deployments also support overrides for specific enterprise teams. To customize a supported setting for a team, you mark the key as overridable with an enterprise default in copilot/managed-settings.json, then map one or more enterprise teams to separate override files. GitHub resolves the effective settings based on each person's enterprise team membership, and anyone outside a mapped team receives the enterprise default. Some keys, such as model and fusionTier, accept "unmanaged" to leave non-members unaffected, while list keys such as permissions.allow, permissions.ask, and permissions.deny do not. See Override enterprise-managed settings for teams.

Refer to the enterprise-managed settings setup guide and settings reference in the GitHub documentation for supported keys, client coverage, configuration schemas, and precedence. Not every enterprise-managed setting applies to every client. Before you configure a key for VS Code, check the Supported clients column in the enterprise-managed settings reference.

VS Code device policies

Use device policies to enforce specific VS Code settings on managed installations. Each policy maps to a VS Code setting and overrides any default, user, or workspace value so developers cannot change it.

Administrators deploy these policies at the device level through platform management tools, such as Group Policy, Microsoft Intune, macOS configuration profiles, or Linux JSON policy files.

Important

Copilot harness sessions don't enforce every device policy the same way as Local harness The Local harness is deprecated and will be removed in February 2027. Move your workflows to the Copilot harness before then. Learn more about Local harness deprecation. sessions. The task sections below note known differences. Test a policy in the harness that your developers use before you rely on it.

Refer to enterprise policy deployment for platform-specific setup and the policy reference.

GitHub organization and enterprise settings

Use GitHub organization and enterprise settings for account-level and service-side controls, such as Copilot access, model availability, preview feature eligibility, content exclusions, MCP registry policies, and organization-provided customizations.

These controls complement enterprise-managed settings and VS Code device policies rather than duplicating them. Administrators configure them on GitHub, and they follow the signed-in GitHub account and its organization or enterprise membership. Service-side restrictions apply alongside client and device policies: for example, disabling a model or turning off Editor preview features on GitHub prevents developers from using that model or feature even if client policies permit it.

In particular, turning off Editor preview features forces chat.customizations.marketplace.enabled Open in VS Code Open in VS Code Insiders and chat.customizations.copilotConnectors.enabled Open in VS Code Open in VS Code Insiders off, even though both default to true. Developers can't override this restriction in Settings. Other eligibility requirements and managed restrictions still apply when preview features are permitted.

Refer to Manage Copilot for your enterprise for configuration and reference information about these controls.

Understand precedence

Precedence applies at two levels: across the three management solutions, and across delivery methods within Copilot enterprise-managed settings. Configure an overlapping control in one system when possible, and run Developer: Policy Diagnostics to inspect the effective value and its source.

Across management solutions

When more than one management solution applies, controls layer in this order (highest precedence first):

  1. GitHub organization and enterprise settings: Act as a service-side boundary. If GitHub disables Copilot access, a model, or Editor preview features, client and device policies cannot re-enable it. As an exception for editor-managed MCP servers, a managed allowedMcpServers allowlist takes precedence over a registry-only policy (see Managed MCP allowlists and registry precedence).

  2. Copilot enterprise-managed settings: Take precedence over VS Code device policies when both configure the same control, without merging values.

  3. VS Code device policies: Apply when enterprise-managed settings do not configure that control.

  4. User and workspace settings: Apply when no policy or managed setting governs the control.

If two systems configure different controls, both controls apply.

Across managed-settings delivery methods

Within Copilot enterprise-managed settings, when the same key is delivered through more than one method, VS Code applies them in this order (highest precedence first):

  1. MDM-managed settings.
  2. Server-managed settings (after GitHub resolves any enterprise team overrides).
  3. File-based settings (managed-settings.json on the device).

For most keys, the value from the highest-precedence source wins. Some keys, including permissions.deny, permissions.ask, permissions.allow, sandbox, and strictPluginOnlyCustomization, combine restrictions from multiple sources in the most restrictive direction. See Precedence of deployment methods for the complete and current rules.

Control access and feature availability

Restrict AI features to approved GitHub organizations

Configured with: VS Code device policies

Set the ChatApprovedAccountOrganizations device policy to require developers to sign in with a GitHub account that belongs to an approved organization before AI features are activated.

Provide a JSON array of GitHub organization logins, or use ["*"] to allow any signed-in GitHub account. For example, in a Linux policy.json file (or with the same policy name and JSON array value in Windows Group Policy or a macOS configuration profile):

{
  "ChatApprovedAccountOrganizations": ["contoso", "contoso-research"]
}

The policy is fail-closed. AI features remain disabled until account policy data resolves and the signed-in account belongs to an approved organization. Run Developer: Policy Diagnostics to inspect the Account Policy Gate state.

Meet minimum VS Code version requirements

Configured with: Copilot enterprise-managed settings

The managed-settings service can require a minimum VS Code version before AI features are available. When the installed version does not meet the requirement:

  • Chat shows the required and installed versions and provides the appropriate update action.
  • The editor window shows a banner even when Chat is closed. Other editor features remain available.
  • The Agents window shows a blocking notice with an Open Editor Window action.

If built-in updates are disabled by policy, the notice directs the developer to contact an administrator. AI features become available after the installed version meets the requirement.

Control the Agent option and Agents window

Configured with: VS Code device policies

The ChatAgentMode device policy controls the chat.agent.enabled Open in VS Code Open in VS Code Insiders VS Code setting. Set it to false to disable the Agent option in the agents dropdown in the Chat view and make the Agents window unavailable. When agent mode is disabled by policy, the built-in Ask and deprecated Edit modes remain available.

The ChatAgentMode policy is not a blanket restriction on agent sessions. It does not remove Agent Host harnesses, such as Copilot, from the Session Target dropdown in the Chat view, so developers can still start agent sessions for those harnesses. Test the available harnesses as well as the dropdown before relying on this policy.

To control agent access at the account level, use GitHub organization and enterprise settings. To restrict what agent sessions can do, configure managed permission rules and sandboxing.

Control agent tool integrations

Configured with: VS Code device policies

Use these device policies to disable specific tool categories available to chat agents, without turning off chat or other built-in agent tools:

  • ChatAgentExtensionTools ( chat.extensionTools.enabled Open in VS Code Open in VS Code Insiders ): Set to false to prevent agents from using tools contributed by third-party extensions.

  • BrowserChatTools ( workbench.browser.enableChatTools Open in VS Code Open in VS Code Insiders ): Set to false to prevent agents from opening and interacting with pages in the integrated browser.

  • ChatPluginsEnabled ( chat.plugins.enabled Open in VS Code Open in VS Code Insiders ): Set to false to disable agent plugin integration completely. To permit only specific plugins or marketplaces instead, see Manage agent plugins and marketplaces.

Configure Copilot code review

Configured with: VS Code device policies

Copilot code review generates review comments and suggestions directly in the editor for selected code, uncommitted changes, and pull requests. Use these device policies to control which code review entry points are available:

  • CopilotReviewSelection ( github.copilot.chat.reviewSelection.enabled Open in VS Code Open in VS Code Insiders ): Set to false to disable code review for selected code in the editor.

  • CopilotReviewAgent ( github.copilot.chat.reviewAgent.enabled Open in VS Code Open in VS Code Insiders ): Set to false to disable the code review agent for uncommitted changes and pull requests.

Learn more about Copilot code review in the GitHub documentation.

Configure next edit suggestions

Configured with: VS Code device policies

Next edit suggestions (NES) predict and propose follow-up edits across a file in the editor based on a developer's recent changes, beyond standard ghost-text completions.

Set the CopilotNextEditSuggestions device policy ( github.copilot.nextEditSuggestions.enabled Open in VS Code Open in VS Code Insiders ) to false to disable next edit suggestions while keeping standard inline completions available. Learn more about next edit suggestions.

Enable or disable the copilot command

Configured with: VS Code device policies

VS Code includes a copilot command that starts GitHub Copilot CLI. When Copilot CLI isn't installed, the command offers to install it from GitHub. On Windows, setup can also add the command to PATH and install Copilot CLI.

Set the CopilotCliCommand device policy to false to turn off the command. This policy controls the chat.copilotCliCommand.enabled Open in VS Code Open in VS Code Insiders VS Code setting. When the policy is disabled:

  • New integrated terminals don't include the copilot command.
  • On Windows, setup doesn't show its GitHub Copilot CLI page or install Copilot CLI. The next time setup runs, for example during an update, it removes the copilot command from PATH. Until then, the command doesn't install Copilot CLI.

The policy doesn't affect a Copilot CLI installation that you deploy separately. To control which Copilot CLI version developers use and where it comes from, disable the policy and deploy Copilot CLI with your own software distribution tools. Learn more about installing GitHub Copilot CLI.

Whether developers can use Copilot CLI is controlled by your GitHub organization and enterprise settings, which Copilot CLI applies after sign-in.

Control GitHub environments

Configured with: VS Code device policies, GitHub organization and enterprise settings

Registering a development machine as a GitHub environment lets developers access its agent sessions from supported Copilot clients. Administrators can control this registration and connection path to meet remote-access and data-handling requirements while allowing approved cross-device work.

Set the ChatAgentHostGitHubEnvironments device policy to false to prevent sharing a machine as a GitHub environment and discovering or connecting to other registered machines through this feature. The policy controls chat.agentHost.githubEnvironments.enabled Open in VS Code Open in VS Code Insiders and requires VS Code 1.144 or later. Turning off Copilot preview features through organization policy also forces this setting off.

This control doesn't govern all remote connectivity. It isn't a blanket restriction on SSH or dev tunnels, and it doesn't configure other clients' policies. Review those access paths separately before treating it as an organization-wide remote-access boundary.

Control agent harnesses

Claude and Codex availability

Configured with: Copilot enterprise-managed settings, VS Code device policies

By default, the Claude and Codex harnesses are disabled in VS Code whenever Copilot enterprise-managed settings apply (through server-managed, MDM-managed, or file-based delivery). Because those harnesses cannot enforce Copilot's managed runtime controls, VS Code disables them automatically without deleting existing sessions. This restriction applies to harness availability, not to Claude or OpenAI models selected in a Copilot harness session.

Without a vscode.allowedHarnesses exception, the presence of any managed setting triggers this restriction, even if a rule list is empty or a feature is off (for example, permissions.disableBypassPermissionsMode, permissions.allow, permissions.ask, or permissions.deny including [], sandbox.enabled: false, or managed plugin and telemetry settings). User settings ( chat.agentHost.claudeAgent.enabled Open in VS Code Open in VS Code Insiders , chat.agentHost.codexAgent.enabled Open in VS Code Open in VS Code Insiders ), device policies (Claude3PIntegration: true, Codex3PIntegration: true), and separate provider credentials (a Claude API key or ChatGPT account) do not bypass it.

Starting with VS Code 1.147, you can permit one or both harnesses by listing the lowercase IDs claude and codex in vscode.allowedHarnesses through file-based or native MDM-managed settings (server-managed settings do not yet support this key):

{
  "vscode": {
    "allowedHarnesses": ["claude", "codex"]
  }
}

The list permits only the harnesses it names, and other entries are ignored. Setting [] or omitting vscode.allowedHarnesses keeps both harnesses disabled.

vscode.allowedHarnesses only lifts the default managed-settings restriction. Other controls still disable a harness, including vscode.temporaryAllowLocalHarness: false, turning off Editor preview features in GitHub organization or enterprise settings, and device policies (Claude3PIntegration or Codex3PIntegration set to false).

Warning

Permitting a harness does not make it enforce your enterprise-managed settings. Claude and Codex sessions run without Copilot's managed permission, sandbox, MCP, and plugin controls. Review your organization's requirements before permitting these harnesses.

Disable Claude or Codex with device policies

Configured with: VS Code device policies

If you do not use Copilot enterprise-managed settings, or want an explicit device-level restriction, use these VS Code device policies:

  • Claude3PIntegration ( chat.agentHost.claudeAgent.enabled Open in VS Code Open in VS Code Insiders and github.copilot.chat.claudeAgent.enabled Open in VS Code Open in VS Code Insiders ): Set to false to disable Claude agent sessions.

  • Codex3PIntegration ( chat.agentHost.codexAgent.enabled Open in VS Code Open in VS Code Insiders ): Set to false to disable Codex agent sessions.

Setting either device policy to true does not bypass the default managed-settings restriction above. Learn more about third-party agent harness requirements and setup.

For developers: if Claude or Codex is missing

If you are a developer and need access to one of these harnesses:

  1. Run Developer: Policy Diagnostics from the Command Palette to inspect the effective Claude3PIntegration and Codex3PIntegration policies and their sources.
  2. Contact the IT team that deployed the managed settings with the unavailable harness and the relevant policy values and sources.
  3. If you don't know who owns the settings, ask your IT help desk to route the request to the administrator responsible for Copilot enterprise-managed settings or device management.

You cannot restore access by changing your user or workspace settings.

Runtime policies and harness selection

Configured with: Copilot enterprise-managed settings, VS Code device policies

Enterprise-managed settings and device policies can require the Copilot harness, route to it automatically when runtime policies apply, or set a starting default. When multiple controls apply, they take precedence in this order:

Control Behavior in VS Code
vscode.temporaryAllowLocalHarness: false (1.143+) Prohibits Local, Claude, and Codex. Takes precedence over vscode.temporaryDefaultToLocalHarness: true and vscode.allowedHarnesses. Setting it to true does not override other policies.
vscode.temporaryDefaultToLocalHarness: true (1.142+) Suppresses automatic routing to the Copilot harness during migration off Local. Does not restore Claude or Codex. See Keep Local harness as default.
sandbox.enabled: true or nonempty permissions.deny (1.143+) Automatically requires the Copilot harness unless the temporary Local default applies.
ChatEditorPreferCopilotHarness (device policy) Prefers the Copilot harness when a new editor chat would otherwise use Local, without prohibiting other harnesses.

Other permissions.* settings and an empty permissions.deny list do not trigger automatic routing, although empty permission rule lists still affect tool approvals in Copilot harness sessions.

Automatic routing is separate from the default Claude and Codex restriction, which depends on the presence of managed settings. Use vscode.allowedHarnesses to permit those harnesses while enterprise-managed settings apply. For conversation and archive behavior when Copilot is required, see continue an existing Local conversation.

Keep Local harness as default

Configured with: Copilot enterprise-managed settings

Starting with VS Code 1.142, organizations can keep the Local harness The Local harness is deprecated and will be removed in February 2027. Move your workflows to the Copilot harness before then. Learn more about Local harness deprecation. as the default for new agent sessions and prevent automatic selection of the Copilot harness.

Set vscode.temporaryDefaultToLocalHarness to true in your enterprise-managed settings:

{
  "vscode": {
    "temporaryDefaultToLocalHarness": true
  }
}

This control suppresses automatic routing to the Copilot harness, including routing triggered by managed sandbox requirements or nonempty deny lists. It does not change explicit, remembered, or current harness choices, and it does not override vscode.temporaryAllowLocalHarness: false. Set vscode.temporaryDefaultToLocalHarness to false or remove the key to restore normal harness routing.

Warning

The Local harness does not enforce runtime-only sandbox and permission rules. Those managed rules continue to be enforced in Copilot harness sessions. Review the security impact before you use this temporary control.

Configure models and data handling

Set managed model defaults

Configured with: Copilot enterprise-managed settings

Give developers a consistent starting model without locking their choices. Managed model defaults take precedence over saved personal preferences for new conversations in both the Chat view and the Agents window. Developers can still change the model or tier within a conversation, and existing conversations keep their selections. Removing a managed default restores saved personal preferences for new conversations.

Set the top-level model managed setting to choose either:

  • A specific model ID: Starts new conversations on that available model.

  • Automatic selection ("auto"): Starts new conversations on Auto or Copilot Fusion. A value of "fusion" is also accepted as "auto", without enabling Fusion or granting access to an unavailable tier.

For automatic selection, starting with VS Code 1.144 you can also set fusionTier to choose the starting Auto or Fusion tier for Copilot harness sessions (not Local sessions). fusionTier takes precedence over the legacy autoTier setting:

fusionTier value Starting tier
"standard" Fusion Standard, or Auto Balance when Fusion is unavailable.
"high" Fusion High when available, otherwise Auto Intelligence.
"max" Fusion Max when available. If it isn't available, the runtime default remains in effect.
"unmanaged" No managed tier selection. The legacy autoTier setting is also ignored.

For example, add the following values to your enterprise-managed settings:

{
  "model": "auto",
  "fusionTier": "high"
}

To verify the model default, check Org default in the model picker and the briefcase indicator for chat.defaultModel Open in VS Code Open in VS Code Insiders in Settings. See Organization-managed model defaults.

Set a default chat model

Configured with: VS Code device policies

Set the ChatDefaultModel device policy to choose the default model for new conversations on managed VS Code devices. This policy controls chat.defaultModel Open in VS Code Open in VS Code Insiders and accepts auto, a model family name, or a full model ID.

Developers can select another model for an individual conversation. Reopened conversations keep their saved model.

For cross-client defaults delivered through Copilot enterprise-managed settings (which take precedence over ChatDefaultModel), see Set managed model defaults.

Control dictation data

Configured with: VS Code device policies

Use the following device policies to control whether dictation audio and transcripts leave the developer's device.

Policy Setting Behavior
DictationEnabled dictation.enabled Open in VS Code Open in VS Code Insiders Controls whether built-in dictation is available.
DictationModel dictation.model Open in VS Code Open in VS Code Insiders Selects an on-device model or the mai cloud transcription service.
DictationLLMCleanup dictation.experimental.llmCleanup Open in VS Code Open in VS Code Insiders Controls whether final transcripts are sent to a language model for cleanup.

To keep dictation audio on the device, set DictationModel to nemotron-3.5-asr-streaming-0.6b. In VS Code for the Web, where on-device transcription is not supported, this policy makes dictation unavailable.

To prevent transcript text from being sent to a language model, set DictationLLMCleanup to false. For more information, see Dictation privacy.

Govern agents, tools, and customizations

Configure managed MCP server access

Configured with: Copilot enterprise-managed settings, GitHub organization and enterprise settings

Use allowedMcpServers in Copilot enterprise-managed settings to limit which MCP servers developers can install and run. Use deniedMcpServers to block servers even when they match the allowlist. Configure these keys through a supported managed-settings delivery method, not in a developer's editor settings or mcp.json.

For example, the following managed settings permit remote servers under https://mcp.example.com/, except the blocked endpoint:

{
  "allowedMcpServers": [
    {
      "serverUrl": "https://mcp.example.com/*"
    }
  ],
  "deniedMcpServers": [
    {
      "serverUrl": "https://mcp.example.com/blocked"
    }
  ]
}

Each rule uses one matcher:

  • serverUrl matches a remote server's URL and supports * wildcards.
  • serverCommand matches a local server's exact command followed by its arguments, in order.
  • serverName matches the configured server name. The configuration author supplies this name, so it does not verify the command, endpoint, or publisher.

Prefer command or URL rules when you need to constrain what runs or where it connects. If the allowlist contains command rules, local servers must match a command rule rather than a name rule. If it contains URL rules, remote servers must match a URL rule.

Managed MCP allowlists and registry precedence

Configured with: Copilot enterprise-managed settings, GitHub organization and enterprise settings

An MCP registry is a catalog for discovering and installing servers. A managed allowlist determines which servers your organization permits. Starting with VS Code 1.145, an enterprise-managed allowlist takes precedence over registry-only access for editor-managed MCP servers:

Server configuration Result
Matches the managed allowlist but is absent from the registry. Permitted, unless a deny rule or MCP disablement blocks it.
Appears in the registry but does not match the managed allowlist. Blocked. Registry membership does not grant an exception.

The registry remains available for discovery. These precedence rules apply to editor-managed servers, including Local harness The Local harness is deprecated and will be removed in February 2027. Move your workflows to the Copilot harness before then. Learn more about Local harness deprecation. sessions, not servers owned by an Agent Host.

  • An explicit allowedMcpServers: [] blocks all servers. It does not fall back to registry approval.
  • Removing allowedMcpServers restores the effective access mode, including registry-only access, and any deny rules.
  • Deny rules and explicit MCP disablement, such as chat.mcp.access Open in VS Code Open in VS Code Insiders set to "none", still take priority over the allowlist.

User settings and workspace server definitions cannot broaden the enterprise-managed allowlist or remove its deny rules. Commands and URLs are checked again after variable resolution. Configuration edits must still match the managed rules, even if the server keeps its registry name.

See Verify applied managed settings to inspect the effective configuration and its source.

Understand MCP registry policy refresh failures

Configured with: GitHub organization and enterprise settings

GitHub organization and enterprise policies can restrict MCP access to servers in the configured registry. Starting with VS Code 1.145, a temporary network or service failure while refreshing that policy does not remove a previously received restriction. VS Code retains the last known registry URL and access restriction.

A response confirming that no registry applies removes the cached registry restriction. Signing out or switching accounts also clears it.

Important

Retaining a cached policy is not a startup enforcement guarantee. If no registry policy is cached and the first fetch fails, registry policy alone does not restrict MCP access. For restrictions that must apply independently of a successful GitHub policy fetch, configure the ChatMCP device policy.

This refresh behavior applies to editor-managed MCP servers. It is separate from managed MCP allowlist precedence and does not describe enforcement for Agent Host-owned servers.

Enable or disable hooks

Configured with: VS Code device policies, Copilot enterprise-managed settings

Hook controls depend on the selected harness. For Copilot harness sessions, use Policy Hooks and the managed hook-source controls below.

The ChatHooks policy enforces chat.useHooks Open in VS Code Open in VS Code Insiders . In Copilot sessions, setting it to false stops repository hooks and hooks declared by custom agents. It does not stop user hooks, policy hooks, or hooks that the runtime loads from installed plugin folders. Do not treat it as a global hook-disable policy. Review hook execution controls and verify the sources your developers use.

Note

For Local harness sessions: The Local harness is deprecated and will be removed in February 2027. Move your workflows to the Copilot harness before then. Learn more about Local harness deprecation. Set the ChatHooks policy to false to disable hook execution in that harness.

Verify Policy Hook coverage

Configured with: Copilot enterprise-managed settings

Copilot Policy Hooks apply to Copilot harness sessions, which use the Copilot SDK hook implementation. Confirm that developers select Copilot from the Session Target UI control before relying on these hooks for enforcement. Test the required hook behavior in the session that will perform the work.

Local harness The Local harness is deprecated and will be removed in February 2027. Move your workflows to the Copilot harness before then. Learn more about Local harness deprecation. sessions do not load SDK Policy Hooks. Configuring hooks for one harness does not enforce them in another harness. See hook compatibility.

When moving to Copilot, inventory policy hooks, managed plugins, and any permitted user or repository hooks. Convert and test their scripts as well as their configuration. See Migrate hooks.

Test failures and timeouts separately. The Copilot command-hook reference documents timeouts as fail-open even for policy hooks. A requirement for complete audit coverage or fail-closed enforcement therefore needs more than the presence of a hook file.

Warning

Copilot policy hooks run on the host, outside the session sandbox. Keep their scripts in administrator-controlled locations. Do not promote a repository hook to a policy hook while retaining a workspace-controlled script path; that would run editable workspace code outside the sandbox. See policy hooks and sandboxed sessions.

Restrict hook sources

Configured with: VS Code device policies, Copilot enterprise-managed settings

Set ChatAllowManagedHooksOnly to allow hooks only from enterprise-managed sources and plugins that policy force-enables. Set ChatStrictPluginOnlyCustomization when you also need to block standalone user and workspace skills, agents, instructions, and MCP servers.

Plugin distribution is a separate decision. To force-enable plugins or govern marketplaces across supported Copilot clients, use the plugin controls in the enterprise-managed settings reference.

Manage agent plugins and marketplaces

Configured with: VS Code device policies, Copilot enterprise-managed settings

Use the following VS Code device policies to govern agent plugins and customization discovery in VS Code:

  • ChatEnabledPlugins force-enables or force-disables named plugins.
  • ChatExtraMarketplaces adds plugin marketplaces.
  • ChatStrictMarketplaces restricts plugin installation to approved marketplace sources. An empty list blocks installation from all marketplaces.
  • ChatCustomizationMarketplace controls the unified Browse discovery surface. When disabled, marketplace discovery remains available in the existing customization management pages.
  • ChatCopilotConnectors controls connector discovery and whether connected connector MCP servers are available to Copilot sessions.

Plugins blocked by policy remain visible but appear disabled. In Customize > Plugins, policy-managed plugins are identified as managed by policy, and their toggles are locked. Marketplaces managed by policy are identified in the marketplace picker.

For cross-client plugin governance instead of VS Code-only policy, follow Manage plugin marketplaces and plugins to configure Copilot enterprise-managed settings.

Enterprise-managed plugin settings only require or block plugins. They don't set optional defaults.

For optional project-specific plugins, use repository defaults. Members can turn off these defaults unless managed policy requires the plugin.

The enterprise-managed strictKnownMarketplaces setting also disables built-in marketplaces. Configure the permitted sources explicitly.

Configure agent tool approvals

Configured with: Copilot enterprise-managed settings, VS Code device policies

In Copilot harness sessions, enterprise-managed permissions.* settings provide two layers of control: session permission levels (which presets developers can choose in the permissions picker) and permission rule lists (per-operation deny, ask, and allow rules for shell commands, files, and network domains). For editor-specific approval controls, use the VS Code device policies below.

Manage permission levels

Configured with: Copilot enterprise-managed settings

Control which permission levels developers can select and the initial level for new sessions:

Managed setting Effect in VS Code
permissions.disableBypassPermissionsMode Set to "disable" to disable Allow all in the permissions picker.
permissions.disableAssistedPermissionsMode Set to true to disable Assisted permissions in the permissions picker.
permissions.defaultMode Sets the initial permission level. Supported values are "manual", "assisted", and "allow-all".

For example, start sessions with Assisted permissions when available, while preventing Allow all:

{
  "permissions": {
    "disableBypassPermissionsMode": "disable",
    "disableAssistedPermissionsMode": false,
    "defaultMode": "assisted"
  }
}

If the configured default is unavailable, new sessions use Manual permissions. Setting a default doesn't prevent developers from switching to another permission level that the organization allows.

In both the editor and the Agents window, supported permission levels restricted by policy remain visible but disabled. Unsupported permission levels aren't shown.

These managed settings control session permission levels. The ChatToolsAutoApprove device policy controls global auto-approval separately. Refer to the enterprise-managed settings reference for configuration and deployment details.

Manage permission rule lists

Configured with: Copilot enterprise-managed settings

Configure permissions.deny, permissions.ask, and permissions.allow as JSON arrays of rule strings (for example, "Shell(git push *)", "Read(~/.ssh/**)", "Edit(/src/**)", or "Domain(api.github.com)") to govern individual tool calls.

Managed setting Effect in VS Code
permissions.deny Blocks matching operations without showing an approval prompt.
permissions.ask Requires a fresh, one-time confirmation (Allow Once or Skip) for matching operations.
permissions.allow Permits matching operations to run without prompting.

Rules evaluate in deny > ask > allow order. Selectors match shell commands (Shell(...), Bash(...), PowerShell(...)), file reads and edits (Read(...), Edit(...)), and network origins (Domain(...)). For the full rule syntax and multi-source combination rules, see managed permission rules in the enterprise-managed settings reference.

When no managed rule lists are configured, VS Code uses its normal approval flow based on the session's permission level and saved approvals. Declaring managed rule lists changes how unmatched tool calls behave:

  • Any managed permissions.allow list turns on approval-by-default for unmatched calls, including []. An empty list permits nothing, so every shell, file, URL, MCP, and custom-tool call prompts for approval.
  • Declaring permissions.deny or permissions.ask also turns on approval-by-default for unmatched shell, file, and URL requests. For server-managed settings, an empty deny or ask list ([]) has the same effect whenever the key is present.
  • Managed approval prompts are strictly one-time. They offer only Allow Once and Skip. Selecting Allow all, using Assisted permissions, or relying on saved session or persistent approvals does not settle these prompts, so developers see a prompt every time.
Caution

Avoid {"overridable": []} when piloting permission rules with server-managed team overrides. In server-managed deployments, the value inside overridable in copilot/managed-settings.json is the enterprise default delivered to every user outside a mapped team. Unlike scalar keys such as model, permission list keys have no "unmanaged" value. Setting {"overridable": []} at the enterprise level to pilot rules for one team delivers [] to everyone else and prompts non-members for one-time approval on every tool call. Omit permissions.allow, permissions.ask, and permissions.deny from copilot/managed-settings.json unless you intend to enable approval-by-default across the enterprise. To test rules with a pilot group first, deliver them to that group through MDM or file-based settings instead. See Override enterprise-managed settings for teams.

Define managed shell permission rules

Configured with: Copilot enterprise-managed settings

Use regular expressions in shell permission rules to match command alternatives or word boundaries with a single rule. Shell(...), Bash(...), and PowerShell(...) rules accept JavaScript regular expressions written as /pattern/flags in permissions.deny, permissions.ask, and permissions.allow.

For example, require approval for commands that start with git push or git pull:

{
  "permissions": {
    "ask": ["Shell(/^git\\s+(push|pull)\\b/)"]
  }
}

Escape backslashes in JSON strings, as shown by \\s and \\b in this example.

Disable global auto-approval

Configured with: VS Code device policies

Set the ChatToolsAutoApprove device policy to false to prevent developers from enabling global auto-approval. While this policy is set, tool confirmations offer only one-time approval, and tool approvals that developers saved earlier aren't applied.

Caution

Global auto-approval bypasses security prompts for tool invocations. Disable it unless your threat model explicitly supports this behavior.

Limit automatic approval for specific tools

Configured with: VS Code device policies

Use the ChatToolsEligibleForAutoApproval device policy to configure tool approval eligibility. This policy controls chat.tools.eligibleForAutoApproval Open in VS Code Open in VS Code Insiders , but its enforcement differs by harness:

  • For Local harness The Local harness is deprecated and will be removed in February 2027. Move your workflows to the Copilot harness before then. Learn more about Local harness deprecation. sessions, setting a tool to false requires manual approval for that tool and removes its auto-approval option.

  • For Copilot harness sessions, a tool marked false removes Allow all from the permissions picker for the whole session. It does not require confirmation for each call to that tool. Assisted permissions and saved session approvals can still approve it.

For Copilot session-level restrictions, use managed permission levels. Verify the actual approval behavior in the intended harness. A policy value in diagnostics alone does not demonstrate per-call confirmation.

Configure terminal auto-approval

Configured with: VS Code device policies

Set the ChatToolsTerminalEnableAutoApprove device policy to false to turn off rule-based terminal auto-approval. For Local harness The Local harness is deprecated and will be removed in February 2027. Move your workflows to the Copilot harness before then. Learn more about Local harness deprecation. sessions, this policy does not prevent automatic approval of sandboxed commands or approval through session-level permissions.

For Copilot harness sessions, the policy requires approval for commands that run through the built-in shell tool. Set ChatAgentHostCustomTerminalTool to false to keep these sessions on that tool.

Learn more about tool approval.

Configure organization-level custom instructions

Configured with: GitHub organization and enterprise settings

Organization administrators create custom instructions on GitHub. When github.copilot.chat.organizationInstructions.enabled Open in VS Code Open in VS Code Insiders is true, supported Copilot sessions in VS Code include organization instructions that the signed-in account can access.

Learn how to add custom instructions for your organization.

Configure organization-level custom agents

Configured with: GitHub organization and enterprise settings

Organization administrators create custom agents on GitHub. When github.copilot.chat.organizationCustomAgents.enabled Open in VS Code Open in VS Code Insiders is true, organization and enterprise agents that the signed-in account can access appear in the agents dropdown.

Learn how to create custom agents for your organization.

Configure security and observability

Configure agent sandboxing

Configured with: Copilot enterprise-managed settings

For Copilot harness sessions, use the session sandbox controls and verify the effective sandbox policy on the machine where commands run.

Use the shared sandbox key in enterprise-managed settings to enforce supported minimum sandbox restrictions. Follow the sandbox schema and minimum client versions. Verify policy delivery and the effective sandbox policy where the agent runs, including remote hosts and containers. Local harness The Local harness is deprecated and will be removed in February 2027. Move your workflows to the Copilot harness before then. Learn more about Local harness deprecation. sessions cannot enforce these runtime-only controls.

Sandbox device policies for Local harness sessions

The following VS Code device policies are deprecated and apply to Local harness The Local harness is deprecated and will be removed in February 2027. Move your workflows to the Copilot harness before then. Learn more about Local harness deprecation. sessions. They do not enforce sandboxing for Copilot harness sessions.

Policy Local-session behavior
ChatAgentSandboxEnabled Requires or disables sandboxing for supported terminal commands.
ChatAgentSandboxAllowNetwork Controls outbound network access for sandboxed terminal commands.
ChatAgentSandboxAllowUnsandboxedCommands Controls whether a command can run outside the sandbox after user confirmation.

Local harness The Local harness is deprecated and will be removed in February 2027. Move your workflows to the Copilot harness before then. Learn more about Local harness deprecation. sessions approve sandboxed terminal commands automatically. The terminal auto-approval policy controls rule-based approval, not sandbox auto-approval.

Configure agent network filtering

Configured with: VS Code device policies

Set the ChatAgentNetworkFilter device policy to true to restrict network access according to the allowed and denied domain policies.

Use ChatAgentAllowedNetworkDomains for permitted domain patterns and ChatAgentDeniedNetworkDomains for blocked patterns. Denied domains take precedence.

In Local harness The Local harness is deprecated and will be removed in February 2027. Move your workflows to the Copilot harness before then. Learn more about Local harness deprecation. sessions, network filtering applies to the fetch tool and Integrated Browser. In Copilot harness sessions, these policies also apply to the Integrated Browser.

When the ChatAgentNetworkFilter policy is true and the ChatAgentAllowedNetworkDomains policy contains permitted domains, Copilot harness sessions block the runtime's web fetch tool from accessing domains outside that list, even with Allow all selected. This restriction does not require sandboxing.

Terminal coverage depends on the selected harness, platform, and sandbox configuration. See Configure sandbox network access.

Restart VS Code after you change network filtering settings so new Integrated Browser sessions use the updated policy.

Configure managed OpenTelemetry

Configured with: Copilot enterprise-managed settings

The enterprise-managed telemetry block configures OpenTelemetry export for both the Copilot Chat extension and the Agent Host without requiring developers to opt in through personal OTel settings. After a configuration change, VS Code restarts the local Agent Host automatically, while the extension might offer Reload Window. For editor-only CopilotOtel* device policies instead of cross-client managed settings, see Configure telemetry export with OpenTelemetry.

Starting with VS Code 1.143, Copilot harness sessions support two additional options:

  • telemetry.filePath: Saves Agent Host telemetry to a JSONL file without running an OTLP collector. A managed file destination takes precedence over collector configuration (and telemetry.headersProvider does not apply) unless managed telemetry.enabled is false, which turns off export. See Export managed telemetry to a file.

  • telemetry.headersProvider: Generates and refreshes HTTP headers for OTLP export to supply collector metadata, route telemetry, or authenticate with the collector. See Configure dynamic headers.

Keep these rules in mind when deploying managed telemetry:

  • Whole-block precedence: The highest-precedence delivery source that supplies telemetry owns the entire block. Omitted fields do not inherit values from lower-precedence sources.

  • Capture controls and environment variables: Identity capture is off by default and independent of content capture. Review both controls before deployment, and remove conflicting OpenTelemetry environment variables from managed devices.

For the configuration schema and supported clients, see telemetry in the enterprise-managed settings reference.

Configure telemetry export with OpenTelemetry

Configured with: VS Code device policies

Use the CopilotOtel* device policies to control OpenTelemetry export for Copilot in VS Code. These policies cover export enablement, the collector endpoint and protocol, content and identity capture, the service name, resource attributes, and exporter headers.

For the complete list of policies and the settings they control, see the enterprise policy reference.

Verify an AI rollout

Follow the deployment pilot checklist before expanding access. For AI workflows, record the client, signed-in account, harness, and execution host used in each test.

  • Confirm the effective policy values and their sources with Developer: Policy Diagnostics. A delivered value does not establish that every harness enforces it in the same way.
  • Test an approved workflow and a harmless operation that policy should block in the intended harness. Check actual execution and approval behavior, not only the agent's response.
  • For sandbox requirements, inspect the effective sandbox policy where commands run. Repeat checks on approved remote hosts and containers.
  • Give developers a support contact. Use administrator troubleshooting when delivery, account eligibility, or enforcement differs from expectations.

For an existing Local deployment, follow Move from the Local to the Copilot harness for the compatibility checklist and migration procedure.

Verify applied managed settings

Run Developer: Policy Diagnostics in VS Code to inspect effective policy values and their sources. For more information, see Verify policy enforcement.

If the diagnostics show a server-managed source with an unexpected value, check copilot/managed-settings.json, copilot/team-mappings.json, the mapped file under copilot/teams/, and the user's enterprise team memberships. GitHub resolves team overrides before it delivers the server-managed settings to VS Code.

For GitHub-side validation errors or delivery troubleshooting, follow Validate server-managed settings.

Security considerations

AI-powered development features can perform actions with user-level permissions. Review AI security considerations before enabling agents or auto-approval.

For Copilot security, privacy, compliance, and transparency information, see the Copilot Trust Center FAQ.