If you run Kubernetes or Docker hosts already, gVisor is the obvious first step for agent code. You install runsc, point a runtime class at it, and containers that used to share the host kernel now talk to gVisor’s own application kernel instead. No vendor, no new bill. It is a good choice for many teams. This post is about the part that comes after runsc is installed: what an agent platform still needs, and how that compares with a hosted microVM sandbox such as Sandscale.
We covered the isolation models themselves in containers vs gVisor vs Firecracker. Here the question is build versus buy. gVisor facts come from the gVisor docs and its security model, read in November 2026.
What gVisor gives you
gVisor describes itself as “an application kernel that implements a Linux-like interface”, written in Go and running in user space. Its OCI runtime, runsc, integrates with Docker and Kubernetes. Each sandbox has a Sentry, the kernel that handles the application’s system calls without passing them through to the host, and each container has a Gofer, a host process that mediates file system access. The Sentry itself runs inside a restricted seccomp sandbox.
The docs are direct about the costs: the design comes “at the price of reduced application compatibility and higher per-system call overhead”, and “gVisor does not presently implement every system call, /proc file, or /sys file”. On hardware side channels, the security model says gVisor “does not provide protection” in general and points you to vendor guidance and host updates.
That is a strong, well-documented boundary that you can run anywhere, including hosts without nested virtualization. It is the boundary only. Everything below is still yours.
What you still build
1. A way to start and stop runs
An agent platform needs “give me a clean box for this run” as an API call, with a lifetime so that a crashed orchestrator does not leave boxes behind. On Kubernetes that means a controller or job wrapper that creates pods with your gVisor runtime class, labels them with the run, enforces a deadline and garbage-collects. On plain Docker it means a supervisor that does the same. Expect to handle image pulls, per-run working directories, and what happens when a node dies mid-run.
2. A command channel
Your agent does not want a pod; it wants “run this command, give me exit code, stdout, stderr, and tell me if it timed out or ran out of memory”. You will write that layer, plus streaming for long builds and truncation before the output reaches a model. (Our posts on streaming output and truncating tool output describe what a good one returns.)
3. Network policy per run
gVisor has its own network stack, but deciding which hosts a run may reach is policy, not isolation. You need deny by default, a per-run or per-project allowlist, DNS handled so that it cannot be used to leak data (see DNS exfiltration), and package registries reachable without opening the internet. On Kubernetes that is NetworkPolicy plus an egress proxy you run.
4. Secrets
Something has to fetch the credential a run needs, hand it to that run only, and make sure it stops working when the run ends. If you put it in an environment variable, any code in the box can read it, which is true of Sandscale’s Vault too. A proxy that injects credentials outside the box avoids that, but it is more to build.
5. Records and controls
For agents that touch real systems you will want: an audit trail of who started what and what it ran, tamper-evident if it is evidence; human approval for risky steps; a way to stop everything at once; and scanning for credentials in prompts and tool calls. None of that comes from a runtime.
6. Operations
Upgrading runsc across nodes, tracking compatibility breaks for the tools your agents use, capacity for bursts of runs, and patching host kernels and firmware, which gVisor’s own docs tell you to keep current.
What a hosted microVM sandbox covers
With Sandscale, items 1 to 5 are product features:
- Runs:
sandscale.sandboxes.create()in the TypeScript SDK or one REST request starts a Firecracker microVM with its own kernel;timeoutSecondssets its lifetime (server default one hour). - Command channel:
sandboxes.run()returnsexitCode,stdout,stderr,timedOutandoomKilled, with live output throughonStdoutandonStderr. - Network: mode
noneby default;allowlistuses your organization’s egress allowlist and package registry presets (npm, PyPI, Go, crates). - Secrets: Vault values reach the run in memory as environment variables, stay out of prompts, logs, the API’s answer and the audit log, and end with the run.
- Records and controls: a hash-chained audit log, human approvals, DLP on prompts and MCP tool calls, and agent policy for Claude Code through its hooks, on every plan.
Item 6 becomes our job for our cloud, and on Enterprise, Sandscale workers can run in your own AWS account.
When self-hosting gVisor is the right call
- You must run on infrastructure you already operate, outside AWS, or without nested virtualization.
- Your workloads are compatible with gVisor and you have the platform team to build items 1 to 6.
- Your volume is high and steady enough that owning the capacity is clearly cheaper.
- You need GPUs in the sandbox. gVisor documents GPU support through nvproxy, and Sandscale’s pricing page does not list GPU sandboxes.
When a hosted sandbox is the right call
- You want to ship the agent, not a sandbox platform.
- You need the governance pieces (approvals, audit, secrets, DLP) now rather than next quarter.
- Your runs are bursty or mostly waiting on a model. Sandscale bills awake vCPU-hours, and paused time and idle time between tool calls do not count; see pricing.
Whichever way you go, write down which of the six items you are covering and who owns each. The runtime is the smallest of them.