Skip to main content
Choose a VM fork when several tasks need to branch from the same prepared process state. The source keeps running after capture resumes it.

Create children

Trial accounts cannot fork. Add paid credit before creating fork children.
Fork accepts 1–20 children. The API is POST /sandboxes/{id}/fork with count and timeout. It returns 202 with an operationID, a snapshot ID, and ordered pending child results. Generate the idempotency UUID before dispatch and reuse it with the identical request after a lost response; a fresh CLI invocation without that UUID can create another batch. timeout defaults to 300 seconds and accepts 1–86400 seconds. The funded lifetime includes capture waiting and does not restart when a child becomes ready.

Poll the job

Keep the returned job ID. Inspect every child result and verify memoryRestored: true for each successful child. Capture happens once; child results stay in request order. The source continues running after capture resumes it.

State and identity

Sources with an attached persistent volume cannot fork; close files and mappings, then detach the volume first. Children inherit the source’s actual CPU and memory size and machine kind. Each successful child has independent writable state and a new platform identity. Open connections break. Applications must reconnect external peers, and listeners bound to the old private address may need to rebind. Tenant secrets already in process memory can be inherited. Fork does not inherit saved credential profiles; inheritCredentials: true is rejected. Use an explicitly consented snapshot when credential-profile inheritance is required. Children receive no desktop watch grants or human-control lease.

Handle partial results

Admission and readiness are separate. Some children can succeed while others fail. Keep every successful child ID, inspect failures, and avoid treating a missing acknowledgement as proof that no machine exists. Delete all successful children and the source when your work is complete:
For independent fresh machines use fleets. For automatically cleaned-up commands use swarms.