Sandbox Cold Start Latency and Its Impact on Agent Throughput
Boot delays stack across every agent step, and lost state makes them worse.

Sandbox cold start latency is a tax levied on every tool call an agent makes, and because agents chain tool calls to complete tasks, that tax compounds instead of just accumulating.
Why sandbox cold starts compound across multi-step agent workflows
An agent built to patch a bug does not make a single call and return an answer. A user watching this unfold experiences something specific: the agent pauses for seconds at a time before each action, and that pause reads as a broken system even when the underlying model answered instantly.
The arithmetic behind that experience is unforgiving. A ten-step coding task running on a platform with multi-second cold starts does not pay one initialization penalty. It pays ten, one for every step that requires a sandbox to spin up, and those penalties stack in serial rather than averaging out across the task. The infrastructure beneath the agent pays that boot tax repeatedly, over and over, on a workflow that a human would experience as a single continuous task.
This is the structural reason a demo that works cleanly on a laptop can stall in production. Local execution never pays a cold start. It appears when a task runs deep, so the gap between local and production execution is invisible at low step counts and glaring at high ones.
Blaxel's 2026 sandbox guide makes this concrete with a workflow that recurs across engineering teams, a PR review agent that only runs sporadically throughout the day, and traces the organizational fallout from this problem: teams facing this overhead end up building custom orchestration layers just to manage sandbox lifecycles, which pulls engineers off the product roadmap and onto infrastructure plumbing that a better sandbox platform should have handled.
Why isolation requirements make cold starts structurally unavoidable
Cold start latency exists for a reason, and you cannot engineer it away just by making boot sequences faster. Production agents cannot share an execution environment with other workloads, because the isolation boundary that prevents one agent's code from escaping into another system is the very thing that takes time to construct. Speed and isolation sit in direct tension, and any serious infrastructure decision has to treat that tension as a design constraint rather than a bug waiting for a patch.
The need for isolation is not theoretical. An execution environment has no way to know in advance which of those categories a given piece of code falls into, so it has to treat all of it as untrusted. Blaxel's 2026 guide cites a documented incident in which a Replit AI agent deleted a production database, and that shows isolation cannot be optional even when an agent appears to be operating inside a controlled context. The appearance of control is not the same as actual containment.
The shared-kernel model, long the default for container-based isolation, has a documented failure mode that makes the case for stronger boundaries. CVE-2025-59528, a remote code execution vulnerability carrying the maximum CVSS score of 10.0, demonstrates that isolation built on a shared kernel is not sufficient for production agents handling untrusted code. That vulnerability is why microVMs have become the default isolation boundary for serious agent infrastructure, used broadly rather than reserved for especially sensitive workloads.
The isolation tiers available today carry latency profiles that track their security strength closely, and the tradeoff runs in one direction consistently. gVisor sits in the middle of that spectrum: it intercepts application system calls through a user-space kernel, giving stronger isolation than a standard container while keeping cold starts under a second. Platforms built around this layer, Daytona among them, advertise sub-90ms cold starts on managed cloud by optimizing the microVM boot path itself, showing that the tier's latency penalty is a function of implementation rather than an immovable ceiling.
None of this means the runtime boundary alone decides whether a sandbox is secure enough for a given workload. Northflank's 2026 sandbox ranking frames the evaluation correctly: the choice of isolation runtime is one part of sandbox security, and network restrictions, credential handling, and resource limits matter just as much. The right isolation tier depends on the workload in question and where it will be deployed, not on which tier claims the strongest marketing language.
State loss between invocations and its workflow-level latency tax
Cold start latency measured in milliseconds or seconds only captures part of what a sandbox costs an agent. When a sandbox cannot persist state between invocations, the agent pays a reconstruction penalty on top of the boot penalty, and that reconstruction, re-cloning repositories, reinstalling dependencies, reloading datasets, routinely dwarfs the raw boot time that gets measured and reported.
Blaxel's coding agent sandbox comparison frames this dependency precisely: whether a workflow is viable comes down to whether the sandbox resumes state from where it left off or rebuilds that state from scratch on every call. Neither of those needs is satisfied by a sandbox that treats every invocation as a fresh start.
The consequences play out differently depending on what the agent is built to do. A PR review agent forced to re-clone its target repository on every single invocation ends up spending most of its execution time on setup rather than on the review work it exists to perform. If a feature-building agent loses its working tree between steps, it cannot accumulate edits across a session. It has to reconstruct context on each call that already existed moments earlier, which turns a linear task into a repeated loop of rebuilding the same starting point.
Platforms differ sharply in how they handle this, and those differences translate directly into throughput. Standard serverless containers terminate immediately after processing a request, so agents running on them get no state continuity between calls. Perpetual standby, where compute is paused but state is preserved intact, removes the reconstruction penalty entirely: the sandbox picks up exactly where it stopped rather than approximating that state through a rebuild.
Modal's tool-calling agent guide documents a snapshot architecture built around this distinction. Filesystem snapshots, directory snapshots in beta, and memory snapshots in alpha all allow state to be restored without a full rebuild of the environment. Directory snapshots can be mounted after a sandbox has already started, which opens a pattern where project-specific state gets attached to a sandbox that was already pre-warmed and ready to receive it. The underlying lesson generalizes beyond any one platform: cold start latency as commonly measured is an undercount, because the true cost of initialization includes everything the agent has to rebuild that it previously had, not just the seconds spent waiting for a new environment to boot.
The warm-pool pattern and other architectural levers for controlling initialization cost
Teams running production agent workloads have converged on a handful of architectural patterns that share a common goal: move the expensive setup work earlier, before the agent is waiting on it, so initialization cost stops landing on the user-facing request path.
The warm-pool pattern maintains a standing pool of sandboxes that have already completed the expensive upfront work, launching a server, pulling a repository, installing dependencies, so that when an agent actually needs a sandbox, it inherits an environment that is already built rather than building one on demand. Modal's resources page on code execution sandboxes describes this as a common latency-optimization approach: the upfront work happens before any end user is sitting and waiting on it, which further reduces the latency the user actually perceives. The tradeoff is cost rather than complexity. If the pool is too small, the latency benefit disappears under load; if it is too large, the team pays to keep sandboxes idle that nobody is using.
Snapshot-based initialization takes a different route to the same destination: pre-build a filesystem or memory snapshot at a known, ready state, then restore from that snapshot rather than re-executing every setup step from scratch on each boot. Restoration from a snapshot beats re-execution only when the snapshot itself is small enough to load quickly, a condition that can fail if the underlying image has grown large and unwieldy. Modal's sandbox documentation notes that memory snapshots, currently in alpha, can cut down initialization-heavy startup times, and that a well-optimized filesystem helps containers come online without a bloated image slowing the process down.
Perpetual standby with fast resume takes the more aggressive approach of never tearing the sandbox down between calls. The economics shift accordingly: instead of paying for idle compute the whole time a sandbox sits unused, a team pays only for storage during the standby period, a model that favors agents whose work arrives in bursts rather than continuous streams.
A fourth lever addresses a cost that has nothing to do with boot time directly: network round-trip latency between the agent process and the sandbox it calls. Blaxel's platform comparison identifies this as a distinct architectural feature in its own right, separate from isolation tier or snapshot strategy, because the latency it removes accumulates specifically across sequential tool calls rather than showing up as a one-time cost.
These levers are not competing choices a team has to pick among exclusively. A production system handling real traffic typically uses warm pools to absorb burst demand, snapshots where initialization itself is heavy, and standby for the recurring single-agent workflows that benefit most when they can pick up exactly where they stopped. Which lever matters most depends on the access pattern of the agent in question, not on an abstract ranking of which technique is fastest in isolation.
Cold start and state handling across major sandbox platforms in 2026
The platforms available in 2026 make distinct tradeoffs across isolation strength, cold start speed, state persistence, and session limits, and those tradeoffs correspond to genuinely different agent access patterns rather than to one platform simply outperforming the others across the board.
Blaxel builds on microVM isolation, the same approach AWS Lambda uses, giving each workload hardware-enforced, kernel-level separation with its own guest kernel. Resume from standby lands under 25 milliseconds with full filesystem and memory state intact, including running processes, though Blaxel's own documentation notes that creating a new sandbox from a template initially takes several hundred milliseconds. Blaxel's comparison states that no competing sandbox provider currently offers unlimited standby duration. Sandboxes shift automatically into standby after 15 seconds of network inactivity, removing the need for manual lifecycle management, and agent logic runs co-located with the sandbox itself, eliminating network round-trip latency on tool calls. Compliance coverage includes SOC 2 Type II, ISO 27001, and HIPAA support through a signed BAA. The platform is CPU-focused only, with no GPU support for model training or large-model inference and no air-gapped deployment option, which points it toward latency-sensitive, stateful coding agents with recurring access patterns that need persistent state without a session cap, rather than toward ML training workloads.
Modal runs on gVisor isolation, intercepting application system calls through a user-space kernel to provide stronger isolation than a standard container while staying lighter than Firecracker microVMs. Its filesystem is engineered specifically for fast cold starts, and memory snapshots, still in alpha, can further cut down initialization-heavy startup times. Session length caps at one day, with longer-running workflows supported through snapshots and state restoration rather than a single continuous session, and standby snapshots can persist for up to one week. The platform scales to tens of thousands of concurrent sessions or more, and production users bear that out: Lovable and Quora run millions of untrusted code snippets daily, Ramp uses Modal Sandboxes for background coding agents that generate commits and pull requests, and Suno cut four months off its time-to-market compared to building the equivalent infrastructure in-house. GPU support is broad, spanning L4, A10, L40S, and A100 variants along with RTX PRO 6000, H100, H200, B200, and B300, a range unmatched in the sandbox category for ML workloads. The SDK is code-first across Python, TypeScript, and Go, letting sandbox environments be defined dynamically at runtime without YAML configuration, and it supports two distinct agent architecture patterns depending on whether the agent runs inside the sandbox or calls into it from outside. Compliance covers SOC 2 Type II, with HIPAA-compliant workloads available on Enterprise plans via BAA. The DEV Community's 2026 sandbox roundup flags that TypeScript and Go SDK support remains beta-only and that no self-hosting or bring-your-own-cloud option exists. That combination points Modal toward Python-heavy agents, ML inference and fine-tuning workloads, and teams already working inside the Modal ecosystem.
Daytona made its pivot in early 2025, moving from development environments toward AI agent infrastructure specifically, and it leads with sub-90ms cold starts on managed cloud as its primary differentiator. Isolation runs through the Sysbox container runtime, providing VM-level isolation via Linux user-namespaces rather than hardware virtualization, with state preservable on pause and a max 30-day paused session. Daytona carries the broadest feature set among the options on raw capability: native Git integration, LSP support, filesystem operations, Docker-in-Docker, and computer-use capabilities. The DEV Community's sandbox roundup notes that LangChain's team used Daytona to unblock their coding agent after hitting limitations on another sandbox platform. GPU support is available, but the open-source version demands real infrastructure expertise to run well, so Daytona suits teams that want the deepest feature set and are ready to operate the platform themselves rather than default entirely to a managed layer.
Sources
- DeltaBox: Scaling Stateful AI Agents with Millisecond-Level ...
- Snapshots | Agent Sandbox
- AI Code Sandboxes: A Comparative Security Study. Part 1 of 2 -- Engine-Level Properties (Attack Surface, Leakage, Stackability, CVE History, Patch Cadence, Fuzzing)
- How to sandbox AI agents in 2026: Firecracker, gVisor, runtimes & isolation strategies


