Skip to content

Document device policy gaps in Copilot harness sessions - #10491

Merged
Nick Trogh (ntrogh) merged 3 commits into
microsoft:mainfrom
alok-108:docs/copilot-harness-policy-coverage
Oct 21, 2026
Merged

Nick Trogh (ntrogh) merged 3 commits into
microsoft:mainfrom
alok-108:docs/copilot-harness-policy-coverage

Conversation

@alok-108

Copy link
Copy Markdown
Contributor

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 ChatHooks note.

Fixes #10489

Changes

docs/agents/run/security.md (Enterprise policies)

  • "Prevent the use of agent mode entirely" becomes "Turn off agent mode and the Agents window".
  • "disable MCP support completely" becomes "turn off MCP support".
  • "Force manual approval" becomes "Require manual approval".
  • Adds an [!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)

  • Adds an [!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 tool false removes 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. Set ChatAgentHostCustomTerminalTool to false to keep sessions on that tool.
  • Network filtering: separates Local harness behavior from Copilot harness behavior. In the Copilot harness, the allowed domain list doesn't restrict 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)

Policy Source
ChatAgentMode agentHostPolicySupport.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#328241
ChatToolsEligibleForAutoApproval agentHostManagedSettings.ts#L225-L242 maps any ineligible tool to disableBypassPermissionsMode: 'disable'. Tracked in microsoft/vscode#337540
ChatToolsTerminalEnableAutoApprove agentHostPolicySupport.ts#L51-L53: "The bridge requires managed approval for native shell requests. Custom terminal tools … still need a parity audit."
Network filtering #L59-L65, microsoft/vscode#337539 (web_fetch bypass), microsoft/vscode#337538 (sandbox doesn't receive the lists)

Not changed

Validation

  • I checked every statement against the 1.142.0 source and the linked open issues.
  • {% data variables.copilot.agents_window %} exists in data/variables/copilot.yml, and #use-vs-code-device-policies and #select-a-harness exist on the published pages.
  • I followed docs-writing.instructions.md: no em dashes or typographic quotes, and product names use the data variables. git diff --check is clean.

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.
@ntrogh Nick Trogh (ntrogh) added the doc-enhancement suggested addition or improvement label Oct 21, 2026
@ntrogh
Nick Trogh (ntrogh) merged commit f258015 into microsoft:main Oct 21, 2026
2 checks passed
@alok-108
Alok Pandey (alok-108) deleted the docs/copilot-harness-policy-coverage branch October 22, 2026 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-enhancement suggested addition or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Security and enterprise docs overstate policy enforcement for Copilot harness sessions (ChatAgentMode, ChatMCP, network filter, tool approval)

4 participants