← Blog

Sandscale vs Cloudflare Sandboxes: a Worker-driven container or a standalone microVM API

Cloudflare runs sandboxes as containers or Dynamic Workers behind your Worker. Sandscale runs a Firecracker microVM per agent run behind its own API. A sourced comparison of isolation, lifetime, billing, credentials and governance.

Cloudflare now documents two ways to run untrusted or generated code: Linux containers that your Worker starts, and Dynamic Workers that load untrusted JavaScript, Python or WebAssembly as a new Worker at runtime. Sandscale runs each agent run in its own Firecracker microVM behind a REST API, a TypeScript SDK and an MCP server. Both are reasonable homes for agent code. They are shaped differently, and the shape decides which one fits your stack.

Everything about Cloudflare below comes from its public docs, read in November 2026: the Sandboxes overview, Sandbox lifetime, Sandbox security and Containers pricing. Everything about Sandscale comes from sandscale.dev. Both products change; check the linked pages before you decide.

The basic shape

Cloudflare. Sandboxes are “available on Workers Paid plan” and are “accessible through a Worker”. For Linux work, a Durable Object in your Worker starts a container instance from an image and sends it commands. Cloudflare’s docs say each instance “is a microVM with its own kernel and network”. HTTP from the internet reaches the instance only through your Worker. The sandbox container uses the Durable Object scheduling policy, which the docs mark as public beta.

For JavaScript, Python or WebAssembly that only needs to call methods you hand it, Dynamic Workers load the code as a separate Worker. The Workers runtime runs it apart from your Worker, and loading it with globalOutbound: null blocks its outbound requests.

Sandscale. A sandbox is a Firecracker microVM for one run of your agent’s code, created with one request to api.sandscale.dev, sandscale.sandboxes.create() in the TypeScript SDK, or your agent over the remote MCP server. It boots its own kernel, starts from a template, and goes away when you stop it. Nothing about it depends on where the rest of your application runs.

The practical question: is your application already a Worker? If it is, Cloudflare’s model puts the sandbox next to code you already deploy, and the Worker becomes the policy point for everything the sandbox can reach. If your agent orchestrator runs somewhere else (a Node service, a queue worker, a CI job), a standalone API is less to wire up.

Lifetime: what keeps a box alive

This is the largest difference, and Cloudflare’s lifetime page is unusually direct about it.

On Cloudflare, an instance keeps running while its Durable Object is active: handling a request, running an alarm, streaming a response, or holding a WebSocket. After that, it keeps running for the inactivity timeout you set with setInactivityTimeout(), up to 6 hours. The docs add that “code that runs inside the instance does not count as activity”. A long build inside the container is stopped when the timeout ends unless something outside keeps the Durable Object busy, for example an alarm that runs more often than the timeout. The timeout also does not survive a Durable Object restart, such as a deploy, so your code must set it again.

When an instance stops, its processes and the files on its disk end with it. Container snapshots, in public beta, save the writable root filesystem, not memory or processes. A restored instance runs its entrypoint again, so a development server has to be restarted. Snapshots expire 30 days after they are created or last restored.

On Sandscale, a sandbox lives until you stop it or its own lifetime runs out (timeoutSeconds on create: server default one hour, at most 24 hours, and within your plan’s session length). It does not need outside requests to stay alive. The TypeScript SDK (1.0.0) documents what happens between calls: a sandbox that is idle between two calls is hibernated, its memory compressed in RAM, and woken by the next call. For a box that must stay awake, for example one waiting on a slow external reply, keepAwake() holds it awake for a set time with a reason people can read back. Pause keeps memory and files, and resume carries on where it stopped, so a dev server or a loaded Python session survives a pause. Pause and resume work on every plan.

If your agent waits for long, unpredictable stretches between turns and you want processes to survive the wait, that difference matters more than any price.

Billing

Cloudflare Containers bill for every 10 ms an instance is actively running, on top of the $5 a month Workers Paid plan. Memory and disk are billed on the instance type you provision; CPU is billed on active usage only. Published rates as of November 2026:

Resource Included per month Beyond that
Memory 25 GiB-hours $0.0000025 per GiB-second
CPU 375 vCPU-minutes $0.000020 per vCPU-second
Disk 200 GB-hours $0.00000007 per GB-second
Egress, North America and Europe 1 TB $0.025 per GB

Instance types run from lite (1/16 vCPU, 256 MiB) to standard-4 (4 vCPU, 12 GiB, 20 GB disk). Workers and Durable Objects usage is billed separately. The lifetime page states plainly that “an idle instance is still billed”: while it runs, memory and disk are charged “whether or not anything inside it does work”. Snapshots are free during the beta, with pricing to come at general availability.

Sandscale bills in awake vCPU-hours: one vCPU running for one hour while the box is awake. Paused time and idle time between tool calls do not count against those hours, and memory is included at 4 GiB per vCPU. Free includes 100 awake vCPU-hours a month; Pro is $25 a month billed monthly with 1,500; Team is $48 per member a month billed monthly with 2,000 per member, pooled. Beyond the plan you choose: $0.05 per awake vCPU-hour, a 500-hour pack for $10, or keep it off. The exceptions are on the pricing page: always-on workspaces, dedicated cores and storage above your allowance.

The two meters reward different behaviour. On Cloudflare you control cost by letting instances stop (short inactivity timeouts plus snapshots), and you accept that processes restart. On Sandscale the wait between tool calls is not counted without you doing anything, and you pause for longer waits.

Credentials and network

Both start closed. A Cloudflare container starts with enableInternet: false. A Sandscale sandbox starts with network mode none unless you ask for allowlist, which uses your organization’s egress allowlist and package registry presets.

Credentials are where Cloudflare has a pattern Sandscale does not offer. Its security page recommends keeping credentials in your Worker: the container sends a request without the credential, and an outbound handler in the Worker adds it after the request leaves the sandbox. The sandbox never holds the token. The same page is a good read for anyone, with a worked example of a token in a clone URL being read from .git/config by a test dependency.

Sandscale’s Vault hands secrets to the sandbox in memory as environment variables. They are kept out of prompts, logs, the API’s answer and the audit log, and they stop working when the run ends. But code inside the box can read its own environment. If your threat model says the sandbox must never hold the credential at all, Cloudflare’s outbound-handler pattern is the stronger design, and you should weigh that honestly.

Governance

Cloudflare gives you building blocks: the Worker decides what the sandbox receives, which hosts it reaches and what gets logged. Audit, approval and policy are code you write.

Sandscale ships them as product features, on every plan: human approvals with a named approver and self-approval refused, a hash-chained audit log, Vault, and DLP that scans prompts and MCP tool calls. Claude Code runs under your policy through its hooks, and Codex and Gemini CLI report every step over OpenTelemetry. Team adds SSO, roles and audit export. See security.

When to pick Cloudflare

  • Your application already runs on Workers and you want the sandbox driven by the same code.
  • You want credentials to stay outside the sandbox entirely, injected by an outbound handler.
  • Your untrusted code is JavaScript, Python or WebAssembly that only needs methods you pass it, so a Dynamic Worker is enough and no Linux machine is needed.
  • You want R2 mounts and previews served from Cloudflare.

When to pick Sandscale

  • Your orchestrator does not run on Workers, and you want a plain API, SDK or MCP server.
  • Your agent waits between turns and you want memory and processes kept across the wait, without a heartbeat.
  • You want approvals, an audit log, DLP and agent policy as features rather than code you maintain.

Two honest caveats on our side. Sandscale runs in the US (N. Virginia) today, with Europe (Frankfurt) announced and not open yet. And our service levels page says there is no availability commitment or service credit yet. If either is a blocker, it is a blocker.

Run your agents in a box of their own

Each sandbox is a Firecracker microVM. Free includes 100 awake vCPU-hours a month.

Start free

Keep reading