Repository navigation
Agents: explain policy-required sandboxing when it is unavailable - #344815
Merged
Ross Wollman (rwoll) merged 2 commits intoOct 28, 2026
Merged
Conversation
When organization policy requires terminal sandboxing without a bypass and the host cannot run the sandbox, the Agents window banner now says that the organization requires sandboxing, keeps the host reason and Troubleshooting Guide, and explains that terminal commands can't run until the machine meets the requirements or the admin changes the policy. It never offers Disable Sandboxing in this case. Unmanaged, bypass-allowed and fail-closed cases keep the existing banner. The required signal reuses the permissions picker's managed-floor check (host-published session policy, or local renderer policy for the local desktop host). Co-authored-by: Copilot <[email protected]> *🤖 Authored with GitHub Copilot on behalf of @rwoll.*
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the policy-specific sandbox warning change.
No open issues 🎉
What changed in this PR
Clarifies the Agent Host sandbox warning when organization policy requires sandboxing but the host cannot provide it, explaining why terminal commands are blocked and what must change.
Changes:
- Reuses the permissions picker’s policy check to identify required sandboxing.
- Adds localized policy-specific guidance while preserving existing behavior for unmanaged, bypass-allowed, fail-closed, and legacy-policy cases.
- Adds tests for banner content, actions, live policy changes, and local renderer policy.
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostSandboxNotification.test.ts | Tests policy-specific warnings and updates across policy states. |
| src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSandboxNotification.ts | Tracks required sandboxing and displays explanatory banner text. |
Review effort: Balanced
Host sandbox reasons can be long and end with a bare URL, which buried the explanation and ran it into the link when appended after the reason. Co-authored-by: Copilot <[email protected]> *🤖 Authored with GitHub Copilot on behalf of @rwoll.*
Ross Wollman (rwoll)
marked this pull request as ready for review
October 28, 2026 21:15
Ross Wollman (rwoll)
enabled auto-merge (squash)
October 28, 2026 21:15
Federico Brancasi (federicobrancasi)
approved these changes
Oct 28, 2026
Dmitriy Vasyura (dmitrivMS)
approved these changes
Oct 28, 2026
Ross Wollman (rwoll)
deleted the
agents/sandbox-required-unavailable-banner
branch
October 28, 2026 21:47
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.
When organization policy requires terminal sandboxing (no bypass) and the machine can't run the sandbox, the Agents window banner said only "Sandboxing might not work as expected". It never mentioned the policy, so users couldn't tell why Disable Sandboxing was missing or that they need a host fix or their admin.
The banner now says "Sandboxing is required by your organization but isn't available on this machine", then: "Terminal commands can't run until this machine meets the sandbox requirements or your admin changes the policy.", followed by the host reason. It offers only Troubleshooting Guide. "Required" uses the same check that locks the permissions picker's sandbox toggle. Unmanaged, bypass-allowed, and fail-closed cases are unchanged.
ea8056df)sandbox-banner-before.mp4
sandbox-banner-after.mp4
Recorded on Ubuntu 24.04 with user namespaces blocked, no
slirp4netns, and/etc/github-copilot/managed-settings.jsonset to{"sandbox": {"enabled": true, "allowBypass": false}}.Validation:
npm run typecheck-clientpassed.npm run eslinton the changed files passed../scripts/test.sh --run src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostSandboxNotification.test.ts: 124 passing.Related: #337535, #339841, #337331
🤖 Authored with GitHub Copilot on behalf of Ross Wollman (@rwoll).