Our website has a repair agent that fixes failing builds and checks on techfabric.com. It picks up its issues every hour, unattended, so nobody is there to click an approval prompt. We built its sandbox by hand: its own Linux user with no sudo and an empty environment, firewall rules that leave it nothing but loopback, and a proxy as the only way out.
Microsoft Execution Containers (MXC) put a boundary like ours around an agent, as a policy the operating system enforces, on Windows, macOS and Linux. Microsoft's announcement says they've been generally available since 7 October. Ours is a 129-line shell script and a set of iptables rules, and most of what it does is the kind of thing an MXC policy declares.
That matters to any company letting AI agents work on its own machines. A coding agent asked to update a deployment may need to read the production server configuration to understand it, and without a boundary outside the agent nothing stops it from changing that file. An approval dialog helps while a developer is watching, and it does nothing for an agent running unattended overnight. A policy file in the repository also changes who can review the boundary. A change to what the agent may reach goes through review like any other change, while a script like ours gets read by the person who wrote it.
Why our repair agent needed walls
The repair agent reads issue reports and run logs that other agents wrote, and those can carry the words of an emailed idea. Then it runs the website's build, which runs code it can edit. So we treat everything it reads as untrusted and give it nothing worth stealing.
It runs Claude Code headless, with an explicit tool allowlist and never a permission bypass, as a user called repairbot. That user is outside the sudo, docker and adm groups, and the setup refuses to start the agent if sudo -l says it may run anything. There's no GitHub token and no model key in its environment. The proxy that holds the gateway token runs as another user, whose memory and environment repairbot can't read.
The firewall accepts its traffic only to the proxy's two ports and to the ephemeral range where the test suite's own servers listen. It can't reach the name resolver either, because a DNS lookup is a way out too. While packages install, the egress proxy opens tunnels to npm's registry and nowhere else, and it's killed before the agent starts. The agent edits a clone whose remote points at file:///nonexistent/repair-sandbox, and every push to GitHub happens from the job's own checkout after every repairbot process is dead.
We'd keep one step in any version of this, and that's the proof. Before the agent runs, the script tries to reach github.com and to resolve a name as repairbot, and the job fails if either works. If a boundary is only configured, nobody has tested it.
Our script next to an MXC policy
An MXC policy declares the process that starts, the files it may modify, read or never touch, and its network, and MXC enforces it with a backend that suits the platform. On Linux, where our runner is, the process container's backend is Bubblewrap. This is how we'd map the script onto it. The network and file rules move into the policy, and the secrets, the proof step and the pushes stay ours whatever runs underneath.
| What our sandbox does | How the script does it | What we'd use in MXC |
|---|---|---|
| Keeps the agent off the network | iptables owner rules: two proxy ports and the ephemeral range, everything else rejected | Bubblewrap's own network namespace, outbound denied by default, one proxy in runtimeConfig.networkProxy |
| Keeps it out of the job's checkout | A separate clone, owned by repairbot, in a 0700 home |
The clone as the one location it may modify, the rest read-only or denied |
| Keeps secrets out of reach | env -i, and the token held by a process under another user |
Still ours: the proxy holds the token, and the policy never names it |
| Proves the walls hold | A curl and a name lookup that must fail | Still ours, run inside the container before the agent starts |
| Writes to GitHub | Only from the job's checkout, after the sandbox is killed | Still ours: the container never gets a credential that can push |
It wouldn't be a line-for-line copy.
Bubblewrap gives the sandbox only its own loopback (Bubblewrap backend), so the host's two proxy ports disappear from view, and the test suite's servers would live inside the container where they belong. We'd put one proxy in front of both of today's doors and let it route the model traffic and the npm install.
The last three rows are why a policy file doesn't retire the script. MXC decides what the process can touch. Which credentials exist, where they live and who pushes are decisions the workflow makes around it.
How we'd write the first policy
Nobody knows an agent's full resource list before it runs, so we wouldn't guess it. MXC records what a policy would have denied. In permissive mode the operation goes ahead and leaves evidence, and in learning mode it's blocked and written to a JSON activity report.
Learning mode's capabilities are Windows-only for now, per the repository's learning-mode guide, and the README warns that the separate --audit flag turns off all sandbox security for the workload it analyses. On our Linux runner we'd do it the slow way instead. We'd run the old sandbox and the new container on the same repair issues, compare the fixes and the network log, and switch only when the container reaches nothing the script blocked. Anything it reaches that the old sandbox didn't means narrowing the policy and running again, and the proof step stays in front of every run after the switch.
Where MXC stops
MXC contains a process. It doesn't contain the model's judgement about data it has already been given, and a harness that contains only the tool processes it spawns leaves the agent's own file and network work outside the boundary. Our sandbox starts the agent itself as repairbot, so its own reads and network calls hit the same walls as the commands it runs, and we'd contain the whole agent process in MXC too.
The boundary also stops at the network call. If an agent calls a hosted tool that queries a warehouse, that tool's own permissions decide which rows come back. That's why the data platform's own permissions still matter, as in Unity Catalog agent identity and row filters. An agent whose model and tools all run in a managed cloud service gets nothing from MXC, because there's no local process to contain.
Microsoft lists Anthropic's Claude Code among the tools releasing MXC support, and Microsoft Intune management of organisation-wide constraints is still to come. Our repair agent is Claude Code, so that's the release we'd wait for before moving it.
The first agent we'd contain
We'd start with the agent nobody watches. For us that's the repair agent, and for most companies it's a build agent that runs overnight. It has nobody to click a prompt, and its tasks repeat, so its policy is quick to learn. We'd add the proof step before anything else, then write the network rule, and keep the policy in the repository beside the workflow that starts the agent.
Containment is one layer of how we build AI agents for clients, and TechFabric Harness is where the approvals and sandboxed execution live in our own agent stack. The other side of an agent's reach, which web pages it reads, is in moving web reading into Harness.
Frequently asked questions
Which sandbox does MXC use on each operating system?
On Windows 11 the default is MXC's process container, with Windows Sandbox, WSLc, MicroVM, Hyperlight and the isolation session as alternatives, several of them marked experimental. Linux defaults to Bubblewrap, with LXC, MicroVM and Hyperlight as alternatives, and macOS runs on Seatbelt alone (MXC repository). The policy stays the same across them, and the backend decides how strongly it's enforced.
Which languages can start an agent inside MXC?
Microsoft publishes SDKs for Rust (mxc-sdk), .NET (Microsoft.Mxc.Sdk) and Node (@microsoft/mxc-sdk), and the repository is MIT-licensed. On Windows, wxc-exec.exe takes a JSON container request directly, which is the path for testing a policy or for a tool that can't embed an SDK. An agent harness written in another language would shell out to that executor or wrap one of the three SDKs.
What does MXC's session container add for an agent that drives a UI?
Separation from the person whose machine it is. The session container, on Windows 11 only, runs the agent under its own Windows account and session, apart from the user's desktop, clipboard and input, which matters for an agent that clicks through a person's applications while they keep working.