Fork flow
The snapshot is captured once regardless of how many forks you request, so forking into many sandboxes costs the same single snapshot of the original.Fork a sandbox
You can fork a running sandbox instance. The method returns a list with one entry per requested fork.Create multiple forks
Usecount to boot several sandboxes from the same snapshot in one call. With the SDKs and the CLI you can request up to 20 forks at once. The count must also be lower than your team’s concurrent sandbox limit, because the original sandbox keeps running and uses one slot.
Handle failed forks
Each fork succeeds or fails independently. Instead of throwing on the first failure, the returned list contains a connected sandbox for each fork that started and an error value for each fork that didn’t — so a partial failure doesn’t throw away the successful forks.Fork timeout
ThetimeoutMs (JavaScript) / timeout (Python) option sets how long the new forked sandboxes live and defaults to 15 seconds. It applies to the forks only - the original sandbox’s expiration is not changed.
What a fork inherits
Each fork starts from the original sandbox’s snapshot the same way a resume does, so it carries the configuration saved with that snapshot. Each fork inherits these settings from the original sandbox:- Metadata
- Internet access setting
- Network configuration, including egress rules and their header transforms or secret injection
- Workload identity token definitions
- Volume mounts
- Auto-pause and auto-resume settings
- The timeout from the fork request. See Fork timeout.
- Its own sandbox ID.
- A fresh execution ID. Workload identity tokens issued to a fork name the fork in their
subclaim, never the original sandbox. - For secured sandboxes, an envd access token scoped to the fork.
Because forks inherit network configuration and workload identity token definitions, a fork can reach the same services with the same injected credentials as the original sandbox. Only fork sandboxes into contexts where that access is acceptable.
Forking vs. Snapshots
Forking is a one-call shortcut for the common snapshot pattern: capture a running sandbox and immediately boot new sandboxes from the capture.
Use forking when you want running copies right now. Use snapshots when you want a durable checkpoint to create sandboxes from later.