Repository navigation
chat: Make mandatory Copilot harness adoption an explicit admin choice (for now) - #342623
Merged
Ross Wollman (rwoll) merged 1 commit intoOct 19, 2026
Merged
Conversation
Keep Local eligibility independent of managed permission and sandbox settings while preserving normal rollout and harness-selection behavior. Require explicit temporaryAllowLocalHarness=false to prohibit Local and also disable Claude and Codex through their existing integration policies. Fixes #342599. 🤖 Authored with GitHub Copilot on behalf of @rwoll. Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Cross-cutting enterprise enforcement and conversation migration changes require human validation of live policy refresh and end-to-end flows.
1 open issue
What changed in this PR
Makes mandatory Copilot harness adoption an explicit administrator choice, separate from runtime permission and sandbox controls.
Changes:
- Preserves normal Local selection unless explicitly prohibited.
- Extends explicit Local prohibition to Claude and Codex.
- Updates routing, regression tests, policy descriptions, and documentation.
| File | Description |
|---|---|
| src/vs/workbench/services/policies/test/browser/accountPolicyService.test.ts | Tests policy precedence and provider restrictions. |
| src/vs/workbench/services/policies/common/accountPolicyService.ts | Updates policy projection and source attribution. |
| src/vs/workbench/contrib/chat/test/common/constants.test.ts | Tests revised harness selection. |
| src/vs/workbench/contrib/chat/test/common/chatService/chatService.test.ts | Tests Local request eligibility. |
| src/vs/workbench/contrib/chat/test/browser/widgetHosts/viewPane/chatViewPane.test.ts | Tests panel routing and fallback. |
| src/vs/workbench/contrib/chat/test/browser/widgetHosts/editor/chatEditorInput.test.ts | Tests explicit Local editor selection. |
| src/vs/workbench/contrib/chat/test/browser/widget/chatWidget.test.ts | Adds migration eligibility coverage. |
| src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostPolicyContinuation.test.ts | Updates automatic continuation conditions. |
| src/vs/workbench/contrib/chat/common/constants.ts | Removes sandbox-driven harness selection. |
| src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.ts | Simplifies request-policy observation. |
| src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.ts | Applies explicit prohibition to panel routing. |
| src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditorInput.ts | Updates editor routing and fallback checks. |
| src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.ts | Updates picker eligibility checks. |
| src/vs/workbench/contrib/chat/browser/widget/chatWidget.ts | Updates migration-policy observation. |
| src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPolicyContinuation.ts | Uses explicit prohibition for automatic continuation. |
| src/vs/platform/policy/test/common/copilotManagedSettings.test.ts | Tests revised managed-setting semantics. |
| src/vs/platform/policy/common/copilotManagedSettings.ts | Separates harness prohibition from runtime controls. |
| src/vs/platform/agentHost/test/common/agentService.test.ts | Covers third-party provider prohibition. |
| src/vs/platform/agentHost/common/agentHostStarter.config.contribution.ts | Declares managed keys for integration policies. |
| src/vs/platform/agentHost/common/agentHostEnablementService.ts | Clarifies configuration descriptions. |
| build/lib/policies/policyData.jsonc | Updates exported policy wording. |
| .github/skills/policy-and-managed-settings/vscode-policy.md | Documents explicit harness controls. |
| .github/skills/policy-and-managed-settings/sdk-runtime-policy.md | Clarifies runtime enforcement boundaries. |
| .github/skills/policy-and-managed-settings/policy-support-maintenance.md | Updates eligibility and testing guidance. |
| .github/skills/policy-and-managed-settings/github-managed-settings.md | Documents third-party governance projection. |
Review effort: Balanced
Ross Wollman (rwoll)
marked this pull request as ready for review
October 19, 2026 18:23
Harald Kirschner (digitarald)
approved these changes
Oct 19, 2026
Bhavya U (bhavyaus)
approved these changes
Oct 19, 2026
Ross Wollman (rwoll)
deleted the
agents/revert-copilot-harness-settings
branch
October 19, 2026 19:00
This was referenced Oct 19, 2026
Ross Wollman (rwoll)
added a commit
that referenced
this pull request
Oct 20, 2026
…al (#342670) ## Why Partially reverts #342623 following internal discussions about how best to address the enterprise rollout issues. We restore harness enforcement while retaining the Claude/Codex policy fix, and explain why Local is disabled rather than hiding it. Local cannot enforce runtime-only permission and sandbox controls. ## Changes - Show policy-disabled Local greyed out with a briefcase indicator and a visible [Learn why](https://aka.ms/vscode-copilot-harness-policy) link. The link supports mouse and keyboard activation without selecting Local; the detailed hover remains available. - Require Copilot for Local chats only when managed `permissions.deny` is non-empty or `sandbox.enabled: true`, rather than any `permissions.*` setting. Malformed deny values remain fail-closed. Routing, request blocking, and migration use the same trigger. - Preserve Claude/Codex restrictions, including the #342599 fix for `vscode.temporaryAllowLocalHarness: false`. - Retain the `vscode.temporaryDefaultToLocalHarness: true` escape hatch; explicit `temporaryAllowLocalHarness: false` still wins. ## Manual policy checks Test each snippet independently as managed settings, with other policy sources cleared, then reload. “No” means this snippet does not disable the harness; normal availability still applies. Disabled Local remains visible with **Learn why**. | Managed-settings JSON | Local disabled? | Claude/Codex disabled? | |---|:---:|:---:| | `{}` | No | No | | `{"permissions":{"deny":[]}}` | No | Yes | | `{"permissions":{"deny":["Shell"]}}` | Yes | Yes | | `{"permissions":{"ask":["Shell"],"allow":["Read"],"defaultMode":"manual"}}` | No | Yes | | `{"sandbox":{"enabled":false,"allowBypass":false}}` | No | Yes | | `{"sandbox":{"enabled":true}}` | Yes | Yes | | `{"vscode":{"temporaryAllowLocalHarness":true}}` | No | No | | `{"vscode":{"temporaryAllowLocalHarness":false}}` | Yes | Yes | | `{"permissions":{"deny":["Shell"]},"vscode":{"temporaryDefaultToLocalHarness":true}}` | No | Yes | | `{"sandbox":{"enabled":true},"vscode":{"temporaryDefaultToLocalHarness":true}}` | No | Yes | | `{"vscode":{"temporaryAllowLocalHarness":false,"temporaryDefaultToLocalHarness":true}}` | Yes | Yes | Malformed `permissions.deny` values also disable Local unless the escape hatch applies. ## Screenshot <img width="627" height="144" alt="Screenshot 2026-10-19 at 3 50 41 PM" src="https://github.com/user-attachments/assets/a95ebaee-d176-4a44-8682-99af6d67c31d" /> *🤖 Authored with GitHub Copilot on behalf of @rwoll.*
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Why
Important
This change is a temporary measure. We are still collecting user and Enterprise feedback on the new harness experience, and Local will eventually be completely retired and unavailable. We encourage you to file specific Issues on GH with things that are not working in your environment or UX that has changed that you do not like.
The new harness ensures a consistent, token efficient experience across all GitHub surfaces like the CLI, GH App, VS Code, et. al.
Over the past few weeks, we have been progressively rolling Enterprise users onto the Copilot harness (Agent Host) for Enterprises enrolled in VS Code Experiments, but with Local still selectable in case there were intolerable gaps in the experience.
Based on monitoring of the experiment and feedback, we got signals that we were ready to enforce the Copilot harnesses for Enterprises with specific settings (
sandbox.enabled=trueandpermissions.*) as these newer settings could only be enforced properly in the latest harness.Through the last week of enforcement, the diversity of Enterprise environments has surfaced some additional challenges. Therefore, we are extending the control and period Enterprises have to force the new Copilot harness.
Changes (v1.142.0 -> v1.143.0)
vscode.temporaryAllowLocalHarness: false. This continues to block Local selection and fallback, and now also disables Claude and Codex through their existing integration policies.vscode.temporaryDefaultToLocalHarness: true. This keeps Local available and suppresses automatic Copilot-default/preference routing without overriding explicit or remembered harness choices. An explicittemporaryAllowLocalHarness: falsetakes precedence.vscode.temporaryDefaultToLocalHarnesstakes precedence over the the experiment that effectively controls this same setting.This is not a rollback of the gradual Copilot rollout or of runtime policy enforcement. Local does not enforce runtime-only permission and sandbox controls. Organizations that require those controls must explicitly prohibit Local; the controls remain enforced in Copilot runtime sessions.
Fixes #342599.
Validation and how to test
Validated the combined changes locally with Node 24.18.0:
🤖 Authored with GitHub Copilot on behalf of Ross Wollman (@rwoll).