Vercel Sandboxes now automatically save and restore filesystem state between sessions. Persistence is on by default, meaning no snapshots to manage or state to track manually.
Each sandbox has a durable, customizable name 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.
Link to heading Create a persistent sandbox
When you call Sandbox.create() , persistence is enabled by default:
import { Sandbox } from "@vercel/sandbox" ;
// Filesystem is snapshotted automatically
const sandbox = await Sandbox . create ( { name : "my-sandbox" } ) ;
await sandbox . runCommand ( "npm" , [ "install" ] ) ;
await sandbox . stop ( ) ;
Create a sandbox with persistence on by default
Each automatic snapshot consumes snapshot storage , which is billed separately from compute.…