Sandbox
insbx, from Incode
insbx runs a command under one policy: what it may write, what it may read, which hosts it may reach, which environment it starts with and how much it may use. It works with any agent CLI or test suite. Where the machine cannot enforce part of the policy, it says so before anything runs and, by default, refuses.
Shipped. Ships with Incode as the insbx binary. On native Windows the network rules need insbx setup-windows once.
What it is
- Confinement is applied just before the command starts, every child inherits it, and it cannot be widened again.
- Each run gets its own temp folder, removed afterwards.
- When a run ends, everything it started is killed.
Examples
# Write only in this project; network only to the package registry; 30 minutes.
insbx run -w . --allow-host crates.io --allow-host '*.crates.io' --wall 1800 -- cargo build
# What would this machine enforce?
insbx doctorWhat is enforced
| Platform | How |
|---|---|
| Linux | Landlock for files and TCP, plus a seccomp filter for every other socket. |
| macOS | Seatbelt for files and network. |
| Windows | A write-restricted token and per-run access rules. Network rules need insbx setup-windows once; otherwise the run is forwarded to WSL2, or refused. |
Sandboxes as a service: insbx mcp
insbx mcp is an MCP server over stdio. Any MCP agent (Claude Code, Codex, Incode, your own) can create a sandbox, write files into it, run them, read the results and delete it.
MCP client config
{ "mcpServers": { "insbx": { "command": "insbx", "args": ["mcp", "--net", "proxy", "--allow-host", "pypi.org", "--allow-host", "*.pythonhosted.org"] } } }| Tool | What it does |
|---|---|
| sandbox_create | A private folder. No network unless the agent asks for proxy with hosts, within the server's limits. |
| sandbox_write_file | Write a script or file. |
| sandbox_run | Run a command or a script; returns exit code, stdout, stderr and whether it timed out. |
| sandbox_read_file | Read a result back. |
| sandbox_list | List what is in the sandbox. |
| sandbox_info | Its folder, network, limits, and what this machine enforces. |
| sandbox_destroy | Delete it. |
Defaults for every sandbox: no network, an empty environment (so no host secrets), 4 GB of memory, and 120 seconds a run (at most 600). The operator sets the ceilings when starting the server; an agent can ask for less, never more.
Other docs
How every service reaches Watchman, in one place: How it connects.