openmoat run on Windows (preview)
Since 0.26.0; earlier releases refuse openmoat run on native Windows. This preview tier holds writes and the process tree, and nothing else: its protection score is 55 of 100.
On native Windows openmoat run starts the program under a write-restricted token, in a job object, with the proxy variables pointing at the run's proxy. Writes outside the project, the run's temp directory and your --write paths are refused by Windows, and every process the agent starts ends with the run.
When you need it
You run an agent on native Windows (not WSL2) and want the operating system to refuse its writes outside the project.
Try it
openmoat run --print-boundary -- claudePrints the plan without starting anything: score 55/100, and what is missing (wfp_network, windows_read_deny).
Change it
Nothing to turn on: openmoat run on Windows starts this tier. openmoat mcp wrap --sandbox asks for it for an MCP server.
What it does not stop
Reads are not restricted, and the network is not held by the operating system: a program that ignores the proxy variables connects directly. Batch files (.cmd, .bat) are refused; start the agent's .exe. All its limits
Protects against code inside an allowed command (a test script, a build step, an install script) writing outside the project on native Windows: a planted file in your home, a changed .git at the project’s top, or a process left running after the session.
What it does
Section titled “What it does”Windows checks a write twice under a write-restricted token: against your own account, and again against the token’s restricting SIDs (Everyone, the logon session’s, one for the agent’s own objects, one per write root). Only the write roots grant their SID, so only they are writable.
| What | On Windows |
|---|---|
Writes outside the project, the run’s temp directory and --write paths |
refused by the token |
.git, .moat, the editors’ and CI folders at the project’s top |
refused: a deny entry on each one that exists when the run starts, and DELETE denied on the folders above it |
The same names deeper in the project, globs (*.code-workspace), places made later |
the hook’s alone; --verbose names them |
Anything whose access list grants Everyone write |
writable, as in Codex’s Windows sandbox |
| Reads | not restricted: secrets, other agents’ logins and OpenMoat’s state are readable to commands; every read deny rule is the hook’s alone |
| Network | not held by the operating system: HTTP_PROXY, HTTPS_PROXY and ALL_PROXY send programs that honour them through the run’s proxy; the record says proxy_variables |
| Processes | the agent starts suspended with only its three standard handles, in a job no process may leave and that ends every process in it when the run ends |
| Batch files | refused: cmd.exe reads a .bat or .cmd file’s arguments by its own rules |
--isolate |
refused: there is no Isolated tier on Windows |
Example
Section titled “Example”openmoat run --write $HOME\.claude -- claude # the agent's .exe, not an npm .cmd shimopenmoat run --print-boundary -- claude # the plan: score 55/100, what is missingopenmoat doctor # protection lightweight 55/100; missing: wfp_network (…); windows_read_deny (…)For the agents OpenMoat writes no sandbox for, openmoat status names the same openmoat run command on Windows as elsewhere (Protection score and strict mode); start the agent’s .exe, or node with the package’s script, not an npm .cmd shim.
The access-list entries stay
Section titled “The access-list entries stay”The first run in a folder adds one inherited entry for that folder’s own SID (S-1-5-21-…, derived from its path), which Windows hands to every file below. In a large tree that takes a while once, and the run says so; later runs find it and change nothing. The SIDs belong to no account, so the entries give no one anything; icacls <folder> lists them. A write root at or inside OpenMoat’s state directory is refused.
Hooks inside the run
Section titled “Hooks inside the run”A hook the agent starts can read the state directory but not write the audit log. So the guard, when its own token is restricted, has the run decide the call; a variable or a setting cannot make a token restricted.
Limits
Section titled “Limits”- A preview. It holds writes and the process tree, and nothing else.
- Reads are open. A command can read your keys, other agents’ logins and OpenMoat’s state; only the hook’s read deny rules stand in the way.
- The network is advisory. A program that ignores the proxy variables connects directly.
--netns=requireandrequire.run: full-boundaryrefuse to start, andsandbox.strict: truerefuses every Windows run. - No tool-shell wrapper: tool commands keep the hook relay token, and the record says so.
- MCP servers started through
npx(a batch file) are not put under this tier byopenmoat mcp wrap;--sandboxasks for it.
The details: SANDBOX.md. More in Limits.