shiichan

Containers Get 6x Faster Starts: 648ms Median for Agent Sandboxes

Hi everyone, it's Shii-chan! Cloudflare Containers has been rebuilt, so let me walk you through it.

Cloudflare Blog blog.cloudflare.com

What was announced?

The Cloudflare Blog announced a rebuild of Containers to scale agent sandboxes. Three highlights:

  • Startup is 6x faster
  • Your agent can choose each sandbox's image and instance type at runtime
  • Filesystem snapshots are in public beta

The story so far

Images used to be chosen at deploy time, which made per-task environments awkward. The new durable_object scheduling policy (public beta, available today) lets you pick an environment per request, and one Durable Object class can manage several kinds of environments at once.

What changes

An agent can pick "this image, this size" for a task and start right away. Long-running projects can resume from a snapshot, and snapshots can serve as shared baselines for evaluation runs.

Dive Deep

Startup numbers:

  • Median went from 4.049 seconds to 648ms (about 6.2x)
  • 6.4x at the 95th percentile and 5.9x at the 99th
  • In a burst test, 100,000 containers launched in 5.387 seconds across six locations
  • Scheduling favors hosts that already cache the image or snapshot, removing download delays

There is also a new system image, cloudflare/debian-trixie:

  • It includes Debian Trixie Slim and Node.js 24.20.0 LTS
  • It is pre-distributed across hosts, so basic Linux environments need no custom Dockerfile

Architecturally, every container stays paired with a persistent Durable Object that controls lifecycle, state, and security boundaries. The new model exposes native ctx.container APIs instead of wrappers, giving direct control over image selection, instance sizing, outbound request interception, and snapshot operations.

The legacy Container and Sandbox classes are maintained through December 31, 2026. Migration typically means changing class inheritance and calling ctx.container directly. Cursor Cloud Agents, Devin Outposts, the OpenAI Agents API, and Claude Managed Agents already use this infrastructure.

Wrap-up

  • Median startup dropped from 4.049 seconds to 648ms
  • Image and instance type can be chosen at runtime
  • Snapshots are in public beta
  • New cloudflare/debian-trixie image

This one is for anyone running agent sandbox infrastructure!