Repository navigation
Document device policy gaps in Copilot harness sessions - #10491
Merged
Nick Trogh (ntrogh) merged 3 commits intoOct 21, 2026
Merged
Nick Trogh (ntrogh) merged 3 commits into
Nick Trogh (ntrogh) merged 3 commits into
Conversation
Copilot harness (Agent Host) sessions only partially enforce several device policies. VS Code 1.142 records this in src/vs/platform/agentHost/common/agentHostPolicySupport.ts, and microsoft/vscode#328241, #337538, #337539, and #337540 track the gaps. The security and enterprise docs presented these policies as complete controls. - security.md: drop "entirely", "completely", and "Force" from the enterprise policy list and add a note on the Copilot harness gaps. - manage-ai-settings.md: add harness notes for ChatAgentMode, ChatToolsEligibleForAutoApproval, ChatToolsTerminalEnableAutoApprove, and network filtering, plus a note at the top of the device policies section.
Nick Trogh (ntrogh)
self-requested a review
October 20, 2026 23:12
Nick Trogh (ntrogh)
approved these changes
Oct 21, 2026
Dirk Bäumer (dbaeumer)
approved these changes
Oct 21, 2026
Federico Brancasi (federicobrancasi)
approved these changes
Oct 21, 2026
Alok Pandey (alok-108)
deleted the
docs/copilot-harness-policy-coverage
branch
October 22, 2026 22:33
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.
Several VS Code device policies are only partially enforced in Copilot harness (Agent Host) sessions. The security and enterprise docs presented them as complete controls. This PR removes the absolute wording and adds harness notes, following the existing
ChatHooksnote.Fixes #10489
Changes
docs/agents/run/security.md(Enterprise policies)[!IMPORTANT]note that lists the Copilot harness gaps and links to the device policy section of the enterprise article.docs/enterprise/manage-ai-settings.md(device policies)[!IMPORTANT]note at the top of the section: the Copilot harness doesn't enforce every device policy the same way as the Local harness, so test policies in the harness developers use.ChatAgentMode: the policy also blocks the Agents window, but Agent Host session targets remain available in the editor's Session Target control.ChatToolsEligibleForAutoApproval: in Copilot harness sessions, marking a toolfalseremoves Allow all for the session. It does not require confirmation for each call, so Assisted permissions and saved session approvals can still approve the tool.ChatToolsTerminalEnableAutoApprove: the policy covers the built-in shell tool. SetChatAgentHostCustomTerminalTooltofalseto keep sessions on that tool.web_fetch, and Allow all fetches unlisted domains without a prompt. The sandbox doesn't receive the domain lists.Sources (VS Code 1.142.0,
e9eaf94)ChatAgentModeagentHostPolicySupport.ts#L120-L122: "Blocks the Agents window. In the editor it only switches the chat mode; Agent Host session targets remain available."ChatMCP#L71-L73, microsoft/vscode#328241ChatToolsEligibleForAutoApprovalagentHostManagedSettings.ts#L225-L242maps any ineligible tool todisableBypassPermissionsMode: 'disable'. Tracked in microsoft/vscode#337540ChatToolsTerminalEnableAutoApproveagentHostPolicySupport.ts#L51-L53: "The bridge requires managed approval for native shell requests. Custom terminal tools … still need a parity audit."#L59-L65, microsoft/vscode#337539 (web_fetchbypass), microsoft/vscode#337538 (sandbox doesn't receive the lists)Not changed
ChatMCPinmanage-ai-settings.md: The MCP device policy section is commented out onmain, so this PR coversChatMCPonly insecurity.md.agentHostPolicySupport.ts(suggestion 3 in Security and enterprise docs overstate policy enforcement for Copilot harness sessions (ChatAgentMode, ChatMCP, network filter, tool approval) #10489) is a larger change. It probably belongs with the policy reference generation, so I left it for a follow-up.Validation
{% data variables.copilot.agents_window %}exists indata/variables/copilot.yml, and#use-vs-code-device-policiesand#select-a-harnessexist on the published pages.docs-writing.instructions.md: no em dashes or typographic quotes, and product names use the data variables.git diff --checkis clean.