Skip to main content
A sandbox keeps its disk for its whole life, and keeps its memory and processes while paused. Nothing of a sandbox is kept after it terminates, its snapshots included.

Disk Persistence

A sandbox has a root disk, built from its image, and a separate workspace disk. Both keep every write until the sandbox terminates. A pause, a resume, a snapshot, and a change to the network policy never discard disk contents. See Linux for the paths and sizes.

Memory Persistence

A pause stops the sandbox’s virtual machine and saves its full memory, device state, and disks. A resume restores all of it on the same host. Processes continue from the instruction where they stopped, and their open files and in-memory state are intact.
  • Execs. An exec that was running at the pause reads interrupted after the resume. Its process keeps running in the sandbox, but its output stream ends. Finished execs keep their output. See Execs.
  • Network connections. Sockets survive the pause inside the sandbox. A remote end may close a connection that stays silent for the length of the pause.
  • Timeout. The timeout clock stops while the sandbox is paused.
A paused sandbox uses no CPU and does not count against the organization’s concurrency quota. A resume takes the quota back, and a resume refused for quota leaves the sandbox paused.

Copies of a Sandbox

Snapshots

A snapshot is a named copy of a running sandbox’s memory and disks. The source keeps running while the snapshot is taken. A new sandbox created from a snapshot starts with the processes and files the source had at that moment. A snapshot is usable while its source exists, and is removed when the source terminates. See Snapshots.

Forks

A fork creates one or more new sandboxes from a running sandbox’s live state in one request. Each sibling is independent from its first instruction and outlives its source. The source keeps running. See Fork.

Persistence Beyond a Sandbox

A template is a named image that the platform boots once, starts, and checkpoints when it is ready. Every sandbox created from it resumes that checkpoint. A template exists until it is deleted, independently of every sandbox. See Templates. A snapshot published as a template Preview will keep a sandbox’s live state after the sandbox terminates.

Retention

The timeout clock counts only time spent running. Common Control Plane explains activity, the timeout requests, and the minimum lifetime after a resume.

Opting Out of Persistence

A sandbox created with the default timeout and on_timeout terminates after 300 seconds of running and discards its state. A terminate request discards it at once. Terminated sandboxes keep no disk and are never resumable.