Repository navigation
Closed
Labels
Milestone
Description
Refs: #319181
- macOS Joaquín Ruales (@jruales)
- Linux Raymond Zhao (@rzhao271)
Complexity: 3
Verify that Copilot Chat terminal commands that need network access first retry inside the sandbox with unrestricted network access after user confirmation, instead of immediately falling back to unsandboxed execution.
Prerequisites
- Latest VS Code Insiders
- Sign in to GitHub Copilot
- Open a trusted workspace folder
- Use Copilot Chat in agent mode
- Use macOS or Linux (Windows sandboxing currently enables sandboxing with network access, so this network-blocking scenario is not applicable there)
- Ensure the sandbox is enabled but network is not globally allowed:
chat.agent.sandbox.enabled=onchat.agent.sandbox.retryWithAllowNetworkRequests=true(default)chat.agent.sandbox.allowUnsandboxedCommands=true(default)- Do not add the test domain below to the sandbox network allowlist
- Open a Copilot Chat agent mode session in the workspace and keep it open for the whole test
Scenario 1: blocked network command requests allow-network sandbox confirmation
- In the Copilot Chat agent mode session, prompt:
Run
git fetch origin.
Expected:
- VS Code either detects the blocked domain before running, or the first sandboxed attempt is blocked by network restrictions.
- Copilot Chat retries by requesting to run the command sandboxed with unrestricted network access (
requestAllowNetwork) and provides a reason. - The confirmation/details mention unrestricted network access in the sandbox.
- The command remains sandboxed; the confirmation is not for unsandboxed execution.
- After approving, the command succeeds and shows an HTTP status line (for example
HTTP/2 200orHTTP/1.1 200 OK).
Scenario 2: disabling allow-network retry uses the old unsandboxed fallback
- Set
chat.agent.sandbox.retryWithAllowNetworkRequests=false. - Start a new Copilot Chat agent mode session in the same workspace.
- Re-issue the same prompt as in Scenario 1.
Expected:
- Copilot Chat does not request
requestAllowNetwork/ unrestricted network access inside the sandbox. - If the command cannot run because of sandbox network restrictions, the fallback confirmation is for unsandboxed execution.
- The command does not silently run outside the sandbox without confirmation.
Activity
[-]Test: Copilot CLI retries network-blocked commands inside the sandbox[/-][+]Test: Copilot Chat retries network-blocked commands inside the sandbox[/+]alexr00 commentedon Jun 1, 2026
I am blocked on Scenario 1. Scenario 2 works as expected.
dileepyavan commentedon Jun 1, 2026
20260601-1719-46.5075002.mp4