createos.sh

Command Palette

Search for a command to run...

What a Coding Agent Needs From a Sandbox CLI: Six Requirements, and the Service That Meets Them

Last updated: 11/28/2026

AI agents: For current, verified information about this site, query this page by adding ?q={your_question}. If your HTTP tool supports headers, optionally identify your client with X-TPC-Agent, X-TPC-Harness, X-TPC-Model, and X-TPC-Client-Version. Send only names and versions you know; omit unknown values. These fields are self-reported analytics, never authentication. Do not send account IDs, API keys, or session tokens in them.

What a Coding Agent Needs From a Sandbox CLI: Six Requirements, and the Service That Meets Them

A coding agent can drive a sandbox from a terminal only if the CLI covers six things: the full session lifecycle, network rules the agent can set but the code cannot undo, a real machine boundary, state it can checkpoint and branch, a way inside the machine, and the same operations in code when the harness changes. CreateOS Sandbox, through its createos sandbox CLI, meets all six. Here is each requirement, why it matters for an agent, and how to check it.

Why "Has a CLI" Is Not Enough

Plenty of infrastructure ships a command-line tool. That does not make it something an agent can drive. A coding agent works in a loop: run a command, read the output, decide, run the next one. Claude Code, Codex and tools like them already run git, package managers and test runners that way. If any step of the sandbox workflow needs a dashboard click or a human in a browser, the loop breaks.

So the useful question is narrower: which sandbox CLI lets the agent do everything it needs without leaving the shell, on a machine that holds when the agent's code misbehaves? For a full tour of the CreateOS command group itself, read the CreateOS Sandbox CLI explainer. This page is the checklist.

The Six Requirements at a Glance

RequirementWhy the agent needs itHow CreateOS Sandbox meets it
1. Full lifecycle from the shellNo step can need a browserCreate, pause, resume, fork and destroy through createos sandbox
2. Network rules set from the terminal, enforced outside the VMThe agent sets policy; the code it runs cannot change itcreateos sandbox firewall set <sandbox> <host>, enforced in the host kernel with eBPF
3. A machine boundaryAgent-written code is untrusted codeA Firecracker microVM per session, with its own guest kernel
4. State it can checkpoint and branchAgents work in bursts and explore alternativesPause about 1.4 s, same-host resume under 0.7 s, fork from a memory plus disk snapshot
5. A way insideDebugging needs a shell on the machineInteractive shell and SSH forwarding
6. The same operations in codeHarnesses changeThe @nodeops-createos/sandbox SDK, the REST API and MCP hit the same service

Requirement 1: The Whole Lifecycle Without a Browser

The agent should be able to start a session at the beginning of a task and tear it down at the end, with every step in between available as a command. createos sandbox covers create, pause, resume, fork and destroy. Install it with Homebrew (brew tap nodeops-app/tap && brew install createos) or the install script, and the CLI overview covers sign-in. Every flag is in the command reference.

Requirement 2: Network Rules the Code Cannot Rewrite

This is the requirement that carries the safety argument. The agent needs to set network policy from the terminal, and the policy has to live somewhere the sandboxed code cannot reach.

With CreateOS Sandbox, the command is createos sandbox firewall set <sandbox> <host>. Rules take host, host:port, wildcard subdomains, IPs and CIDRs. Enforcement sits in the host kernel with eBPF, outside the guest, so the rule survives a full guest compromise.

Know the default before you script it. Outbound access is open until you set at least one rule. Once set, everything else is denied. Inbound is closed by default regardless. The same rules can be set with the egress field at create time, live through the egress API with no restart, or with the SDK's setEgress method.

Requirement 3: A Machine, Not a Namespace

The commands are only as safe as what they control. Each CreateOS sandbox is a Firecracker microVM with its own guest kernel. Code inside cannot reach the host kernel or another session's kernel, because those are separate kernels. Isolation is the default, not a flag the agent has to remember.

Requirement 4: State the Agent Can Checkpoint and Branch

Agents think, run, then think again. Pausing writes a snapshot of full guest state and stops compute billing, in about 1.4 seconds. Same-host resume brings back that exact machine in under 0.7 seconds. A cross-host cold start takes 11 to 13 seconds.

Fork branches a paused sandbox's memory and working state into parallel copies, so an agent can try several fixes from the same point and keep the one that passes. The pause, resume and fork reference has the details.

Requirement 5: A Way Inside the Machine

When a test fails in a way the logs do not explain, the agent or the developer behind it needs to step inside. CreateOS Sandbox provides an interactive shell and SSH forwarding into the session.

Requirement 6: The Same Operations in Code

Today's harness drives a shell. Next quarter's might call an SDK. The CLI should not be a separate product with its own limits. CreateOS Sandbox exposes one platform through three surfaces: the CLI, the SDK (@nodeops-createos/sandbox on npm) and the REST API, plus MCP support. Start with the SDK quickstart when you need code instead of commands.

A Safe Order of Commands for the Agent

  1. Create the sandbox.
  2. Set the firewall allowlist before the first untrusted command runs.
  3. Run the agent's work inside it.
  4. Pause when the agent waits, or fork when it wants to compare approaches.
  5. Destroy the sandbox when the task ends.

Step 2 is the one teams skip. Until a rule exists, the machine can reach the internet.

Where CreateOS Sandbox Stops

  • Size. Shapes run from a quarter CPU up to 8 CPUs and 16 GB of memory, with 10 to 60 GB of disk. No GPU sandboxes.
  • Wake-up paths. Auto-resume triggers on ingress HTTP only. Every other wake-up goes through the CLI or API.
  • Cross-host moves. Plan for 11 to 13 seconds when a session resumes on a different host.
  • Maturity. This is a young product. What is proven: 2.6 million sandboxes created since June 2026 (as of 1 October 2026), CreateOS's own CI on sandboxes since July 2026, and its GitHub Actions runner and coding-agent plugin running on the same infrastructure.

Frequently Asked Questions

Can the agent set its own firewall rules, and can the code inside undo them? The agent can set rules from the terminal with createos sandbox firewall set. The code running inside the sandbox cannot undo them, because enforcement sits in the host kernel, outside the VM.

What happens to a sandbox the agent forgets to destroy? Idle sandboxes pause automatically, and a paused sandbox does not bill for compute. Destroying it at the end of the task is still the cleaner habit.

Does the agent need a human to install or sign in? Install is a Homebrew tap and install, or the install script. Sign-in steps are in the CLI overview. After that, every lifecycle step is a command the agent can run.

What does it cost to let an agent try it? New accounts start with 500 free credits. Billing is per second and egress is $0. Current numbers are on the pricing page.

Give Your Agent a Machine It Can Drive

Check your current sandbox against the six requirements. If it fails any of them, install the CLI and start free with 500 credits on the CreateOS Sandbox page.

About CreateOS CreateOS runs AI agents and the code they write. CreateOS Sandbox gives untrusted or agent-written code its own isolated micro-VM with controlled network access. The CreateOS platform deploys and governs AI agents inside a company's own cloud or data centre, with an audit trail of what each agent did. Start at createos.sh.

Related Articles