Skip to content
MoorAI
// blog · buyer’s guide

MoorAI and Microsoft Execution Containers (MXC)

A sandbox decides what a command can reach. It does not decide whether the agent should have run it. Two layers, and the hole each leaves without the other.

Diagram titled Two layers: the check and the boundary. A coding agent, Codex, Copilot CLI or Claude Code (which has no MXC), passes each tool call to the MoorAI check, which answers allow, ask or block before the action runs, on the device and content-free. The commands then run inside the MXC boundary, which limits files and network at the operating-system level. MoorAI also reports whether each agent's config turns MXC on. Below, what a sandbox does not judge inside the boundary: a secret in a tool-call argument, an MCP server nobody approved, a destructive command inside the writable workspace, and data sent to a host the agent may connect to. Codex and Copilot contain the commands the agent runs, not the agent process. Two layers: the check and the boundary MoorAI decides each action before it runs. MXC contains what a command can reach. CODING AGENT Codex · Copilot CLI Claude Code (no MXC) decides the next tool call MOORAI CHECK allow · ask · block each action, before it runs on the device, content-free MXC BOUNDARY the commands it runs files · network enforced by the operating system MoorAI also reports whether each agent’s config turns MXC on. INSIDE THE BOUNDARY, A SANDBOX DOES NOT JUDGE secret in a call a key in a tool-call argument unapproved MCP a server nobody approved destructive inside the writable workspace allowed host data sent where it may connect Ask what is inside the boundary, and what judges the action. Codex and Copilot contain the commands the agent runs, not the agent process. AI security at the point. · Open source · MIT · moorai.dev MoorAI

On 9 October 2026, OpenAI said Codex on Windows has a new sandbox mode built on Microsoft Execution Containers (MXC), for “faster setup, stronger network enforcement, and granular file access controls”, on compatible Windows 11 devices. Microsoft announced MXC as generally available on 7 October. A sandbox boundary and a per-action check are two layers, and each leaves a hole without the other. This guide covers what each layer does, what MoorAI agent v1.17.1 does next to MXC, and what to ask of any stack that claims both.

What MXC contains

Microsoft describes MXC as policy-driven containment for AI agents. A developer declares the resources a workload needs, and the container enforces that boundary. The policy covers the isolation environment, how the process starts, which file system locations the workload can modify, only read or not access, inbound and outbound network connectivity, and access to the desktop. It stays outside the workload’s control, so the agent or the code it generates cannot grant itself more access. Microsoft lists OpenAI Codex and GitHub Copilot among the agents that already support MXC, and Claude Code among those that will release support.

In those agents, MXC contains the commands. OpenAI’s Codex documentation says the Windows sandbox enforces the permission profile for commands and their child processes, and recommends MXC on compatible devices. It is selected with windows.sandbox = "mxc" or preferred with prefer_mxc, and an administrator can block it with allow_mxc = false. GitHub’s documentation says Copilot CLI runs most of the commands and tools it invokes inside an operating-system sandbox, saved as sandbox.enabled in the user’s settings, and GitHub’s changelog says that local sandbox is built on MXC.

That is the right layer for what it does. A command that writes outside the paths the policy grants, or connects where the policy does not allow, is stopped by the operating system whatever the model decided. An agent sandbox bounds the damage of a bad action.

What a boundary does not judge

A boundary answers one question: can this command reach that file or that host? It does not ask whether the agent should be taking this action at all. Inside what the policy allows, four kinds of action pass:

A secret in a tool-call argument

The agent reads an API key from a file it may read, then passes it in an MCP call or a command. The file rule allowed the read; the leak is in what the agent does with the value.

A call to an MCP server nobody approved

Which MCP servers an organization has approved is not something a file or network rule expresses.

A destructive command inside the workspace

The workspace is writable by design, so a command that deletes or overwrites it is inside the policy.

Data sent to an allowed host

A host the agent legitimately needs can also receive an upload. A sandbox sees connections, not calls: the destination, not what is sent there.

What MoorAI checks before each action

MoorAI runs in the agent’s pre-tool hook: Claude Code’s own, and Codex CLI’s and GitHub Copilot CLI’s through adapters that translate each agent’s hook payload, run the same engine and policy, and translate the verdict back. Each call is judged on the device before the tool runs. In agent v1.17.1, for the four actions above:

An enrolled device enforces the policy; a device that is not enrolled coaches, and the action goes ahead. The console receives a category, a risk level and a keyed one-way hash, never the prompt, the file or the matched text.

Is the boundary actually on?

A sandbox protects only the sessions that run inside it. On a Windows device, MoorAI’s daily content-free heartbeat says, for Claude Code, Codex and Copilot, whether the commands that agent runs are inside MXC, read from that agent’s own config, and whether the device’s Windows build is new enough for MXC.

AgentWhat MoorAI readsReported containment
Codex CLIwindows.sandbox in the user or project config.toml"mxc" gives mxc, for commands. "elevated" or "unelevated" gives other (Codex’s own sandbox). Nothing set, or sandbox_mode = "danger-full-access", gives none. features.prefer_mxc gives unknown, because Codex picks MXC only if it is available when it runs.
GitHub Copilot CLIsandbox.enabled in ~/.copilot/settings.jsontrue gives mxc, for commands. false gives none. Not set, or an unreadable file, gives unknown.
Claude Codenothing to readAlways none on native Windows: Claude Code runs commands unsandboxed there and has no MXC support.

mxcCapable compares the Windows build and its update revision with MXC’s documented minimum builds. It is false on an older build and null when the build is not listed or cannot be read. The console raises Coverage: agent running without containment for a Windows agent whose containment is none, or unknown on an MXC-capable device. The finding is report-only and changes no verdict. Gemini CLI and Cursor have no documented MXC support and get no containment field; on macOS and Linux the existing sandboxOff and sandboxFullAccess flags cover the sandbox.

One rule set, two layers

The egress rules MoorAI judges on each call can also become the network part of the MXC policy, so one rule set drives both layers:

node cli/sandbox-policy.mjs --target mxc --rules policy.json

The policy goes to stdout. Only numeric hosts become MXC rules (network.egress.allow or deny, as /32 or /128), and egress.default stays deny. Hostnames, loopback, and the binary, method and path fields stay with MoorAI’s check. Every rule the target cannot express is printed to stderr with its reason; nothing is dropped silently. The container holds the addresses it can enforce at the operating-system level, and MoorAI holds the parts of the same rule that need to see the call.

Questions to ask of any sandbox + guardrail stack

Limits

Config, not process state

MoorAI reports what each agent’s config file says. Whether a running process is actually in a container is not detected; MXC documents no way to tell.

Overrides

A command-line flag (codex -c …, copilot --sandbox or --no-sandbox), a Codex profile or enterprise-managed settings can override the config file. Copilot CLI’s default is not documented, and enterprise-managed settings can require the sandbox in a way MoorAI cannot read.

Capable is not on

mxcCapable: true means the build allows MXC, not that it is switched on. Microsoft rolls it out gradually.

Commands, not the agent

Codex and Copilot contain only the commands the agent runs, not the agent process itself. No host reports an agent-scope container.

Testing status

The containment detection is unit-tested and has not run on a real Windows host. The generated MXC network policies are unit-tested, and none has been loaded by a real MXC container. The Codex and Copilot adapters are tested against fixture payloads in each vendor’s documented shape, and none has been run end to end against the live agent.

Sources


See also: MoorAI for AI coding agents, Capabilities and MCP security.

AI security at the point.
Runtime guardrails for AI agents, apps and APIs. Open source under MIT; checks run where the agent runs, and the console gets content-free signals.
Get started → See MoorAI