Skip to main content
Idle sandboxes sleep automatically. Use archive when you want to keep a sandbox for later and release its active slot. Use delete when you are finished with its files and processes. Connect to a sandbox you want to manage:

Leave a sandbox idle

You do not need to send keep-alive requests. An idle sandbox can sleep after about 60 seconds without activity, and a later command or file operation wakes it. Servers, background jobs, and active connections keep it awake while they are in use. To sleep a sandbox yourself:
A sandbox you sleep and a sandbox the idle policy sleeps are in the same state: the next command wakes it, so your code does not need to know it was asleep. sandbox.wake() wakes it immediately, which is useful before a burst of work. sleep() returns whether this call put the sandbox to sleep. A busy sandbox — one running foreground work, background processes, or an exposed port — stays awake; archive it instead to stop a busy sandbox. Sleeping sandboxes keep their memory on the host and count toward your organization’s active sandbox limit, and sleep is not a durable checkpoint: use a snapshot or archive to retain recoverable work.

Archive and unarchive

Archive a sandbox to save its files, memory, and running processes for later:
An archived sandbox releases its active slot and retains its saved state. It does not run commands or serve traffic until you explicitly unarchive it:
Processes continue from the saved state. Reconnect external network connections, and allow exposed services a brief reconnect period. Archiving can take longer than sleeping, particularly when there is more state to save.

Reboot an unresponsive sandbox

Reboot preserves files but ends processes and shell sessions. Restart any servers you need afterward. Unarchive an archived sandbox before rebooting it.

Delete a sandbox

Download results or save a durable snapshot before deleting work you want to keep:
Deletion removes the sandbox’s working state. Its ID can no longer be used to access it, and a repeated delete is safe. Retained snapshots are separate resources; delete them separately when you no longer need them. See Core concepts for a comparison of states and Recovery for interrupted or unavailable sandboxes.