Skip to content

chat: Make mandatory Copilot harness adoption an explicit admin choice (for now) - #342623

Merged
Ross Wollman (rwoll) merged 1 commit into
mainfrom
agents/revert-copilot-harness-settings
Oct 19, 2026
Merged

Ross Wollman (rwoll) merged 1 commit into
mainfrom
agents/revert-copilot-harness-settings

Conversation

@rwoll

Copy link
Copy Markdown
Member

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=true and permissions.*) 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)

  • Existing permission and sandbox settings no longer force a harness switch. Local follows the existing rollout, visibility, preference, and explicit/remembered selection logic. Those managed settings alone no longer hide Local, block its requests, or automatically migrate its conversations.
  • Administrators can explicitly prohibit Local with vscode.temporaryAllowLocalHarness: false. This continues to block Local selection and fallback, and now also disables Claude and Codex through their existing integration policies.
  • Administrators can temporarily favor Local with vscode.temporaryDefaultToLocalHarness: true. This keeps Local available and suppresses automatic Copilot-default/preference routing without overriding explicit or remembered harness choices. An explicit temporaryAllowLocalHarness: false takes precedence.
    • If an Enterprise is subject to VS Code Experiments, vscode.temporaryDefaultToLocalHarness takes precedence over the the experiment that effectively controls this same setting.
  • Claude/Codex governance is otherwise unchanged. Existing managed-settings restrictions still disable those providers; restoring Local eligibility does not re-enable them.

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:

  • Client build: passed.
  • Focused regression suites: 750 passed, 4 pending.
  • Client type-check and changed-file ESLint: passed.
  • Policy export from both product entrypoints: passed.
  • Live enterprise deployments and end-to-end UI flows were not tested.
fnm exec --using=v24.18.0 npm run build-fast -- --client-only
fnm exec --using=v24.18.0 ./scripts/test.sh --reporter dot \
  --run src/vs/platform/agentHost/test/common/agentService.test.ts \
  --run src/vs/workbench/services/policies/test/browser/accountPolicyService.test.ts \
  --run src/vs/platform/policy/test/common/copilotManagedSettings.test.ts \
  --run src/vs/workbench/contrib/chat/test/common/constants.test.ts \
  --run src/vs/workbench/contrib/chat/test/common/chatService/chatService.test.ts \
  --run src/vs/workbench/contrib/chat/test/browser/widgetHosts/editor/chatEditorInput.test.ts \
  --run src/vs/workbench/contrib/chat/test/browser/widgetHosts/viewPane/chatViewPane.test.ts \
  --run src/vs/workbench/contrib/chat/test/browser/widget/chatWidget.test.ts \
  --run src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostPolicyContinuation.test.ts \
  --run src/vs/platform/agentHost/test/browser/agentHostEnablementService.test.ts \
  --run src/vs/platform/agentHost/test/node/agentHostPolicySupport.test.ts
fnm exec --using=v24.18.0 npm run typecheck-client
git diff --name-only --diff-filter=ACM -z -- '*.ts' | xargs -0 fnm exec --using=v24.18.0 npm run eslint --
VSCODE_SKIP_PRELAUNCH=1 fnm exec --using=v24.18.0 npm run export-policy-data -- --skip-transpile

🤖 Authored with GitHub Copilot on behalf of Ross Wollman (@rwoll).

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]>
Copilot AI balanced review requested due to automatic review settings October 19, 2026 18:01
@rwoll Ross Wollman (rwoll) added the ~release-cherry-pick Trigger: cherry-pick this PR to the latest release branch label Oct 19, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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

@rwoll
Ross Wollman (rwoll) marked this pull request as ready for review October 19, 2026 18:23
@rwoll
Ross Wollman (rwoll) merged commit 2a70c61 into main Oct 19, 2026
50 checks passed
@rwoll
Ross Wollman (rwoll) deleted the agents/revert-copilot-harness-settings branch October 19, 2026 19:00
@vs-code-engineering vs-code-engineering Bot added this to the 1.143.0 milestone Oct 19, 2026
@vs-code-engineering vs-code-engineering Bot added release-cherry-pick Automated cherry-pick between release and main branches and removed ~release-cherry-pick Trigger: cherry-pick this PR to the latest release branch labels 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.*
@rwoll Ross Wollman (rwoll) added agent-host Issues for the agent-host implementation (not the protocol) bug Issue identified by VS Code Team member as probable bug labels Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-host Issues for the agent-host implementation (not the protocol) bug Issue identified by VS Code Team member as probable bug release-cherry-pick Automated cherry-pick between release and main branches

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Codex and Claude don't respect vscode.temporaryAllowLocalHarness: false

4 participants