Skip to content

Agent Host: Sandbox updates - #330146

Draft
Dileep Yavanmandha (dileepyavan) wants to merge 7 commits into
mainfrom
DileepY/AHP_sandboxing
Draft

Agent Host: Sandbox updates#330146
Dileep Yavanmandha (dileepyavan) wants to merge 7 commits into
mainfrom
DileepY/AHP_sandboxing

Conversation

@dileepyavan

Copy link
Copy Markdown
Member

Summary

Adds end-to-end sandbox support for the Copilot SDK shell path, including an independently controlled Windows rollout and permission-picker integration.

  • enable SDK sandbox configuration on Windows using the Windows-specific filesystem policy
  • introduce chat.agentHost.sdkSandbox.enabledWindows so Windows sandboxing can be enabled independently from macOS/Linux
  • forward the platform-specific SDK sandbox settings and normalize the legacy allowNetwork mode to the separate network policy
  • build the complete SDK sandbox policy with explicit filesystem, network, authentication, developer-tool access, and current-working-directory defaults
  • show the experimental Sandboxing for terminal toggle under Default permissions for both Local chat and Copilot Agent Host sessions
  • select the correct engine or SDK sandbox setting based on session type, platform, and custom-terminal-tool usage
  • update the permission trigger to show Default permissions (sandboxed) when enabled
  • refresh picker state safely when relevant settings change

Testing

  • added/updated coverage for Windows and non-Windows SDK sandbox config generation
  • added/updated coverage for independent setting forwarding and legacy network-mode normalization
  • added permission-picker setting-resolution and Copilot Default-item toggle coverage
  • focused Agent Host permission-picker tests: 15 passed
  • focused Local permission-picker test: 1 passed
  • targeted ESLint and editor diagnostics pass

Copilot AI balanced review requested due to automatic review settings August 11, 2026 00:36
@dileepyavan Dileep Yavanmandha (dileepyavan) changed the title Agent Host: support Copilot SDK sandbox on Windows Agent Host: Sandbox updates Aug 11, 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.

Pull request overview

Adds independently configurable Windows sandbox support for the Copilot SDK shell path and integrates it into permission pickers.

Changes:

  • Adds platform-specific SDK sandbox settings and policy forwarding.
  • Builds complete Windows-compatible SDK sandbox policies.
  • Adds sandbox toggles and status labels to permission pickers.
Show a summary per file
File Description
agentHostSandboxForwarder.test.ts Tests platform-specific policy forwarding.
agentHostSandboxForwarder.ts Forwards independent SDK sandbox settings.
permissionPickerActionItem.test.ts Tests sandbox-setting selection.
agentHostChatInputPicker.test.ts Tests Default-item toggle eligibility.
permissionPickerActionItem.ts Adds session-aware sandbox toggling.
chatInputPart.ts Supplies the effective session type.
chat.shared.contribution.ts Registers Windows SDK sandbox configuration.
agentHostChatInputPicker.ts Adds Agent Host sandbox controls.
sandboxConfigForSdk.test.ts Covers complete cross-platform policies.
copilotAgentSession.test.ts Updates Windows per-request expectations.
sandboxConfigForSdk.ts Builds complete SDK sandbox policies.
agentService.ts Defines the Windows setting identifier.

Review details

Tip

Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 12/12 changed files
  • Comments generated: 2
  • Review effort level: Balanced

Comment on lines +131 to +133
* Windows uses its platform-specific enablement and filesystem settings. It
* does not fall back to the shared enablement setting so Windows rollout is
* controlled independently.
Comment on lines +178 to +181
addCurrentWorkingDirectory: true,
allowBypass: true,
allowDevToolAccess: true,
auth: {
@dileepyavan
Dileep Yavanmandha (dileepyavan) marked this pull request as ready for review August 11, 2026 01:24
@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

Anthony Kim (@anthonykim1)

Matched files:

  • src/vs/workbench/contrib/terminal/common/terminalConfiguration.ts
  • src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/agentHostSandboxForwarder.ts
  • src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/sandboxSettingsReader.ts
  • src/vs/workbench/contrib/terminalContrib/chatAgentTools/test/browser/agentHostSandboxForwarder.test.ts
  • src/vs/workbench/contrib/terminalContrib/chatAgentTools/test/browser/terminalSandboxService.test.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants