
Sandbox persistence is now GA
Quick Take
Vercel's Sandbox persistence feature is now generally available, automatically saving filesystem states between sessions without manual snapshots. Users can create, retrieve, or resume sandboxes easily, with persistence enabled by default, while non-persistent options are available to reduce storage costs.
Key Points
- Persistence is enabled by default, eliminating the need for manual snapshot management.
- Users can create, retrieve, or resume sandboxes by name with automatic session management.
- Non-persistent sandboxes discard their filesystem upon session end to save costs.
- Snapshot storage is billed separately from compute resources.
- Lifecycle hooks allow for custom properties and multi-tenant tracking.
Article Content
From source RSS / original summarynow automatically save and restore filesystem state between sessions. Persistence is on by default, meaning no snapshots to manage or state to track manually. Vercel SandboxesEach sandbox has a durable, that acts as a unique reference in your project. You can create, retrieve, or resume a sandbox by name. Vercel spins sessions up and down automatically, without interrupting your workflow. customizable nameWhen you call , persistence is enabled by default:Sandbox.
create() Each automatic snapshot consumes , which is billed separately from compute. For ephemeral workloads, opt out of persistence to minimize storage costs:snapshot storageTo opt out of persistence with the CLI, pass to . Non-persistent sandboxes discard their filesystem when the session ends. --non-persistentsandbox createResuming is automatic. Any call on a stopped sandbox, like or , starts a new session from the most recent snapshot.
runCommand()writeFiles()Upgrade to the latest version to create persistent sandboxes by default: Learn more about persistent sandboxes in the . documentationRead moreCreate a persistent sandboxResume a persistent sandboxOther improvementsGet started : Create a new sandbox from an existing oneSandbox. fork(): Idempotent retrieve-or-create for long-lived sandboxesSandbox. getOrCreate(): Permanently delete a sandboxSandbox. delete()Richer : Returns snapshot metadata plus active-CPU and network-transfer totalssandbox.
stop()Lifecycle hooks: and hooks for , , and onCreateonResumecreategetgetOrCreate: Assign custom properties to sandboxes for multi-tenant trackingTagspnpm install @vercel/sandbox@latest # SDKpnpm install -g sandbox@latest # CLI
Reader Mode unavailable (could not extract clean content).
Want this in your inbox every morning?
Daily brief at your local 8am — bilingual EN/中文, free.
More from Vercel AI
See more →
Opus 4.8 on AI Gateway
Claude Opus 4.8, now available on Vercel AI Gateway, excels in long-horizon agentic execution and complex coding tasks, producing clearer prose for knowledge work. Users can access it via the .anthropic/claude-opus-4.8 model in the AI SDK, benefiting from a unified API with no markup on provider pricing.

