Code Interpreter Sandbox Services: Running Your Model's Code With Real Isolation
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.
Code Interpreter Sandbox Services: Running Your Model's Code With Real Isolation
Choose a sandbox that gives every session its own microVM with its own guest kernel, not a container on a shared host. CreateOS Sandbox runs untrusted, model-written code in Firecracker microVMs, enforces your egress rules from the host, and bills per second. New accounts start with 500 free credits.
Introduction: why a code interpreter needs its own kernel per session
A code interpreter feature has a short pipeline. Your user asks a question, the model writes code, something runs that code, and the result comes back. The "something" decides whether the feature ships. That code is not yours: nobody on your team wrote it, reviewed it, or approved it. A prompt injection can steer it, and a hallucination can make it destructive by accident.
Running it inside your API servers, or in a container on a shared host kernel, means one escape reaches everything the host can reach. Real isolation means the code runs on a machine with its own guest kernel, where an escape lands in a disposable virtual machine. That is the bar for any sandbox service you evaluate. The rest of this post is what to demand on top of it, and where CreateOS Sandbox stands on each point. Shipping a coding agent for developers rather than an interpreter for end users? The tools for sandboxing AI coding agents guide covers that angle.
Key takeaways for a code interpreter sandbox
- Real isolation is a kernel boundary, not a process boundary. Containers share the host kernel. A Firecracker microVM boots its own guest kernel for every session.
- Isolation and network control have different defaults. Every CreateOS Sandbox session is isolated by default. Outbound access stays open until you set your first egress rule; after that, everything else is denied.
- Interpreter traffic is spiky. Sessions restore from snapshot in tens of milliseconds on an idle host, an idle-host measurement rather than an SLA, and pausing an idle session stops the meter.
- User code and data can stay inside your boundary. Bring your own compute and your own S3, R2, or MinIO bucket.
- Cost follows usage: per-second billing and $0 egress.
Why CreateOS Sandbox fits a code interpreter feature
CreateOS Sandbox was built for code your team did not write. Every session is a Firecracker microVM with its own guest kernel. Not a container, not a shared-kernel process namespace. Isolation is the default state of every session, not a setting someone has to remember to switch on.
An interpreter workload also has a shape. Sessions start per request, run for seconds or minutes, and arrive in bursts. CreateOS Sandbox restores a session from snapshot in tens of milliseconds on an idle host, an idle-host measurement rather than an SLA. Idle sessions auto-pause on a configurable timeout, and pausing stops compute billing. When you want to try several variations of one run, fork a paused sandbox to branch its memory and disk state, then keep the result that works.
And when your users' prompts carry data that cannot leave your infrastructure, the same API runs on your own machines.
What the sandbox gives your interpreter
- Per-session microVMs, sized per workload. Firecracker with its own guest kernel, from a quarter CPU up to 8 CPUs and 16 GB of RAM, with 10 to 60 GB of disk. One user's session cannot see another user's machine, which is the multi-tenant property an interpreter feature needs.
- Egress rules enforced on the host. Rules take a host, host:port, wildcard subdomains, IPs, and CIDRs. Set them in the egress field at create time, update them live with
PUT /v1/sandboxes/{id}/egressor the SDK'ssetEgress, or usecreateos sandbox firewall set. Enforcement sits in the host kernel with eBPF, outside the guest, so code inside the session cannot rewrite it or route around it. - Runtimes already installed. Default templates ship Ubuntu with Python 3.12, Node 22, Bun, Go, and Rust. Bring your own Dockerfile when the interpreter needs something else.
- A lifecycle that matches requests. Pause takes about 1.4 seconds. Same-host resume completes in under 0.7 seconds. A cross-host cold start runs 11 to 13 seconds. Auto-resume triggers on inbound HTTP only.
- Your hardware, your bucket. Bring your own compute runs the same API on customer machines. Bring your own storage works with S3, R2, and MinIO, and the control plane and storage can be self-hosted when code and data cannot leave your boundary.
- An integration surface, not a dashboard. The
@nodeops-createos/sandboxSDK on npm, thecreateos sandboxCLI, and MCP support plug the sandbox into the harness you are already building.
What is proven, and what is not yet
The published numbers:
- 2.6 million sandboxes created since June 2026 (as of 1 October 2026).
- CreateOS's own CI has run on sandboxes since July 2026, including its GitHub Actions runner and its coding-agent plugin.
- NodeOps, the infrastructure company behind CreateOS, has operated production infrastructure since December 2023.
- Traces and usage dashboards are live today.
Why the kernel boundary matters against hostile code is not a thought experiment. CreateOS published an analysis of a sandbox escape in an AI agent that shows what shared-kernel isolation costs when the code turns hostile.
Certifications: We are SOC 2 Type II and ISO 27001 certified, with reports available under NDA. One constraint, stated plainly: there are no GPU sandboxes, so an interpreter that needs GPU execution needs a different plan.
Buyer considerations: questions to settle before you commit
Ask every sandbox vendor on your list these, in this order:
- What does a session run on: its own guest kernel, or a container on a shared host kernel?
- What is the outbound network default before I set any rule? Get the answer in writing.
- Where is egress enforced: inside the guest, where the code can touch it, or on the host?
- Where can sessions run: your cloud only, or my VPC and my machines?
- What happens when a session goes idle, and what does idle cost?
- What is proven today, and what is on the roadmap?
The answers tell you which sandboxes survive a security review rather than just a demo.
Code interpreter sandbox FAQ
Is a microVM really necessary, or is a container enough for model-written code?
A container isolates processes on a shared host kernel. Model-written code is untrusted: prompt injection can steer it, and a mistake can be destructive without any attacker. A kernel-level escape from a container lands on the host. From a microVM it lands in a machine that exists for one session and is destroyed after. For code you cannot review before it runs, the per-session kernel is the baseline.
Is outbound network access locked down by default?
Inbound is closed by default. Outbound is open until you set at least one egress rule. Once set, everything else is denied, and enforcement sits in the host kernel with eBPF, outside the guest. Set rules at create time, update them live through the API or the SDK's setEgress, or use the CLI.
How fast does an interpreter session start?
A session restores from snapshot in tens of milliseconds, about 30 ms on an idle host. That figure is an idle-host measurement, not an SLA, so measure against your own workload. Pausing takes about 1.4 seconds, same-host resume completes in under 0.7 seconds, and a cross-host cold start runs 11 to 13 seconds.
Can sessions run inside our own cloud?
Yes. Bring your own compute runs the same API on your machines, and bring your own storage works with S3, R2, or MinIO. When code and data cannot leave your boundary at all, the control plane and storage can be self-hosted.
Conclusion: give the model's code its own machine
A code interpreter feature is a promise that the model's code can run without touching anything it should not. Keep that promise at the kernel boundary, enforce egress from the host, and let session state pause, resume, and fork. CreateOS Sandbox ships all of it with per-second billing and $0 egress.
Start free with 500 credits on the CreateOS Sandbox product page, check Sandbox pricing, and read the docs before your security review asks you to.
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.