Save a snapshot
POST /sandboxes/{id}/snapshots. The response is 202 pending with snapshotID, templateID, and buildID. Keep the snapshot ID.
Wait for readiness
status is ready. A pending capture is not ready for restored execution. If capture fails, inspect the source machine’s preservation object before deciding whether to retry.
If snapshot detail reports retryable: true and nextAction: "retry_or_retire", retry the existing capture with bead api POST /snapshots/SNAPSHOT_ID/retry, then poll its status again. Retire it instead if you no longer need it.
Snapshot restore
small when different. Memory restores require the original CPU and memory bounds. Check restored readiness before sending work.
What is copied
The snapshot captures process memory and the machine’s disk and devices. Tenant environment values and secrets already in memory can be retained. Credential-profile inheritance requires explicit permission; a credential-bearing source can refuse capture when consent is missing.For runner-prompt credentials, authorize capture with
--allow-credential-snapshot; for a create-time profile, set metadata["bead.allowCredentialSnapshot"] to "true" in the create API request. Capture with bead sandbox snapshot create ID --name prepared --inherit-credentials, then separately set metadata["bead.inheritCredentials"] to "true" in each restore’s create API request.
