Repository navigation
Refine sandbox settings and native policy command - #339401
Merged
Dileep Yavanmandha (dileepyavan) merged 6 commits intoOct 3, 2026
Merged
Conversation
Update sandbox setting presentation and SDK policy serialization, remove obsolete controls, and expose /sandbox policy while preserving native command behavior. Co-authored-by: Copilot <[email protected]>
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Anthony Kim (@anthonykim1)Matched files:
|
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Network host serialization reverses allow-all/filter semantics, policy diagnostics are stale, and command completion can conflict with SDK-owned commands.
Review effort: Balanced
Findings: 2
Open (3)
What changed in this PR
Refines sandbox configuration, visibility, policy serialization, and the native sandbox-policy workflow across Agent Host and workbench surfaces.
Changes:
- Simplifies sandbox settings and removes obsolete feature/auto-approval toggles.
- Updates SDK sandbox serialization and permission-picker behavior.
- Replaces
/sandbox-policywith/sandbox policy, updating tests, fixtures, accessibility help, and policy data.
| File | Description |
|---|---|
src/vs/workbench/test/browser/componentFixtures/chat/renderChatInput.ts |
Removes obsolete toggle setup. |
src/vs/workbench/test/browser/componentFixtures/chat/chatWidget.fixture.ts |
Updates command fixture. |
src/vs/workbench/contrib/terminalContrib/chatAgentTools/test/electron-browser/runInTerminalTool.test.ts |
Updates sandbox approval tests. |
src/vs/workbench/contrib/terminalContrib/chatAgentTools/test/common/terminalChatAgentToolsConfiguration.test.ts |
Verifies revised settings metadata. |
src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration.ts |
Refines sandbox settings and removes auto-approval control. |
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts |
Restores unconditional sandbox auto-approval. |
src/vs/workbench/contrib/terminal/terminalContribExports.ts |
Removes obsolete setting export. |
src/vs/workbench/contrib/preferences/test/browser/settingsTree.test.ts |
Updates deprecation rendering coverage. |
src/vs/workbench/contrib/chat/test/common/constants.test.ts |
Removes deleted policy expectation. |
src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostChatInputPicker.test.ts |
Verifies ungated sandbox toggle. |
src/vs/workbench/contrib/chat/test/browser/accessibility/chatAccessibilityHelp.test.ts |
Updates accessible command guidance. |
src/vs/workbench/contrib/chat/common/constants.ts |
Removes experimental toggle identifier. |
src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.ts |
Removes feature-setting gating. |
src/vs/workbench/contrib/chat/browser/chat.shared.contribution.ts |
Removes toggle registration and adds search keywords. |
src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatInputPicker.ts |
Surfaces supported sandbox toggles directly. |
src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.ts |
Documents /sandbox policy. |
src/vs/sessions/contrib/providers/copilotChatSessions/test/browser/permissionPicker.test.ts |
Updates picker tests. |
src/vs/sessions/contrib/providers/copilotChatSessions/browser/permissionPicker.ts |
Removes feature-setting gating. |
src/vs/sessions/contrib/providers/agentHost/test/browser/agentHostModePicker.test.ts |
Updates mode-picker setup. |
src/vs/sessions/contrib/providers/agentHost/test/browser/agentHostModePicker.fixture.ts |
Updates fixture configuration. |
src/vs/sessions/contrib/providers/agentHost/test/browser/agentHost/agentHostPermissionPickerDelegate.test.ts |
Updates delegate tests. |
src/vs/sessions/contrib/providers/agentHost/browser/agentHostModePicker.ts |
Removes obsolete configuration listener. |
src/vs/platform/sandbox/common/settings.ts |
Removes auto-approval setting ID. |
src/vs/platform/agentHost/test/node/sessionSandbox.test.ts |
Covers working-directory serialization. |
src/vs/platform/agentHost/test/node/sandboxConfigForSdk.test.ts |
Covers filesystem and host serialization. |
src/vs/platform/agentHost/test/node/copilotSlashCommandCompletionProvider.test.ts |
Covers new command completion. |
src/vs/platform/agentHost/test/node/copilotSessionLauncher.test.ts |
Updates expected SDK configuration. |
src/vs/platform/agentHost/test/node/copilotAgentSession.test.ts |
Updates command execution/report tests. |
src/vs/platform/agentHost/test/common/agentHostPolicyReadiness.test.ts |
Removes deleted policy cases. |
src/vs/platform/agentHost/node/copilot/sandboxConfigForSdk.ts |
Revises SDK sandbox serialization. |
src/vs/platform/agentHost/node/copilot/copilotSlashCommandProvider.ts |
Uses SDK-first command resolution. |
src/vs/platform/agentHost/node/copilot/copilotSlashCommandCompletionProvider.ts |
Exposes only the policy operation. |
src/vs/platform/agentHost/node/copilot/copilotSandboxPolicyDisplay.ts |
Implements /sandbox policy report handling. |
src/vs/platform/agentHost/common/agentHostPolicySupport.ts |
Removes deleted policy classification. |
src/vs/platform/agentHost/common/agentHostPolicyReadiness.ts |
Removes deleted policy diagnostics. |
build/lib/policies/policyData.jsonc |
Regenerates policy metadata. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
Provide the SDK-required input hint without exposing a bare sandbox completion, and remove the unused ChatConfiguration import. Co-authored-by: Copilot <[email protected]>
Preserve main's legacy sandbox policy retirement while retaining the sandbox settings and slash-command updates. Co-authored-by: Copilot <[email protected]>
Connor Peet (connor4312)
previously approved these changes
Oct 2, 2026
Keep pre-merge setting warnings and active sandbox controls while retaining main's runtime policy retirement and other updates. Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Vijay Upadya (vijayupadya)
approved these changes
Oct 3, 2026
Dileep Yavanmandha (dileepyavan)
deleted the
DileepY/sandbox_settings_update
branch
October 3, 2026 01:48
3 tasks done
Alok Pandey (alok-108)
added a commit
to alok-108/vscode-docs
that referenced
this pull request
Oct 15, 2026
VS Code 1.142 removed the chat.agent.sandbox.allowAutoApprove setting and its ChatAgentSandboxAllowAutoApprove policy (microsoft/vscode#339401), and the chat.agent.sandbox.fileSystem.windows setting along with Local harness sandboxing on Windows (microsoft/vscode#340446). The docs still listed them as current settings and policies. - ai-settings: drop the two removed settings from the Local harness table. - agent-sandboxing: mark both settings as removed, describe the current approval behavior for sandboxed commands, and note that the Local harness sandboxes on macOS and Linux only. - manage-ai-settings: drop the removed policy and point admins to ChatToolsTerminalEnableAutoApprove.
Nick Trogh (ntrogh)
added a commit
to microsoft/vscode-docs
that referenced
this pull request
Oct 15, 2026
* Remove sandbox settings and policy that VS Code 1.142 removed VS Code 1.142 removed the chat.agent.sandbox.allowAutoApprove setting and its ChatAgentSandboxAllowAutoApprove policy (microsoft/vscode#339401), and the chat.agent.sandbox.fileSystem.windows setting along with Local harness sandboxing on Windows (microsoft/vscode#340446). The docs still listed them as current settings and policies. - ai-settings: drop the two removed settings from the Local harness table. - agent-sandboxing: mark both settings as removed, describe the current approval behavior for sandboxed commands, and note that the Local harness sandboxes on macOS and Linux only. - manage-ai-settings: drop the removed policy and point admins to ChatToolsTerminalEnableAutoApprove. * Correctness pass --------- Co-authored-by: Nick Trogh <[email protected]>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.


Summary
chat.agent.sandbox.allowAutoApproveand preserve the previous default sandbox auto-approval behavior, including existing network-confirmation restrictions.chat.experimental.permissionsSandboxToggle.enabled. Show the sandbox toggle wherever the provider supports it, while preserving host-schema checks and organization restrictions.addCurrentWorkingDirectory: truefor enabled sandbox configurations./sandbox-policycommand with/sandbox policycompletion. Preserve SDK-first command resolution, native aliases, raw invocation input, report formatting, and report links. Keep other SDK sandbox operations out of autocomplete without blocking manually typed native commands.No issue was supplied for this change. This PR targets
mainand is separate from #323646.Validation
npm run transpile-client— passed on the final source state.git diff --check— passed.git commitpre-commit hook (npm run -s precommit) — passed; hygiene checked all 36 staged files.npm run export-policy-data— wrote the generated catalog, then exited withEPERMwhile cleaning a temporary profile directory. The updated generated policy descriptions were subsequently verified. The exporter was not reported as fully passing.Manual verification
sandbox. Check the revised descriptions, preview tags, deprecation warnings, and domain-setting search results./sand, then/sandbox p. Confirm only the policy operation is suggested./sandbox policy. Confirm the response contains Open Sandbox Policy and opens the saved Markdown report./sandbox-policyis no longer offered by VS Code.