microsoft / microsoft/vscode

Sandbox bypass confirmation should offer disabling sandbox for the session

Open
#333,900 1 comment 0 reactions 1 assignee Claimed by @dileepyavan View on GitHub
agent-sandbox feature-request
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

When the Copilot SDK requests a sandbox bypass, VS Code currently presents its standard tool-confirmation options. The existing **Allow in this Session** choice remembers tool approval; it does not disable sandboxing for the session. As a result, users must confirm each command that legitimately cannot run inside the sandbox.

The Copilot App offers a clearer set of choices:

- Cancel
- Run once outside sandbox
- Disable sandbox and run

![Image](https://github.com/user-attachments/assets/cfaf98b5-c62c-4c79-ae43-8fd8f5c6ad79)

![Copilot App sandbox bypass confirmation](https://github.com/user-attachments/assets/efe0002f-d18a-4aa6-a36d-3e18523f33e0)

VS Code should offer the equivalent session-scoped choice when all of the following are true:

- The Copilot Runtime marks the request as a sandbox bypass.
- Sandboxing is enabled for the current session.
- Enterprise policy allows sandbox bypass.

Suggested wording: **Disable sandbox for this session and run**.

Selecting it should:

1. Approve the current command outside the sandbox.
2. Disable sandboxing only for the current session.
3. Keep the user's saved sandbox setting unchanged.
4. Make the session's unsandboxed state visible in the permissions UI.
5. Avoid offering the choice when managed policy sets `sandbox.allowBypass` to `false`.

This should be a sandbox-specific option rather than reusing **Allow in this Session**. The latter changes tool approval for future calls; it does not communicate or implement the broader security posture change of disabling containment for the rest of the session.

_🤖 Posted by GitHub Copilot on Harald's behalf._

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.