VS Code as a Managed Endpoint
Policy is the part of an AI coding workflow an administrator can pin without asking the developer. This page covers what VS Code policy can hold, how it is delivered and overridden, where it stops holding, and how to prove on one machine that the value you set is the value the editor is running.
Scope of this page
What policy can and cannot pin
Policy governs the editor. It reaches the update channel, the telemetry level, which extensions may install, whether agent mode exists at all, which MCP servers can be addressed, and whether a tool call can be approved without a person. There is nothing exotic about that list: every item is a setting the editor already reads, which is exactly why an administrator can pin it. What policy does not reach is the work: not what the model returns, which files the agent reads inside a repository, whether a folder is trusted, which image a remote session boots, or what a provider retains afterwards. A pinned editor is neither a data-loss-prevention control nor a network control; it decides which affordances exist for everything else to use.
| Area | What policy governs | Why an organisation cares |
|---|---|---|
| Updates | UpdateMode |
An editor that upgrades itself mid-project changes behaviour without a review, including the behaviour an agent depends on. |
| Marketplace | ExtensionGalleryServiceUrl, AllowedExtensions |
The gallery is the largest code-execution path onto a developer's machine, and an AI extension is code with the editor's privileges. |
| Extension updates | ExtensionsAutoUpdate, ExtensionsAutoUpdateDelay |
Silent updates change what runs in the editor between one review and the next. |
| Telemetry | TelemetryLevel, EnableFeedback |
Outbound data from the editor is a policy question before it is a privacy question. |
| AI features | ChatAgentMode, ChatDefaultConfiguration, ChatApprovedAccountOrganizations |
An agent executes. The default posture of a session decides how often a human is in the loop. |
| Workspace trust | No policy exists | The folder a developer opens decides whether the workspace may run code, and that decision stays with the user. |
| Default extensions | No policy exists; pre-install is Windows only | You cannot install a baseline extension set by policy on every platform, so a baseline is a build artefact, not a setting. |
How policy is delivered per platform
Three mechanisms, one behaviour: a value the editor reads at startup and that no settings file in the chain can override.
| Platform | Mechanism | Where the value lives |
|---|---|---|
| Windows | ADMX and ADML templates shipped in the product's policies folder, installed to C:\Windows\PolicyDefinitions with the ADML under the locale subfolder |
Registry: Software\Policies\Microsoft\VSCode |
| macOS | A configuration profile (.mobileconfig) carrying key and value pairs |
A configuration profile. The documentation does not state a preferences domain, so this page prints none: treat the domain as supplied by the profile you deploy |
| Linux | JSON policy file | /etc/vscode/policy.json |
A policy value overrides default, user and workspace settings, and a computer-level policy beats a user-level one. Neither a workspace nor a user setting can grant what the policy forbids; the full chain is in the precedence section below.
The Windows template carries a navigation discrepancy worth writing into a runbook rather than resolving from memory. Microsoft's page gives two parent paths for the same settings: the Active Directory instructions say Administrative Templates then Visual Studio Code, and the Local Group Policy Editor instructions say Administrative Templates then Microsoft VS Code. Find the node in your own central store before the click-path goes into a change record.
On Windows the template writes into the policy registry key. The export below carries the string-valued policies only: a boolean policy is written by whichever value its enabledValue or disabledValue element declares in the ADMX, so read the shipped template rather than assuming a dword.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\VSCode]
"UpdateMode"="none"
"TelemetryLevel"="off"Get-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\VSCode' |
Select-Object UpdateMode, TelemetryLevelOn macOS the value arrives inside a configuration profile, which is the artefact to sign and deploy. The fragment names no preference domain because the documentation does not state one, and its pairs sit one level shallower than in a real profile, where the domain is the outer key. Read back what the device holds, then what it resolved.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadDisplayName</key>
<string>VS Code policy</string>
<key>PayloadIdentifier</key>
<string>com.example.vscode.policy</string>
<key>PayloadType</key>
<string>Configuration</string>
<key>PayloadUUID</key>
<string>00000000-0000-0000-0000-000000000000</string>
<key>PayloadVersion</key>
<integer>1</integer>
<key>PayloadContent</key>
<array>
<dict>
<key>PayloadType</key>
<string>com.apple.ManagedClient.preferences</string>
<key>PayloadIdentifier</key>
<string>com.example.vscode.policy.preferences</string>
<key>PayloadUUID</key>
<string>11111111-1111-1111-1111-111111111111</string>
<key>PayloadVersion</key>
<integer>1</integer>
<!-- The profile's preference domain is the outer key of the dict
below and comes from the profile your MDM ships. No domain is
documented, so none is printed here: the pairs are shown one
level shallow. -->
<key>PayloadContent</key>
<dict>
<key>UpdateMode</key>
<string>none</string>
<key>TelemetryLevel</key>
<string>off</string>
</dict>
</dict>
</array>
</dict>
</plist># the configuration profiles this device holds
sudo profiles show -type configuration
# the values that resolved, once the profile's domain is known
defaults read "/Library/Managed Preferences/<domain>" UpdateMode
defaults read "/Library/Managed Preferences/<domain>" TelemetryLevelOn Linux the file is the policy, which makes it the easiest to deploy and the easiest to ship broken. What the editor will read, and whether it parses, is the whole verification story.
{
"UpdateMode": "none",
"TelemetryLevel": "off"
}# the file the editor reads at startup
cat /etc/vscode/policy.json
# a value that does not parse is silently not applied, so test the parse
python3 -m json.tool /etc/vscode/policy.json > /dev/null && echo "valid JSON"The policy surface
The identifiers below are the ones an administrator actually sets. Each row gives the policy identifier exactly as the reference prints it, the setting it overrides where one is documented, and the values the documentation gives. A row that says a value list is not documented is stating a fact about the reference, not leaving a gap for a guess. Rows are grouped by the question they answer.
Updates, telemetry and the supply chain
| Identifier | Setting | Values and limits |
|---|---|---|
UpdateMode |
update.mode |
default, start, manual, none |
ExtensionsAutoUpdate, ExtensionsAutoUpdateDelay |
extensions.autoUpdate, plus a delay in hours |
The policy page gives no value list. The shipped setting is on or off, so read the ADMX for the spelling rather than copying one from a blog post. |
TelemetryLevel |
telemetry.telemetryLevel |
all, error, crash, off |
EnableFeedback |
telemetry.feedback.enabled |
boolean |
ExtensionGalleryServiceUrl |
the gallery URL | a URL. There is no documented boolean that blocks the marketplace. |
AllowedExtensions |
extensions.allowed |
publisher or extension id mapped to a boolean; "*": false blocks everything the list does not name, and a more specific entry overrides the wildcard |
Agents, MCP, auto-approval and the account gate
| Identifier | Setting | Values and limits |
|---|---|---|
ChatAgentMode |
chat.agent.enabled |
boolean. Setting it false removes Agent from the dropdown and disables the Agents window, but does not remove Agent Host session targets such as Copilot. |
ChatAgentExtensionTools |
chat.extensionTools.enabled |
Blocks extension-contributed tools while keeping built-in and MCP tools available. It narrows which tools exist, not what any remaining tool may do. |
ChatMCP |
chat.mcp.access |
values conflict across Microsoft pages. See the note below before you set it. |
ChatAllowedMcpServers, ChatDeniedMcpServers |
allow and deny lists | lists of servers |
ChatAllowManagedMcpServersOnly |
managed servers only | boolean |
McpGalleryServiceUrl |
the MCP registry URL | a URL, for a private registry |
McpEnterpriseManagedAuthIdp |
identity provider for managed MCP authentication | an IdP |
ChatToolsTerminalEnableAutoApprove |
terminal auto-approve | boolean |
ChatToolsAutoApprove |
global auto-approve | The documentation calls global auto-approve "extremely dangerous and is never recommended". |
ChatToolsEligibleForAutoApproval |
per-tool map | a map of tools to whether auto-approval may apply |
ChatDefaultConfiguration |
chat.defaultConfiguration |
mode interactive, plan, autopilot; approvals manual, assisted, allowAll |
ChatApprovedAccountOrganizations |
no setting id is listed | a JSON array of organisation logins; ["*"] accepts any. A non-empty list is fail-closed: AI features stay off until sign-in and account-side policy resolve. |
Claude3PIntegration, Codex3PIntegration |
chat.agentHost.* |
boolean, per third-party harness |
ChatMCP has no single documented value list
registryOnly and off for this policy. The
enterprise-managed-settings page gives chat.mcp.access the value "none". A shipped ADMX
test fixture enumerates none, registry and all. Those three do not agree, so
this page does not print one authoritative set. Open the VSCode.admx that ships with the build you
deploy, read the enumeration it carries, and set the value that file accepts. If you cannot read the template on the
machine you are configuring, do not set this policy and expect it to work.
Sandbox and network filtering
| Identifier | Setting | Values and limits |
|---|---|---|
ChatAgentSandboxEnabled, ChatAgentSandboxAllowNetwork, ChatAgentSandboxAllowUnsandboxedCommands |
chat.agent.sandbox.* |
All three are deprecated. They apply to Local harness sessions and do not enforce sandboxing for Copilot harness sessions, where the Copilot enterprise-managed sandbox key is the control. Do not build a new control on them, and do not read any of them as the egress control: the setting that governs outbound access is chat.agent.sandbox.network.allowNetwork, which defaults to true. |
ChatAgentNetworkFilter, ChatAgentAllowedNetworkDomains, ChatAgentDeniedNetworkDomains |
outbound host allow and deny | a boolean switch plus domain lists, wildcards accepted |
The OpenTelemetry policy family is deliberately absent: its endpoint and content-capture keys belong to the platform and operating pages, and its capture defaults are a separate decision from whether the editor runs an agent.
Settings precedence
Settings resolve in a fixed order: default, then user, then workspace, then the remote or container target. Each layer overrides the one before it, which is why committing a workspace settings file is a real act rather than a convenience: it changes what every collaborator's editor does with that folder, and it is reviewable in a pull request.
Policy is not a rung on that ladder. It sits outside the chain and overrides the default, user and workspace layers, and a computer-level policy wins over a user-level one. The consequence runs both ways: a workspace cannot grant what policy forbids, and a user cannot re-enable by hand what a policy turned off. A workspace setting can tighten behaviour and never loosen it past a pinned value.
The chain then restarts inside a remote target, which is why the ladder has four rungs and not three. A dev container, a WSL distribution, an SSH host or a tunnel resolves its own user and workspace settings, and the device policy on the laptop is not part of that resolution.
Where policy sits in the settings chain
Scroll sideways to see the whole diagram
The file below is what a team can commit. It is workspace defaults, not policy: it holds only while the folder is open, any collaborator can edit it in a branch, and a pinned value overrides it rather than the other way round.
{
"telemetry.telemetryLevel": "off",
"telemetry.feedback.enabled": false,
"update.mode": "manual",
"chat.agent.enabled": false
}The extension supply chain
Extensions are the part of the editor that executes code on the developer's machine, and an AI assistant is an extension. The documented controls here are the least like what people expect. The policy named for the gallery, ExtensionGalleryServiceUrl, is a URL: it relocates where the editor fetches extensions from, which is what makes a private marketplace possible. There is no documented boolean that blocks the public gallery outright.
The allow-list is the mechanism that actually narrows the set. AllowedExtensions maps publisher or extension ids to
booleans, so a value of "*": false denies everything the list does not name, and a more specific entry
overrides the wildcard. It is also the only documented way to block the Copilot extensions themselves, which is
worth saying plainly because the search for a Copilot-specific "off" policy ends in the wrong place. An allow-list
is a positive list you own, so it needs an owner and a review cadence or it becomes a list nobody dares change.
ExtensionsAutoUpdate and its delay decide whether the set you allowed is the set running a week later; turning auto-update off makes the approved set stable and makes every security fix a deployment you must perform, so a private marketplace is the pattern that keeps both properties. Pre-installing extensions from a bootstrap extensions folder is Windows only, so it cannot be the cross-platform baseline, and there is no default-extension-installation policy on any platform.
AI features and telemetry
The AI controls split into three groups, and confusing them produces a policy set that reads stronger than it is. The first switches surfaces: ChatAgentMode is a boolean whose false value removes Agent from the dropdown and disables the Agents window. The second sets the posture a session starts in: ChatDefaultConfiguration pins the mode, interactive, plan or autopilot, and the approval level, manual, assisted or allowAll.
The third decides who is eligible at all, and it is the closest thing to a kill switch without looking like one.
ChatApprovedAccountOrganizations is a JSON array of organisation logins, with no setting id listed in the reference.
A list containing ["*"] accepts any account; a non-empty list that names organisations is fail-closed,
so AI features stay off until sign-in and account-side policy resolution succeed. An organisation that wants AI off
for everyone not explicitly approved should reach for this rather than a stack of feature switches: it fails in the
direction a security control should fail.
Telemetry is two policies rather than one. TelemetryLevel takes all, error, crash or off, and off is the only value that stops the crash channel as well as usage data. EnableFeedback is separate and boolean, so pin both if nothing is to leave the editor. Neither touches what the assistant sends to a model provider; that traffic is the provider's contract and the account gate.
No single policy disables all AI, and "set the Copilot policy to off" is not an instruction anyone can follow. The
nearest levers are the account gate, ChatAgentMode for agents, ChatMCP for MCP access, and AllowedExtensions with
"*": false for the extensions.
Permissions and approvals
Approvals decide whether an action runs; sandboxing, covered next, decides what the action can reach once it does. This section is the first layer as the documentation draws it.
In a Copilot harness session the gate can be answered four ways, and they differ only in what answers it. Manual permissions uses your configured tool, URL and terminal approval settings, so anything the settings do not approve waits for a person. Assisted permissions puts a language-model judge in front of each tool call and asks you only when the judge does not approve; the documentation is explicit that this level is not a security boundary, because a model-based risk assessment can make mistakes and approve a call that deserved the question. Allow all runs every call without confirmation. Autopilot does the same and keeps working until it decides the task is complete, so it also removes the pauses at which you would have noticed a wrong direction.
Which of these controls you are offered depends on the harness and on code isolation. In a Copilot harness session Autopilot is an agent mode chosen from the mode picker; in a Local harness session it is a permission level chosen from the same picker as the others.
| Permission level | What answers the gate | What it changes about reach |
|---|---|---|
| Manual permissions | Your tool, URL and terminal approval settings. Anything not auto-approved asks. | Nothing. |
| Assisted permissions | A language-model judge assesses each call; calls it does not approve ask. | Nothing. |
| Allow all | Nothing. Every tool call runs without confirmation. | Nothing. |
| Autopilot | Nothing, and the agent keeps iterating until it judges the task complete. | Nothing. |
The third column matters most. A permission level decides who answers the gate and never what lies beyond it, which is why an enabled sandbox keeps restricting file system and network access even under Allow all. The sandbox does not cover every tool, so tool and URL approvals remain the control for everything that does not start a process.
Terminal commands get their own treatment because the editor exposes them through a single tool. Rather than grant
that tool unrestricted approval, approval is evaluated per command: common read-only commands run, commands such as
rm and del ask, and rules added to the terminal auto-approve setting change that per command,
including rules written as a regular expression between slashes. Rules are matched against each subcommand, so a
compound command is approved only when every subcommand matches an allow rule and none matches a deny rule. A rule
set to false requires approval rather than blocking the command.
That parsing is best-effort, which the documentation states as a limit rather than a footnote. Shell aliases, quote concatenation and complex shell syntax can produce a command the rules do not read the way you did; the PowerShell and bash grammars may not identify every subcommand, zsh and fish commands are parsed with the bash grammar, and file write detection is limited enough that an obfuscated command can evade matching. A rule list is a convenience for the commands you have thought about, and sandboxing is the answer for the ones you have not.
Tool approvals are granted at three scopes: session, workspace and user. The session scope exists so that elevated trust expires, which is why the security baseline recommends granting terminal and tool permissions at the session level rather than at workspace or user level. A workspace grant follows the project and a user grant follows the person across projects, so a broad approval is a decision about every repository that person will open rather than about the one in front of them. The scope offered depends on the tool and the harness, and the approval covers the input shown in the prompt, which is why the parameters are worth reading before choosing a wider one.
Fetching a URL is two decisions rather than one. The first is whether to contact the domain at all, and that is where the Trusted Domains list applies: a domain on the list does not require request approval. The second is whether the retrieved content is added to the model's context, and that is the step that matters for prompt injection, because a page the agent was sent to fetch can carry instructions aimed at the agent rather than information for it. Approving the request does not approve the response. The approvals page sets the two steps out for Local harness sessions and describes a Copilot harness web fetch as an approval scoped to the displayed host, so treat the response review as harness-dependent rather than universal.
File changes are reviewed in a working set with Keep and Undo per change, and it works without Git. It tracks edits made through the supported edit tools only, so a file written by a terminal command never appears in it and has to be reviewed separately. Keep is also narrower than it sounds: it acknowledges a change that is already saved to disk, and it is not approval before execution. The approval happened earlier, or did not.
Two built-in signals tell you when an automation is looser than you assumed. Any auto-approved tool call or terminal command produces an information message that links the setting which enabled it, which answers the question of why nothing asked. And when an advanced mode bypasses the normal safety checks, the editor shows a warning banner and requires explicit consent; the first selection of Assisted permissions, Allow all or Autopilot raises a confirmation dialog to the same end.
Edit auto-approval is the same trade at file granularity. Glob patterns in chat.tools.edits.autoApprove
decide which paths may be written without review, and the documented way to protect a secret file is a false entry
for that path, so the exception is written down where it can be reviewed instead of living in someone's habits.
{
"chat.tools.edits.autoApprove": {
"**/.env": false
}
}
The global version of the switch is chat.tools.global.autoApprove, which auto-approves tools across all
workspaces. The documentation groups it with the Allow all permission level and the Autopilot agent mode as the
three forms of overall tool auto-approval, and recommends the session-scoped level when approval is not needed
everywhere. A workspace that needs it permanently is a workspace whose review gates have stopped being gates.
Agent sandboxing
Sandboxing is the layer that outlives the approval: an action you allowed still runs inside a boundary that decides what it can touch.
Agent sandboxing uses operating-system isolation to confine shell execution and the child processes those commands
start, in Copilot harness sessions that use the default tools. It can also confine MCP servers and language servers
started or managed for the session when the corresponding settings are active, and both of those settings default to
on. Sandboxing itself does not: chat.agent.sandbox.enabled accepts off or on and defaults to off, so the extension
to servers only means anything once the sandbox is switched on. Built-in tools that start no operating-system
process are governed by their own permission checks instead, which is why approvals still carry weight with the
sandbox running.
It is independent of the selected permission level. Allow all and Autopilot skip the prompts, and an enabled sandbox still restricts what the commands they approve can reach. It is available on supported Windows, macOS and Linux machines, and for a remote session the restrictions are configured on the machine where the commands run rather than on the machine you connect from.
Outbound network access is on by default, and that is the most misread line in this area. The setting is
chat.agent.sandbox.network.allowNetwork and it defaults to true, so a freshly enabled sandbox confines
the file system and leaves the network reachable. File system and network isolation are separate controls, and the
default posture confines one of them, not both. The domain allow and deny lists only bite while outbound access is
enabled. Turning the setting off blocks outbound access; leaving it on and calling the machine sandboxed is the
mistake this paragraph exists to prevent.
The documentation lists what weakens the isolation rather than leaving it implied: credentials you explicitly
inject, developer-tool configuration and caches, allowed paths, unrestricted or local network access, unsandboxed
fallback, and bypass. The fallback, chat.agent.sandbox.allowUnsandboxedCommands, is on by default,
which means a command that cannot run inside the sandbox can ask to run outside it, and one approval can cover the
rest of the session. Each item on that list is a grant, so the working rule is the one the documentation gives: grant
only the access the task requires rather than turning the sandbox off to avoid the exceptions.
An added layer, not a boundary you can rely on alone
MCP server sandboxing is a separate feature with its own platform support: it applies on macOS and Linux, and only to locally running servers that use the stdio transport. A sandboxed server reaches only the file system paths and network domains you permit in the sandbox configuration. Tool calls from a sandboxed server are then auto-approved, on the rationale that they run in a controlled environment. That consequence is worth noticing rather than filing away: the per-call approval gate disappears for exactly the servers you chose to sandbox, so the file and network policy you wrote becomes the control doing the work, and it is the artefact to review.
Hooks are the other place people look for a boundary, and they are not one. A preToolUse hook can
inspect a supported tool's arguments and return a denial, but a filter that misses a tool or an argument shape does
not validate that operation, it simply lets it through. Hooks can return allow, deny or ask, and what an ask does
depends on the session mode, so it cannot be assumed to pause an unattended run. A preToolUse command
that fails denies the call, while a timeout continues through the normal permissions instead. Instructions in a rules
file guide the model and are not an enforcement boundary, which is the same distinction the approvals section makes
about the judge.
The check the documentation provides is /sandbox policy inside a Copilot harness session: it reports
whether sandboxing is active, which implementation the operating system supplied, and the effective file system and
network policy, and it still produces a report when sandboxing is off, which is exactly the case where a reader
otherwise assumes the sandbox is protecting them.
Local harness sessions and custom terminal tools have different sandbox behaviour, and the settings described here do not configure them: the older sandbox settings for those tools are migrated or deprecated, and the documentation keeps the subject in its own section. Do not infer one session type's behaviour from the other's, and read that section before you promise a Local session the same boundary a Copilot harness session gets.
Where the controls leak
VS Code's own security documentation records what each of these switches leaves standing. Each of the four gaps is a case where an administrator who read only the setting name would believe they had closed something.
| Lever | What it does | What it leaves standing |
|---|---|---|
ChatAgentMode set to false |
Removes Agent from the dropdown and disables the Agents window. | Agent Host session targets such as Copilot are not removed, so an agent session can still exist outside the surface you disabled. |
ChatMCP |
Governs MCP access as the configured policy describes it. | It does not govern servers the Copilot runtime discovers itself. |
ChatToolsEligibleForAutoApproval |
Scopes which tools may be auto-approved. | It does not stop assisted permissions or saved approvals, which is where a user's earlier decision outlives the current policy intent. |
Claude3PIntegration, Codex3PIntegration |
Disable third-party harnesses at that entry point. | They are disabled rather than constrained, so there is no supported way to run one of them with a reduced permission set. |
One harness caveat sits above all four. Claude and Codex harnesses cannot enforce Copilot enterprise-managed settings, and they are disabled when those settings apply, including managed permission or sandbox settings. An organisation that pins a permission level or requires sandboxing therefore does not get a constrained third-party harness, it gets no third-party harness at all, and the question of which approved harness to use goes to the team that deployed the settings rather than to the developer's mode picker.
The pattern behind all four is the same, and it generalises past this product. A policy switch operates on a surface the vendor exposes; the gap is whatever the vendor's own runtime reaches without going through that surface, which is why "disabled" in a policy reference means "disabled at this entry point", and why a control set built only from editor policy has holes in exactly the shape of the product's own integrations.
None of this makes the switches worthless. It means the evidence for a control has to be observed behaviour rather than a setting name, and that the compensating controls live where the agent's actions land: the repository platform, the pipeline and the network.
Workspace trust and what stays user-side
There is no workspace-trust policy. Trust remains a client and workspace decision: the person opening a folder decides whether it is trusted, and restricted mode is documented as disabling agents, but the user chooses to enter it. Nothing in the reference lets an administrator declare a folder safe or force every folder into restricted mode.
A trust decision is also wider than the folder. Trust decisions cover the workspace, extension publishers, MCP
servers and network domains, they can be revoked at any time, and related boundaries can share one decision. The
documented case is the MCP servers declared in .vscode/mcp.json and in a workspace-root
.mcp.json: they inherit Workspace Trust rather than carrying a decision of their own. That inheritance
is why a repository's MCP configuration belongs inside the review of the repository, not in a separate conversation
about servers.
Plan accordingly. The workspace file and the container definition are what you can ship; the trust prompt is what you cannot answer on someone else's behalf. Assume untrusted folders open on managed machines every day, and put the controls that matter below that decision rather than above it.
Remote and cloud are different boundaries again, and neither of them is the workspace trust prompt. A GitHub environment registers a development machine for access from supported Copilot clients; connected clients receive trusted-owner access to sessions, tools and workspace resources on that machine, and session actions are mirrored to GitHub for catalog and history storage. Conversation content is not end-to-end encrypted, which makes registering a host a data-handling decision as much as an access decision. Disconnecting a client does not stop the host's tasks: sharing from the host is turned off under Remote Connections, active work is halted by stopping the task in its session, and neither action undoes completed file edits, commands or external effects.
A cloud session runs on managed compute, so the local sandbox and approval settings do not configure it. Manually approving a step locally says nothing about what the cloud service will ask, and closing a client, marking a task done or stopping a request is not a shutdown of that compute. Use the controls the cloud session itself offers, review its changes and test results before integrating them, and treat deleting a task as a catalogue action rather than as proof that its environment is gone.
An agent host reachable by anyone is an open session
Remote development and containers
Dev containers, WSL distributions and tunnels move the work but not the policy. The editor process that resolves the registry key, the configuration profile or the policy file runs on the client, so that is where the pinned value lives. The target has its own settings layer and its own extension host, and a device policy governs neither: what the policy governs is the window the developer types in, not the environment the agent runs commands in.
That applies to keys as well. An SSH agent forwarded into a container is reachable by anything running in it for the life of the session, and forwarding is configured on the client, so no container-side setting can revoke it. If the container is untrusted, do not forward credentials into it, and pin that decision where a developer cannot quietly reverse it. Manage both ends then: the client through policy, the target through the image and its own committed settings, with the pair as the unit that was reviewed.
Verifying that the policy applied
The command palette has the answer, and it belongs at the end of every rollout rather than in the debugging session after a complaint. Developer: Policy Diagnostics prints two tables, one for policies that applied and one for policies that did not, plus the account-policy gate state: inactive, satisfied or restricted. A gate reading restricted does not mean a policy problem; the AI features are off by design.
The trap is that a malformed policy value is silently not applied. There is no error surface, no failed build and no prompt: the value does not take effect, and the only signal is the Window log. A fail-open failure mode is the one to design against, because the machine looks configured to the person who wrote the change record, to the scan that read the registry key, and to anyone reading the policy file on disk.
Copilot's disableBypassPermissionsMode behaves the other way, failing closed on an unrecognised value in Copilot CLI, which is why the two layers cannot be tested the same way; the detail belongs to the GitHub Enterprise page. Verify in two places then: read the value back from the mechanism, then confirm in Policy Diagnostics that the editor agrees. A finding in only one of the two is a finding about delivery, not about the editor.
Pin a Policy and Prove It Wins
Apply one policy in a throwaway Windows VM, set the opposite value in user settings, and read the policy state back. Done when you can state the precedence rule from your own observation and show the applied table that proves it.
Related Topics
Shipping Policy with GPO and Intune
Delivering these values at estate scale and detecting the machines that drifted
OpenCode and the Wider IDE Estate
What still applies when the editor accepts no central policy
Vibe Coding Security
How instruction files and agent workflows are attacked
Secure SDLC Integration
Where review and pipeline gates sit around the editor