Save and restore
Create a sandbox, write a file, and save a durable checkpoint:wait_durable=True waits until the snapshot
has finished saving and can be used if the original sandbox becomes unavailable.
Restore that snapshot into a new sandbox:
Check an existing snapshot
You can create a snapshot without waiting for durability, then check it later:box.snapshots.list().
To save a checkpoint and let the original sandbox rest immediately, use
snapshot(leave_paused=True, wait_durable=True). Its next command or file access
wakes it automatically; it does not require resume().
Fork for parallel work
Create an independent copy of the current sandbox:First result. To create several copies from the same
point, request them together:
fork() returns one sandbox. Passing n returns a list, including when n=1.
You can create up to four copies per call, within your organization’s sandbox limit.
Fork between commands whenever possible. Copies inherit running processes and
connection state, so reconnect external services separately in each copy before
using them. Avoid copying a process that is partway through an external write.