Martial Wehrling
← All articles
By Martial Wehrling9 min read

Coding agents: the sandbox becomes baseline infrastructure, not an option

agents-iasécuritédéveloppementgithub-copilotarchitecture

Coding agents are changing category. As long as they suggested code in an editor, the main risk was the quality of the suggestion. As soon as they run shell commands, modify a workspace, read local files, call connectors and work in the background, the topic becomes an infrastructure question.

The concrete decision: start testing coding agents in an isolated environment now, under controlled conditions. Avoid autonomous agents on a main workstation without isolation, without network denied by default and without an explicit policy on secrets. And hold off on broad rollout while the building blocks are still in preview, or while audit, cost and data residency controls aren't ready.

This isn't a theoretical signal. On June 2, 2026, GitHub announced local and cloud sandboxes for its coding assistant in public preview. Locally, the assistant can isolate the shell commands it initiates, with restricted access to the file system, the network and system capabilities. In the cloud, the assistant's command-line interface can run in an ephemeral isolated Linux environment hosted by GitHub. In parallel, Microsoft presents Microsoft Execution Containers as isolated environments for agents, with containment enforced by the operating system. Anthropic, for its part, published an analysis of containment that stresses one simple point: human approval isn't enough.

Verified facts

GitHub offers two complementary modes. Local mode isolates the commands initiated by GitHub's coding assistant and relies on Microsoft MXC. It can be enabled via /sandbox enable and governed by central policies, notably through Microsoft's device management tools or MDM systems. Cloud mode is enabled with copilot --cloud and starts a session in an ephemeral Linux environment hosted by GitHub. The cited use cases are execution isolation, sessions across several devices, offloading compute and parallelization.

GitHub's documentation specifies that these isolated environments are offered in public preview and may still change. That matters: a preview can be useful for learning, but it shouldn't be treated as a stable foundation for the whole organization without internal validation.

Microsoft ties this movement to a broader building block: Microsoft Execution Containers, in preview, whose goal is to provide enterprise-grade isolated environments for agents, with containment enforced by the operating system. The Build 2026 post compares these primitives to what containers brought to cloud-native applications. The analogy is useful, as long as you don't push it too far: an agent doesn't just run a predictable process, it decides which actions to attempt in a dynamic context.

Anthropic adds more direct security feedback. Its team explains that human-in-the-loop validation is fallible: in their observations, users approved about 93% of permission requests. The problem therefore lies in approval fatigue and overconfidence, beyond the simple absence of confirmation. Anthropic recommends file system boundaries, outbound network traffic controls and isolated environments at the operating system level. Claude Code notably applies network denied by default on macOS and Linux, and Anthropic mentions risks such as reading local configuration before a trust prompt, exfiltration of secrets, corruption of persistent memory or trust escalation between agents.

SecurityWeek also reports a self-hosted isolated environment in public beta for Claude's managed agents: tool execution can happen in an environment configured by the user or by a managed provider, while the agent loop stays with Anthropic. The point to remember isn't the exact vendor, but the model: separating the agent's intelligence, its execution environment, network policies, logs and the scope of repositories.

Analysis: an agent needs a runtime, not just a charter

For a product team, a startup or a freelancer, the question is no longer: "Which AI assistant should I pick?" It becomes: "In which runtime is the agent allowed to act?"

A modern coding agent can read a code repository, run tests, install dependencies, modify files, call a remote command-line interface, open a ticket, interact with an MCP server or trigger a continuous integration process. Each capability is useful. Each capability also increases the attack surface.

Without a sandbox, the development machine becomes the agent's implicit perimeter. That means potential access to personal files, token caches, cloud configurations, command histories, SSH keys, environment variables, neighboring repositories and services reachable on the local network. Even with a careful user, a malicious instruction in a README, a ticket, a log, a dependency or a web page can try to steer the agent toward a dangerous action.

A sandbox isn't an absolute guarantee. It reduces the blast radius. It lets you say: the agent can work here, with these files, these commands, these network destinations, these temporary secrets, these logs, and nothing more. That's exactly the kind of constraint teams have already learned to apply to application workloads. Coding agents now need the same treatment.

Decision: test now, roll out later

For a freelancer or a small team, the right decision isn't to wait passively. Practices are taking shape now, and tools will quickly build in implicit assumptions about the cloud, ephemeral environments, enterprise policies and connectors.

So test now, but on a controlled scope. Pick a non-critical repository or a low-risk internal service. Define what the agent can do: read the code, propose a patch, run the tests, open a branch, but not deploy to production or access permanent secrets. Measure what breaks: dependency installation, slow tests, missing permissions, cloud costs, insufficient logs, friction for developers.

Avoid autonomous agents on the main workstation without an isolated environment. This is especially true if the machine holds client credentials, cloud access, several repositories, personal configuration files or long-lived tokens. A confirmation prompt doesn't replace an outbound traffic policy. Good intentions don't replace a file system restriction. An agent that politely asks for permission can still push the user to approve an action they don't fully understand.

Also hold off on broad rollout if the tool is in preview, if the logs don't let you reconstruct the actions, if cloud environments don't meet your data residency constraints, or if you don't yet have a rollback strategy. Rollout should come after a protocol, not after a convincing demo.

Practical checklist for freelancers, startups and product teams

Limits and points of attention

The first risk is a false sense of security. A poorly configured isolated environment can reassure without protecting. If outbound network access stays open, if the home directory is mounted, if permanent secrets are accessible or if logs are missing, the word "sandbox" mostly becomes a label.

The second risk is vendor dependency. The primitives from GitHub, Microsoft, Anthropic or other vendors can become very convenient, but the important policies should remain expressible in a portable form: file system rights, outbound traffic, secrets, logs, environment lifecycle, CI checks.

The third risk concerns previews. The June 2026 announcements are important, but several building blocks are explicitly in preview or beta. That justifies a learning phase, not an irreversible migration.

Finally, connectors, MCP servers, internal tools and CI workflows remain critical surfaces. Even if the shell is isolated, an agent can still cause effects through an authorized API. Containment must therefore cover both the execution environment and the tools it can call.

Sources

FAQ

Should I enable a sandbox for all coding agents?

Yes for agents that run commands, read a real workspace or call external tools. For a simple completion in the editor, the need is different. The critical threshold is action: commands, file system, network, connectors, CI or remote repository.

Is a cloud sandbox safer than a local one?

Not automatically. The cloud can offer an ephemeral, reproducible environment separate from the main machine. But it also raises questions of cost, data residency, logs and vendor control. The right comparison is about the policies actually in effect, not the location.

Can I trust human confirmations?

They're useful, but insufficient. Anthropic's feedback shows that users very often approve permission requests. You therefore need to combine confirmations, file system restrictions, outbound network traffic control and limited secrets.

What first experiment should I run?

Take a non-critical repository, create an ephemeral workspace, deny the network by default, mount only the necessary files, provide a temporary token and require a CI run. The goal isn't maximum productivity on day one, but understanding the controls you need.

Do MCP servers change the risk?

Yes. They give agents new tools and therefore new paths for action. Each MCP server or connector should have minimal rights, logs, read/write separation and a clear policy on the data it can access.