Vercel Sandbox Now Returns a Ready Instance Upon Creation, First Command No Longer Waits

Vercel adjusts Sandbox.create() to resolve only after snapshot restoration, returning a ready instance.
Vercel made a semantic fix to its Sandbox creation flow: Sandbox.create() now resolves only after snapshot restoration completes, returning an object ready to immediately run commands and read/write files. Previously, restoration was implicitly shifted to the first operation. The new behavior makes creation completion mean restoration is complete, the first command no longer bears extra waiting, and startup errors directly reject the creation Promise rather than surfacing at the first operation. The cost is about 50ms more at p50 for creation time, with larger increases for uncached snapshots, but total time from creation to first command returning remains unchanged. The change takes effect automatically without SDK upgrades or config changes.
Vercel has made a seemingly minor adjustment to the creation flow of its Sandbox product that actually affects developers' coding habits: Sandbox.create() now only resolves after snapshot restoration is complete, returning an object that is a ready instance capable of immediately executing commands and reading/writing files.

The Core of the Change: Fixing Promise Semantics
Previously, the timing of Sandbox.create() resolving and the sandbox actually becoming usable were misaligned. When developers got the sandbox object and executed their first command or file operation, the underlying snapshot restoration still needed to complete, and this wait was implicitly shifted onto the first operation.
The new behavior changes this semantics. Creation completion now means restoration is complete, and the first operation no longer bears any additional restoration overhead. Using the official example:
import { Sandbox } from '@vercel/sandbox';
// Resolves after snapshot restoration. Startup failures reject here.
const sandbox = await Sandbox.create();
// Runs without waiting for snapshot restoration.
await sandbox.runCommand('node', ['--version']);
In this code, when await Sandbox.create() returns, runCommand can be executed directly without needing to wait internally again.
Snapshot Restoration is the key mechanism here. A sandbox is essentially the process of building an execution environment around a saved runtime state (a snapshot): the snapshot contains a filesystem, installed dependencies, and a mirror of process memory. Vercel needs to reload this data into a runnable compute instance before it can safely execute commands or read/write files. This loading process is not instantaneous—it depends on snapshot size, whether cache is hit, and underlying resource scheduling. The old API version deferred this step until the developer initiated the first operation, resulting in the object being returned while internally in a "half-ready" state. The new version moves restoration inside Sandbox.create(), making the returned object strictly aligned with the "executable" state.
Improvements in Error Handling
Another practical benefit of this adjustment is in the error path.
According to official documentation, startup errors now directly reject Sandbox.create() rather than being exposed only at the first operation. For developers who need to immediately perform error catching and retry logic after creating a sandbox, this reduces the complexity of error localization—you know that a failure is a creation failure, not "creation succeeded but the first command mysteriously failed."
This semantic clarity is especially valuable when writing automated flows with retry mechanisms.
Promise reject semantics are also worth explaining here. In JavaScript, when you await a Promise, if that Promise is rejected, the exception is thrown directly at the await line and can be caught by the same try/catch. Under the old behavior, startup failures occurred inside the first operation, with exceptions thrown from runCommand rather than Sandbox.create(), requiring callers to catch a wider scope. The new behavior binds startup errors to the creation Promise, making error attribution at the call site more precise: what Sandbox.create() throws is a creation failure, and what runCommand() throws is a command execution failure. This boundary division allows retry strategies to set different logic for different stages, without needing to determine in a single catch block which step the error came from.
The Time Ledger: Same Total, Different Distribution
The latency hasn't disappeared—it's just been redistributed.
Snapshot restoration time now counts toward the creation phase. The official figures are: creation time increases by about 50 milliseconds at p50; for uncached snapshots, the increase may be larger. But the key point is—"total time through the first operation remains unchanged."
In other words, the end-to-end latency perceived by developers hasn't changed; what changed is where in the chain this latency appears. For monitoring dashboards that measure creation time separately, the numbers will go up; for the full chain from creation to the first command returning, the behavior is consistent.
This trade-off is worth noting: it uses a bit of latency in the creation phase in exchange for consistency in API semantics and clarity in error boundaries.
Takes Effect Automatically Without Migration
This change takes effect without upgrading the SDK or modifying any configuration. The official documentation's Sandbox.create() page provides complete details.
For projects already using Vercel Sandbox, existing code won't break—the behavior just becomes more intuitive. For newly onboarded developers, the API contract becomes more straightforward: successful creation means everything is ready.
Summary
This is a typical engineering improvement that "makes API behavior conform to language intuition." A Promise's resolve should mean "ready," not "initialization started." Vercel has moved the restoration cost from before the first operation to the creation phase. The total is unchanged, but developers have one less implicit rule to remember when writing code. For scenarios that rely on sandboxes for code execution, CI tasks, or AI Agent tool calls, this improvement in predictability is more meaningful than a 50-millisecond distribution change.
Related articles

Uber Deploys ChatGPT Work Company-Wide: AI in the Workplace Enters the Scaled Implementation Phase
Uber deploys ChatGPT Work to 30,000+ employees, extending it from engineering to all roles. We analyze its expert-engineer pairing, end-to-end automation, and questions of AI control and power concentration—insights for scaling AI in the workplace.

Shift at Midnight Hands-On: When "ID Verification" Becomes Alien Hunting
Shift at Midnight blends ID verification with horror survival in a four-player co-op game. We break down its inspection mechanics and chaotic humor.

Zelensky Recounts the Outbreak of War: I Need Ammunition, Not a Ride
Zelensky recalls the first day of war in a YouTube interview: farewell to family, rejecting Biden's evacuation offer with "I need ammunition, not a ride," and how Bucha shaped his stance on compromise and peace talks.