Skip to content
Runtime

getOrCreate always returns the one sandbox that holds a name

Concurrent POST /v1/sandboxes requests with getOrCreate: true and the same name now return the same sandbox, including when that sandbox is paused, stopped with its disk kept, or being moved between regions. Previously, under load, a second sandbox could be created under the same name, and later calls by that name could return either one. A create with a name that cannot be placed at that moment, for example while capacity is short, returns 503 busy with Retry-After and creates nothing; retry it. In the Vercel-compatible TypeScript SDK, Sandbox.getOrCreate now creates a missing sandbox with getOrCreate, and so does get_or_create_sandbox in the Vercel-compatible Python SDK. Concurrent calls for the same name return the same sandbox instead of failing with 409 name_taken. resume: false still leaves a found sandbox paused.

100 free hoursin your first 30 days.

of a 1 GB machine

  • No credit card
  • Four sandboxes at once, 2 vCPU and 4 GiB each
  • Then prepaid credit from $10, no plan fee
Start free, no card
Start free, no card