The switch starts off.
GitHub released local sandboxing for local repository and working-tree sessions in the Copilot app as a public preview. It is off by default. The project can request extra read and write paths, read-only paths, denied paths, internet access, local-network access, Git credentials, and GitHub CLI credentials.[1]
The host operating system enforces the policy. If the host cannot enforce a requested rule, GitHub says the sandboxed shell fails instead of running without the sandbox. That fail-closed behavior matters more than the paint on the toggle.
The defaults still open useful doors.
A sandboxed session gets read and write access to its workspace and current directory. GitHub's documented default also permits outbound internet, local-network connections, authenticated HTTPS Git, and GitHub CLI authentication.[2]
Those defaults support package installation, preview servers, branch pushes, and pull requests. They also carry more reach than a read-only review task needs. Start with the job. Close every route the job does not require.
The word "sandbox" names the mechanism. The policy says what the mechanism allows.
Policy changes have a clock.
Project changes apply to new sessions or to an existing session after /restart-session. They do not rewrite a session that is already running. The /sandbox on command can change one active local session, but it does not change the project default for other sessions.[2]
That creates two records worth saving. Record the policy you intended. Record the restarted session that received it.
The escape prompt is part of the boundary.
When a tool needs blocked access, the app can offer to cancel, run once outside the sandbox, or disable sandboxing for the rest of the session. Enterprise policy can remove those escape choices.[2]
Do not hide this behind a generic approval rule. Decide which jobs may cross the boundary, who can approve that move, and what evidence the approval must leave.
Coverage stops at the named tools.
Zed's sandbox write-up makes the same broader point through a different implementation. Its operating-system restrictions cover the agent terminal and fetch tools, not every editor tool, language server, MCP server, external terminal, or program that later executes generated code.[3]
A sandbox is one control around one execution path. Test that path. Then list the paths that sit outside it.
Run four negative tests.
- Place a harmless canary file in a denied sibling folder. Prove the tool cannot read it.
- Block internet access. Prove a request to a disposable public endpoint fails.
- Block local-network access where the platform supports it. Prove a local canary service stays unreachable.
- Remove Git and GitHub CLI credentials. Prove an authenticated dry-run operation cannot borrow ambient identity.
Save the host, app build, project policy, session restart, command, result, and any outside-sandbox approval. The result is a boundary receipt, not a claim that every tool in the editor is contained.