Skip to content

Test: Copilot Chat retries network-blocked commands inside the sandbox #319254

Closed

Description

Refs: #319181

Complexity: 3

Create Issue


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 = on
    • chat.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

  1. 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 200 or HTTP/1.1 200 OK).

Scenario 2: disabling allow-network retry uses the old unsandboxed fallback

  1. Set chat.agent.sandbox.retryWithAllowNetworkRequests = false.
  2. Start a new Copilot Chat agent mode session in the same workspace.
  3. 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

  1. added this to the 1.123.0 milestone on Jun 1, 2026
  2. changed the title [-]Test: Copilot CLI retries network-blocked commands inside the sandbox[/-] [+]Test: Copilot Chat retries network-blocked commands inside the sandbox[/+] on Jun 1, 2026
  3. alexr00 commented on Jun 1, 2026

    @alexr00
    Member

    I am blocked on Scenario 1. Scenario 2 works as expected.

  4. dileepyavan commented on Jun 1, 2026

    @dileepyavan
    MemberAuthor
    20260601-1719-46.5075002.mp4
  5. locked and limited conversation to collaborators on Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions