Repository navigation
agentHost: allow sandbox changes when managed policy permits bypass - #341671
Merged
Dileep Yavanmandha (dileepyavan) merged 5 commits intoOct 15, 2026
Merged
Conversation
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Automatic rollback synchronization defeats selection preservation, and a nested regression test does not execute.
2 open findings
What changed in this PR
Moves managed sandbox opt-out to the session toggle, with runtime approval and rejection handling.
Changes:
- Uses session commands for managed sandbox changes; permission prompts approve individual requests only.
- Restores applied settings after rejection and updates picker state handling.
- Updates sandbox documentation and regression tests.
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostSandboxNotification.test.ts | Updates managed bypass notification expectations. |
| src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostChatInputPicker.test.ts | Updates toggle policy expectations. |
| src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatInputPicker.ts | Handles failed changes in picker presentation. |
| src/vs/sessions/contrib/providers/copilotChatSessions/test/browser/permissionPicker.test.ts | Tests editable bypass and collapsed state. |
| src/vs/sessions/contrib/providers/copilotChatSessions/browser/permissionPicker.ts | Consumes sandbox failure state. |
| src/vs/sessions/contrib/providers/agentHost/test/browser/agentHost/agentHostPermissionPickerDelegate.test.ts | Adds failure-state coverage. |
| src/vs/sessions/contrib/providers/agentHost/browser/baseAgentHostSessionsProvider.ts | Exposes and signals sandbox errors. |
| src/vs/sessions/contrib/providers/agentHost/browser/agentHostPermissionPickerDelegate.ts | Publishes observable failure state. |
| src/vs/sessions/common/agentHostSessionsProvider.ts | Adds sandbox error query. |
| src/vs/platform/agentHost/test/node/sessionSandbox.test.ts | Tests rollback and confirmation choices. |
| src/vs/platform/agentHost/test/node/copilotAgentSession.test.ts | Tests runtime commands and rejection handling. |
| src/vs/platform/agentHost/test/browser/agentHostSandboxToggle.test.ts | Tests toggle selection preservation. |
| src/vs/platform/agentHost/node/sessionPermissions.ts | Makes sandbox confirmations one-time approvals. |
| src/vs/platform/agentHost/node/copilot/copilotSessionSandbox.ts | Implements session commands and rejection reporting. |
| src/vs/platform/agentHost/node/copilot/copilotSessionLauncher.ts | Propagates explicit policy conflicts. |
| src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts | Integrates sandbox configuration handling. |
| src/vs/platform/agentHost/node/agentConfigurationService.ts | Preserves pending user selections. |
| src/vs/platform/agentHost/common/agent.ts | Removes request-bound opt-out capability. |
| src/vs/platform/agentHost/browser/agentHostSandboxToggle.ts | Separates requested and applied presentation. |
| src/vs/platform/agentHost/AGENTS.md | Documents revised sandbox behavior. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot <[email protected]>
Bhavya U (bhavyaus)
previously approved these changes
Oct 15, 2026
Co-authored-by: Copilot <[email protected]>
Dileep Yavanmandha (dileepyavan)
enabled auto-merge (squash)
October 15, 2026 03:41
Dileep Yavanmandha (dileepyavan)
disabled auto-merge
October 15, 2026 03:42
Co-authored-by: Copilot <[email protected]>
Dileep Yavanmandha (dileepyavan)
enabled auto-merge (squash)
October 15, 2026 03:51
Sandeep Somavarapu (sandy081)
approved these changes
Oct 15, 2026
Dileep Yavanmandha (dileepyavan)
merged commit Oct 15, 2026
a833a8e
into
microsoft:main
55 of 56 checks passed
3 tasks done
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.

Fixes #341677
Allow session sandbox changes when managed policy permits bypass.
If the runtime rejects a change, restore the last applied state and update the collapsed control to show it.
Tests passed: typecheck, build, lint, 180 picker tests, and 1,173 runtime tests.