Skip to main content
Intelligence Simplified
A small robot arm working inside a sealed glass enclosure on a lab bench.

October 7, 2026

AI Coding Agent Sandbox: Files, Network, Credentials

GitHub made local sandboxing for Copilot generally available. An AI coding agent sandbox limits files, network and credentials. Here's how to set one up.

Covers week of October 5, 2026.

On October 7, GitHub announced that local sandboxing for GitHub Copilot is now generally available in Copilot CLI, the Copilot app and VS Code sessions using Agent Host. Tools and commands that Copilot starts run with restricted access to the filesystem, network, credentials and other system capabilities, based on policies set by the developer or their organization. You can limit which files agent-run commands can read or modify, control access to the internet, local networks, Git credentials and GitHub CLI credentials, and apply sandboxing to local tools including local MCP servers where supported.

It shipped off by default. Turn it on. Organizations can require sandboxing and enforce policies developers can’t weaken. It’s included at no extra cost. If you use AI to build software, an AI coding agent sandbox should now be part of your normal setup.

Why this matters for people building with AI

Coding agents run commands on your machine: installing packages, running tests, reading files. Most of the time that’s exactly what you want. But an agent that follows instructions can also follow bad ones, whether from a malicious repository, a poisoned package or text hidden in a web page it read. I wrote about GitSpawn and slopsquatting. The common thread: whatever the agent can reach, an attacker who influences the agent can reach too.

A sandbox shrinks that reach. It may not cover remote MCP servers, and some in-process file tools are checked in the app rather than isolated as a child process.

What an AI coding agent sandbox should restrict

Files

The agent should be able to read and change files in the project it’s working on, and not your home folder, SSH keys, browser profiles or other projects. This one setting removes a large share of the risk.

Network

Many tasks don’t need the internet. Where they do, such as installing packages, consider limiting access to the package registries you use. Blocking local network access protects other devices and services on your network.

Credentials

Git and GitHub CLI credentials let an agent push code and open pull requests. That’s useful, and it’s also what an attacker would want. Grant those only for tasks that need them.

Local tools and MCP servers

Local MCP servers run with your permissions unless restricted. Sandboxing them too closes a gap that’s easy to overlook. See MCP server security for how to vet them before installing.

How to start

  1. Turn sandboxing on in whichever agent you use. GitHub’s is generally available and off by default until you enable it, or until an org policy forces it. Other tools offer similar options or can run inside a container.
  2. Start strict. Allow the project folder and package registries. Add access only when a task fails for a clear reason.
  3. Keep secrets out of the project folder. Use environment variables or a secret manager, and never commit .env files.
  4. Use a separate account or machine for experiments with untrusted repositories.
  5. For teams, set policy centrally so the protection doesn’t depend on each person’s settings.

Model and tool isolation are different

GitHub makes a useful point: sandbox policies apply to tool execution regardless of which model Copilot uses. Choosing a careful model is good. It isn’t a security boundary. The boundary is what the agent’s commands are allowed to touch.

Permission defaults and “what auto mode may do” are policy. I covered that in AI coding agent permissions. This post is the mechanism: files, network, credentials.

Sandboxing and finishing an app

When I help someone finish an AI-built app, the development setup is part of the job. A project where the agent has full access to production credentials from a laptop is a risk regardless of how good the code is. Separating development from production, keeping secrets out of the repo and sandboxing the agent are quick changes that make the rest of the work safer.

Ask yourself one question

If a malicious instruction reached your coding agent today, what could it read or send? If the answer includes your SSH keys, cloud credentials or customer data, set up a sandbox before your next session.

If you’ve built an app with AI tools and want help setting it up safely for development and production, here’s how I approach Prototype to Production. A safe development setup is one of the first things we cover.

Sources

Russ Frisch

• Founder and software engineer

We take fixed-price work on data, AI workflows, and finishing apps. You work with the Intelligence Simplified team.

Expertise:

Data migration AI workflows Workflow automation Prototype to Production