GitHub Copilot CLI Sandboxing Is GA: What Actually Changed
GitHub made local sandboxing generally available for Copilot CLI on October 7. It is still off until you run /sandbox enable or your enterprise requires it.
Key takeaways
- GitHub made local sandboxing generally available on October 7, 2026 for Copilot CLI, the Copilot app and VS Code Agent Host sessions.
- It limits files, network and Git credentials for commands the agent runs, but it is off by default.
- Run /sandbox enable, confirm with /sandbox status, and use enterprise managed settings to make it mandatory.
On this page
Local sandboxing for Copilot CLI went GA on October 7, 2026, but it is off by default. Run /sandbox enable in a session, confirm with /sandbox status, and have your enterprise require it through managed settings. Once on, commands Copilot runs get restricted filesystem, network and credential access, whichever model drives the session.
Verified against
GitHub Copilot CLI local sandboxing (GA October 7, 2026), Linux prerequisite Bubblewrap 0.5.0+, against the GitHub changelog and the docs.github.com local sandboxing concept, usage and configuration pages. Checked October 2026.
GA covers three surfaces: Copilot CLI, the Copilot app, and VS Code sessions that use Agent Host. It's included with Copilot at no extra charge. That is the right control for an agent that executes model-suggested shell commands against a real checkout, and the fact that it ships switched off is the detail most changelog readers will miss.
What's actually sandboxed
The mechanism is Microsoft eXecution Container (MXC), which translates one sandbox policy into native OS controls on Windows, macOS and Linux rather than shipping three separate implementations. The scope is tools and commands that Copilot starts: which files and directories they can read or change, internet and local network access, Git and GitHub CLI credentials, and other system capabilities. It also extends to local tools and services Copilot talks to, including local MCP servers and language servers where supported.
GitHub's framing is specific: the policy applies to tool execution regardless of which model is driving the session. This is an execution boundary, not a model-safety feature, so switching models inside Copilot CLI doesn't change what the sandbox allows.
Host support matters. Per GitHub's docs as of October 2026, Linux needs Bubblewrap 0.5.0 or later plus slirp4netns, and Windows needs a recent Windows 11 build (25H2 with KB5124010 or later, or 26H1 with KB5124006 or later). On an unsupported host, /sandbox enable is refused, and an old bwrap gets reported when you open /sandbox.
Enabling it, and proving it's on
The docs are blunt: until you enable it, shell commands run with the same access as your user account.
# inside an interactive Copilot CLI session
/sandbox enable # persists to ~/.copilot/settings.json as sandbox.enabled
/sandbox status # reports whether this session is sandboxed
/sandbox policy # lists readable, writable and blocked paths
# or sandbox a single session from the shell
$ copilot --sandbox
/sandbox enable applies to the current session and to later ones, but sessions that were already open need a restart (copilot --continue) or their own /sandbox enable. That is the failure mode we'd plan for: a long-running session in another terminal that you assume is protected and isn't. GitHub calls /sandbox status the reliable check, so run it and read the output instead of trusting the status line.
What you can actually configure
The controls are the kind you'd expect from a filesystem and network jail, not a content filter. Most of them live in the interactive /sandbox interface (also /sandbox config): a Filesystem tab for user-configured paths (Read/Write, Read-Only, Denied), a Network tab for outbound connections, local network, host rules and a remote proxy, plus toggles for authenticating git and gh.
Credentials have a documented JSON shape. You can inject a token only for the hosts that need it:
// ~/.copilot/settings.json
{
"sandbox": {
"enabled": true,
"credentials": {
"envVars": {
"EXAMPLE_API_TOKEN": {
"injectHosts": ["api.example.com"]
}
}
}
}
}
Exact hostnames match only that host, and *.example.com matches subdomains but not example.com itself. Two gotchas: sandbox settings are not supported in repository-level settings files, so you can't commit a policy next to the code, and on macOS keychain access is off unless you set sandbox.userPolicy.seatbelt.keychainAccess to true in your personal settings.
The enterprise half is what matters on shared build boxes. Organizations can require sandboxing through server-managed, MDM-managed or file-based managed settings, and once required, ordinary settings and startup flags can't turn it off. Set sandbox.allowBypass to false and developers can't approve commands to run outside the sandbox either. A policy a developer can opt out of in thirty seconds is a suggestion, not a control. One subtle default: a server-managed requirement is declined on an unsupported host unless sandbox.failIfUnavailable is true, so set it if you'd rather have commands fail than run unsandboxed.
The deliberate contrast: not every agent made this choice
This rollout is worth reading next to a decision Anthropic made the opposite way. Claude Code mods hook into prompt submission, tool calls and permission checks, and they run with Claude Code's own native, unsandboxed permissions by design, because that access is what lets a mod rewrite a prompt or redact a secret before anything downstream sees it. We covered why that's a real CI risk in Claude Code mods and the unsandboxed CI risk.
Two agents, two answers to the same question: Copilot CLI restricts execution once you turn the sandbox on; Claude Code mods extend execution by design and ask you to trust the source. Neither answer is wrong in isolation, but a team running both in the same pipeline needs separate threat models for each. And an OS-level sandbox on your laptop is still weaker isolation than a disposable VM; for untrusted repos, Docker's microVM sandboxes for agents are the next step up.
Where this fits in a CI decision
We already laid out the three questions that decide whether any CLI agent belongs in a pipeline (authentication without a human, approved capability, and failure behavior) in AI CLI agents in CI pipelines. Sandboxing GA mostly answers the second question for Copilot CLI: the capability set shrinks once enabled, and the enterprise lock answers it again for anyone who doesn't trust individual developers to leave it on.
Questions people ask
Is Copilot CLI sandboxing on by default?
No. GitHub's docs say local sandboxing is turned off by default, and until you enable it, shell commands Copilot runs have the same access as your user account. Run /sandbox enable in a session (it persists to ~/.copilot/settings.json), start a one-off session with copilot --sandbox, or have your enterprise require it through managed settings so developers can't switch it off.
How do I check whether my Copilot CLI session is sandboxed?
Run /sandbox status inside the session; GitHub's docs call it the reliable check. The status line also shows "sandbox enabled" by default, and /sandbox policy lists the readable, writable and blocked paths. Sessions opened before you ran /sandbox enable elsewhere are not covered until you restart them or enable sandboxing in each one.
Can I commit a Copilot sandbox policy to my repository?
No. As of October 2026, sandbox settings are not supported in repository-level settings files. Personal settings live under the sandbox key in ~/.copilot/settings.json, and organization-wide policy goes through enterprise managed settings (server-managed, MDM-managed or file-based). For team consistency, the managed route is the one that actually holds.
The decision, concretely
- Running Copilot CLI on a shared build box today? Enable sandboxing explicitly and verify with
/sandbox status; GA does not mean on. - Setting org policy across many repos? Require sandboxing through managed settings and set
sandbox.allowBypasstofalse. - Comparing Copilot CLI to Claude Code for a CI job? Treat them as differently shaped risks, and name in the threat model which one the pipeline runs.
- Relying on a local MCP or language server alongside Copilot CLI? Confirm it's covered; GitHub says support varies.
The call we'd make
Enable Copilot CLI sandboxing now rather than waiting for your organization to mandate it, and if you manage more than a handful of developers, require it through managed settings with bypass disabled, because a sandbox a developer can disable in thirty seconds protects you from accidents and nothing else. The caveat: it only covers what Copilot starts, and only on supported hosts, so check /sandbox status before you trust it.
Sources
Cite this article
Kiril Urbonas (2026). GitHub Copilot CLI Sandboxing Is GA: What Actually Changed. DevOpsNess. Updated 2026-10-31. https://www.devopsness.com/blog/github-copilot-cli-sandboxing-rollout
[GitHub Copilot CLI Sandboxing Is GA: What Actually Changed](https://www.devopsness.com/blog/github-copilot-cli-sandboxing-rollout) (Kiril Urbonas, DevOpsNess, updated 2026-10-31)
More from DevOps
Explore more articles in this category
kaniko CVE-2026-105769: Lookalike ACR Hosts Get Your Azure Token. Rebuild on v1.25.20
A FROM line pointing at a host like x.azurecr.io.attacker.com is enough to make kaniko hand the build's Entra ID token to that host. Which kaniko forks and images are affected, how to find Azure identities in your build pods, and what to rotate.
Sign Container Images With Cosign: Keyless GitHub Actions Workflow, SBOM and In-Cluster Checks
One workflow that builds, signs keylessly with GitHub OIDC, attaches an SBOM and SLSA provenance, plus the Kyverno policy that refuses anything unsigned. Copy it, change three names, ship it.
GitLab CVE-2026-110264: A Second CVSS 10 RCE in Nine Days. Patch to 19.5.1
An unauthenticated regex-compiler RCE reaching back to GitLab 7.0, no workaround, and backports on older branches that fix only the critical bug. The exact version per branch and the commands to get there.
You might have missed
Evergreen posts worth revisiting.