Skip to content

Sandbox, run and proxy commands

Commands marked terminal must be run by a person in a terminal of their own (Commands).

Command What it does Example
openmoat sandbox show The agents’ sandbox settings the policy compiles to, and every place they are stricter or wider; writes nothing openmoat sandbox show
openmoat sandbox sync Write them for the agents whose hook is installed, and re-pin. Terminal openmoat sandbox sync
openmoat run [--isolate|--no-isolate] [--write <path>]… [--env NAME]… [--netns auto|require] [--no-snapshot] [--verbose] -- <agent> [args] Run an agent and everything it starts in a sandbox made from the policy, network only through OpenMoat’s proxy (macOS 13 or later, Linux). On Linux the Isolated tier (bubblewrap) by default where it works; --isolate: refuse without it; --no-isolate: the Lightweight tier, recorded; --env NAME: let one more inherited variable through under require.run: full-boundary; --netns=require: refuse where the agent cannot get a network namespace; --no-snapshot: take no snapshot of the project (Undo an agent’s changes) openmoat run --write ~/.claude --write ~/.claude.json -- claude
openmoat run --print-boundary [--format json] -- <agent> Print the sandbox boundary this run would start with and start nothing (from 0.21.0): the tier asked for and the one that starts, each downgrade with why, the network mode, the Landlock ABI, whether tool commands get the relay token, and each restriction’s available / configured / applied / tested. Every run writes the same record to the audit log (run-boundary) (The boundary record) openmoat run --print-boundary -- claude
openmoat snapshot [--list [--format json] | --prune] Take a snapshot of the project’s files, list this project’s snapshots and what each left out, or remove those past the retention. Terminal openmoat snapshot --list
openmoat restore [<id>] [--patch] [-- <path>…] Put the project’s files back as a snapshot holds them (by default the newest one taken before an agent started): takes an undo snapshot, shows each change and asks. Terminal openmoat restore
openmoat proxy [--listen 127.0.0.1:<port>] The egress proxy, in this terminal; it serves only requests with a session credential (Claude Code’s sessions get one from their SessionStart hook) unless sandbox.proxy_serve_without_credential is set; an allowed host is reached on ports 443 and 80 unless a rule names host:port openmoat proxy
openmoat proxy ca init Make the CA openmoat run’s proxy decrypts HTTPS with, for the hosts of tls: terminate secrets only; asks, then pins it. Terminal openmoat proxy ca init
openmoat proxy install · uninstall Run it as a user service (launchd, systemd), or remove it; not on Windows yet. Terminal openmoat proxy install
openmoat proxy status [--format json] not installed, stopped, running, drift-blocked or crashlooping openmoat proxy status

See OS sandboxes and openmoat run, Egress proxy and The proxy serves agent sessions only.