Repository navigation
[1.142] chat: add a managed Local harness opt-out - #341190
Merged
Connor Peet (connor4312) merged 1 commit intoOct 12, 2026
Merged
Connor Peet (connor4312) merged 1 commit into
Connor Peet (connor4312) merged 1 commit into
Conversation
Add a temporary enterprise control for the VS Code chat harness. - Add vscode.temporaryDefaultToLocalHarness as an enterprise managed setting. - Keep Local available and stop automatic promotion to Copilot when the policy is enabled. - Override managed sandbox and permission routing, without changing runtime enforcement. - Preserve explicit, remembered, and current harness choices. - Update Local request blocking when the policy changes. - Add tests for delivery, selection, request blocking, and policy removal. - Export policy data with VS Code 1.142 as the minimum version. (Commit message generated by Copilot) Co-authored-by: Copilot <[email protected]> (cherry picked from commit 2b21fb4)
Contributor
|
Base:
|
roblourens
approved these changes
Oct 12, 2026
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The backport consistently applies the policy and includes comprehensive validation with no unresolved issues.
0 open findings
What changed in this PR
Adds an enterprise-managed opt-out that keeps the Local chat harness available despite Copilot routing requirements.
Changes:
- Registers and exports the managed policy.
- Applies it to harness selection, visibility, and request blocking.
- Adds coverage for delivery, precedence, live updates, and removal.
| File | Description |
|---|---|
.github/skills/policy-and-managed-settings/vscode-policy.md |
Documents the policy contract. |
build/lib/policies/policyData.jsonc |
Exports policy metadata. |
src/vs/platform/agentHost/common/agentHostEnablementService.ts |
Registers the policy-backed setting. |
src/vs/platform/agentHost/common/agentHostPolicySupport.ts |
Classifies Agent Host support. |
src/vs/platform/policy/common/copilotManagedSettings.ts |
Resolves the managed opt-out. |
src/vs/platform/policy/test/common/copilotManagedSettings.test.ts |
Tests projection and routing behavior. |
src/vs/workbench/contrib/chat/common/constants.ts |
Updates harness selection rules. |
src/vs/workbench/contrib/chat/test/common/constants.test.ts |
Tests selection and preservation behavior. |
src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.ts |
Reacts to policy changes. |
src/vs/workbench/contrib/chat/test/common/chatService/chatService.test.ts |
Tests request blocking updates. |
src/vs/workbench/contrib/chat/browser/widget/chatWidget.ts |
Refreshes widget policy state. |
src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.ts |
Refreshes picker availability. |
src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditorInput.ts |
Applies policy to editor sessions. |
src/vs/workbench/contrib/chat/test/browser/widgetHosts/editor/chatEditorInput.test.ts |
Updates configuration fixtures. |
src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.ts |
Applies policy to sidebar sessions. |
src/vs/workbench/services/policies/test/browser/accountPolicyService.test.ts |
Tests delivery channels and removal. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Connor Peet (connor4312)
merged commit Oct 12, 2026
6ba3b00
into
release/1.142
57 of 60 checks passed
Connor Peet (connor4312)
deleted the
connor4312/temporary-local-harness-policy-1.142
branch
October 12, 2026 23:10
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.
chat: add a managed Local harness opt-out
Add a temporary enterprise control for the VS Code chat harness.
(Commit message generated by Copilot)
Co-authored-by: Copilot [email protected]
(cherry picked from commit 2b21fb4)
Backport of #341188 to
release/1.142. No associated issue. The cherry-pick applied without conflicts or release-specific code changes.Validation on release/1.142
npm run install-fast— passed; dependencies are independent of the main worktree.npm run build-fast -- --client-only— passed../scripts/test.sh --reporter dot --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/services/policies/test/browser/accountPolicyService.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/input/sessionTargetPickerActionItem.test.ts --run src/vs/workbench/contrib/chat/test/browser/widget/chatWidget.test.ts— 570 passed, 4 existing pending.npm run typecheck-client— passed.npm run eslint -- src/vs/platform/policy/common/copilotManagedSettings.ts src/vs/platform/policy/test/common/copilotManagedSettings.test.ts src/vs/platform/agentHost/common/agentHostEnablementService.ts src/vs/platform/agentHost/common/agentHostPolicySupport.ts src/vs/workbench/contrib/chat/common/constants.ts src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.ts src/vs/workbench/contrib/chat/browser/widget/chatWidget.ts src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.ts src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditorInput.ts src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.ts src/vs/workbench/contrib/chat/test/common/constants.test.ts src/vs/workbench/contrib/chat/test/common/chatService/chatService.test.ts src/vs/workbench/contrib/chat/test/browser/widgetHosts/editor/chatEditorInput.test.ts src/vs/workbench/services/policies/test/browser/accountPolicyService.test.ts— passed.npm run valid-layers-check— passed.npm run check-cyclic-dependencies— passed.npm run export-policy-data -- --skip-transpile— passed for both Workbench and Agents window; no additional catalog changes.git diff --check— passed.Manual test
chat.defaultToCopilotHarnessandchat.editor.preferCopilotHarnesstotrue, andchat.editor.localAgent.enabledtofalse.{"vscode":{"temporaryDefaultToLocalHarness":true}}.falseor remove it and verify normal routing and Local request blocking return.Local does not enforce runtime-only sandbox or permission rules. The escape hatch is administrator-controlled and does not disable their enforcement in Copilot runtime sessions. Current-session inheritance is preserved.