Repository navigation
agentHost: preserve legacy policy-required sandboxing - #339144
Merged
Ross Wollman (rwoll) merged 3 commits intoOct 1, 2026
Merged
Conversation
Carry legacy sandbox policy provenance into Agent Host session configuration so a session Off selection cannot override mandatory enablement. Preserve personal preferences, permitted bypasses, runtime restrictions, and the separate Windows enablement setting. 🤖 Authored with GitHub Copilot on behalf of @rwoll. Co-authored-by: Copilot <[email protected]>
This comment was marked as outdated.
This comment was marked as outdated.
Keep mandatory sandbox enablement in handler-scoped client policy contributions, aggregated restrictively and restored before reconnect replay. Ordinary root settings and other clients can no longer clear an active requirement. Preserve runtime restrictions and scoped withdrawal/disconnect cleanup. 🤖 Authored with GitHub Copilot on behalf of @rwoll. Co-authored-by: Copilot <[email protected]>
Preserve the upstream removal of the Octokit service while keeping client-managed sandbox policy owned by the service foundation. Revalidate the policy transport and runtime enforcement against current main. 🤖 Authored with GitHub Copilot on behalf of @rwoll. Co-authored-by: Copilot <[email protected]>
Ross Wollman (rwoll)
marked this pull request as ready for review
October 1, 2026 19:48
Ross Wollman (rwoll)
enabled auto-merge
October 1, 2026 19:48
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Anthony Kim (@anthonykim1)Matched files:
|
roblourens
approved these changes
Oct 1, 2026
roblourens
approved these changes
Oct 1, 2026
roblourens
approved these changes
Oct 1, 2026
roblourens
approved these changes
Oct 1, 2026
Ross Wollman (rwoll)
disabled auto-merge
October 1, 2026 21:50
Aaron Munger (amunger)
approved these changes
Oct 1, 2026
Ross Wollman (rwoll)
deleted the
rwoll/agent-host-sandbox-policy-1e415032
branch
October 1, 2026 22:16
Ross Wollman (rwoll)
added a commit
that referenced
this pull request
Oct 2, 2026
The Local harness is being deprecated in favor of Agent Host, backed by the Copilot SDK. Rollout has started, but some existing VS Code enterprise policies need translation into the SDK's Unified Managed Settings so enterprise controls remain intact during the transition. ## What this PR does - **Enables supported legacy policy conversion by default.** Removes the separate bridge opt-in, `chat.agentHost.copilot.mapLegacySettingsToManagedSettings`. When rollout or explicit selection chooses Copilot Agent Host, supported restrictions carry over automatically. Native terminal restrictions, including global user settings, still require approval under Allow All/assisted approval. - **Adds applied-policy readiness diagnostics.** Run **Developer: Policy Diagnostics** from the Command Palette to see conversion/enforcement coverage, source, impact, and remaining gaps. Separates unsupported requirements from source/path-dependent coverage needing verification; excludes unconfigured policies and preserves existing diagnostic sections. Policy gaps appear in diagnostics but do not block Agent Host rollout. Existing rollout behavior is unchanged, and supported policy restrictions remain enforced. Scope: Copilot Agent Host on this machine, not certification of remote hosts or other providers. Refs #332011, #337536, #337537. ## Accepted gaps (report-only) Accepted for this PR's rollout posture, not reclassified as enforced or treated as individual administrator consent. Source/path-dependent findings may already be enforced by runtime-native settings. OTel is implemented; its entries concern remaining forwarding, precedence, and runtime coverage. Its policies also reference `github.copilot.chat.otel.enabled`, `github.copilot.chat.otel.exporterType`, `github.copilot.chat.otel.captureIdentity`, and `github.copilot.chat.otel.headers`. **Merged fixes:** [#339144](#339144) closes the legacy macOS/Linux `ChatAgentSandboxEnabled: on` gap allowing direct session Off overrides; it is omitted below. Host identity capture is also fixed by [#339045](#339045). Both fixes are merged into `main`; this is not a claim of release availability. Sandbox lifecycle validation remains open: distinguish policy still loading from confirmed withdrawal, and verify loss/reapplication of the last client's requirement across disconnect-grace expiry. The separate sandbox auto-approval gap remains below. | Policy / setting | Remaining impact | |---|---| | `ChatToolsEligibleForAutoApproval` / `chat.tools.eligibleForAutoApproval` | Bypass is disabled for excluded tools, but per-tool confirmation is not guaranteed through other approval paths. | | `ChatToolsTerminalEnableAutoApprove` / `chat.tools.terminal.enableAutoApprove` | Native shell asks are covered; custom-terminal coverage is incomplete (`chat.agentHost.customTerminalTool.enabled`). | | `ChatAgentSandboxAllowAutoApprove` / `chat.agent.sandbox.allowAutoApprove` | Active sandboxed commands may auto-approve without an equivalent blanket shell ask. Activation includes `chat.agent.sandbox.enabledWindows`. | | `ChatMCP` / `chat.mcp.access` | Independent runtime discovery can escape workbench access filtering. | | `ChatAllowedMcpServers` / `chat.mcp.allowedServers`<br>`ChatDeniedMcpServers` / `chat.mcp.deniedServers`<br>`ChatAllowManagedMcpServersOnly` / `chat.mcp.allowManagedServersOnly` | VS Code-only restrictions do not reach every forwarded, discovered, or built-in server path. | | `McpEnterpriseManagedAuthIdp` / `mcp.enterpriseManagedAuth.idp` | Forwarded authentication lacks Local's enterprise IdP lookup; SSO may fail. | | `ChatPluginsEnabled` / `chat.plugins.enabled`<br>`ChatEnabledPlugins` / `chat.plugins.enabledPlugins` | Independent discovery and customization paths can bypass disablement or required-plugin decisions. | | `ChatExtraMarketplaces` / `chat.plugins.extraMarketplaces`<br>`ChatStrictMarketplaces` / `chat.plugins.strictMarketplaces` | Runtime-owned operations lack VS Code-only values; strict lists do not disable installed plugins. | | `ChatStrictPluginOnlyCustomization` / `chat.customizations.strictPluginOnlyCustomization` | Independent discovery, instructions, and selective lockdown lack equivalent coverage. | | `ChatHooks` / `chat.useHooks`<br>`ChatAllowManagedHooksOnly` / `chat.hooks.allowManagedOnly` | The Local switch does not disable runtime file hooks; managed-only file-hook/SDK-callback coverage is incomplete or unverified. | | `ChatAgentMode` / `chat.agent.enabled` | Agent Host targets can remain available when agent mode is disabled. | | `CopilotOtelEnabled` / `chat.agentHost.otel.enabled` | Separate destinations/recorders can override disablement. | | `CopilotOtelProtocol` / `chat.agentHost.otel.exporterType` | Inherited OTLP configuration can override exporter selection. | | `CopilotOtelCaptureIdentity` / `chat.agentHost.otel.captureIdentity` | Host identity capture is fixed ([#339045](#339045)); runtime account attribution awaits upstream merge, a bundled runtime roll, and end-to-end verification. No additional VS Code account-identity wiring is expected. | | `CopilotOtelHeaders` / `chat.agentHost.otel.headers` | Missing host forwarding can break authenticated export. | | `ChatAgentNetworkFilter` / `chat.agent.networkFilter`<br>`ChatAgentAllowedNetworkDomains` / `chat.agent.allowedNetworkDomains`<br>`ChatAgentDeniedNetworkDomains` / `chat.agent.deniedNetworkDomains` | Legacy allowlists are not mandatory boundaries on native runtime URL/shell paths; supported URL denies and shared VS Code filtering remain. Domain `limitTo` integration is accepted follow-up work, not a landing prerequisite. | *🤖 Authored with GitHub Copilot on behalf of @rwoll.*
Ross Wollman (rwoll)
added a commit
that referenced
this pull request
Oct 2, 2026
## Summary Retire legacy VS Code sandbox policies from the Copilot Agent Host policy contract and roll back the mandatory legacy sandbox requirement added by #339144. Enterprise sandbox enforcement in Agent Host should use [Copilot managed settings](https://docs.github.com/en/copilot/how-tos/administer-copilot/manage-for-enterprise/use-managed-settings/get-started), not migration of the old preview device policies. - Remove the connection-owned legacy sandbox requirement, while retaining native managed sandbox enforcement and the later session-restoration/reconciliation fixes. - Mark nine legacy sandbox settings deprecated, keep their migration notices visible, and preserve their defaults. Add deprecation and replacement guidance to the four device-policy descriptions and generated catalog. - Classify those four retired policies as `notApplicable`, rather than outstanding Agent Host parity gaps. Update diagnostics, tests, and contributor documentation together. New Agent Host sandbox controls are not deprecated. ## Admin and user impact **`ChatAgentSandboxEnabled: on` no longer guarantees sandboxing in Agent Host.** Existing setting forwarding remains, so it can supply an On default, but a session Off selection can override it. To require sandboxing in Copilot Agent Host, use native managed `sandbox.enabled: true`. Use `sandbox.allowBypass: false` when bypass must be prohibited. Outbound network restrictions use `sandbox.userPolicy.network.allowOutbound`. Local harness behavior is unchanged. Native managed restrictions, permitted-bypass controls, restored-session reconciliation, and other legacy permission translations remain intact. `notApplicable` records the retirement of the legacy policy contract; it does not mean forwarded settings have no effect or certify enforcement parity. The deprecated device policies are `ChatAgentSandboxEnabled`, `ChatAgentSandboxAllowNetwork`, `ChatAgentSandboxAllowUnsandboxedCommands`, and `ChatAgentSandboxAllowAutoApprove`. ## Validation - Rebased onto current `main`; core compilation completed with zero errors. - 528 focused tests passed, covering native sandbox enforcement, restoration, bypass/fail-closed behavior, ordinary forwarding, connection lifecycle, deprecation metadata, catalog classifications, and diagnostics. - A test-only follow-up fixes two stale CI expectations. Both failures were reproduced locally, then the affected suites passed 69 tests in Electron and 68 in WebKit, including unchanged Local/Copilot rollout selection. - Targeted hygiene and whitespace checks passed. - Canonical Workbench and Agents policy-export check passed. Live MDM deployment was not exercised. Release notes and sandbox migration guidance have also been updated locally in `vscode-docs` for separate publication. *🤖 Authored with GitHub Copilot on behalf of @rwoll.*
LeeHansHinLun
pushed a commit
to Deslopify/code
that referenced
this pull request
Oct 2, 2026
Roll back the connection-owned sandbox requirement from microsoft#339144 while preserving native managed sandbox enforcement, restoration and ordinary setting forwarding. Deprecate the legacy settings and device policies, and mark the retired policy surface not applicable to Agent Host. *🤖 Authored with GitHub Copilot on behalf of @rwoll.* Co-authored-by: Copilot <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prevent a per-session Off selection from overriding the legacy VS Code
ChatAgentSandboxEnabled: onpolicy in Copilot Agent Host on macOS/Linux.The policy already locked the global
chat.agent.sandbox.enabledsetting, and sandboxing remained enabled for sessions following that setting. However, forwarding preserved only the resolvedonvalue, not the fact that it was mandatory. Agent Host therefore treated the policy like a personal preference, allowing a session-level Off selection to override it.Scope
ChatAgentSandboxEnabled: onpolicy, when a session selects or already has an Off override.sandbox.enabled: truealready has enforcement and session controls from #338172; that is a separate policy path.chat.agent.sandbox.enabledWindowssetting.Change
No SDK or runtime change is required. This addresses the legacy sandbox-enable gap described in #339023, not its other policy-parity gaps.
🤖 Authored with GitHub Copilot on behalf of Ross Wollman (@rwoll).