Reference
Fork
Snapshot a running sandbox and spawn N copies from that state.
POST
Parent sandbox id.
Number of children to spawn. Range 1..=32.
What children inherit
Each child starts from the parent’s state at the moment of snapshot:- Python REPL state — variables, imports, open files.
- Filesystem — everything written to the parent’s rootfs so far.
- Full VM memory — page-level CoW shared with siblings; divergence only costs the pages a child mutates.
Parent impact
- Paused for ~80 ms during snapshot. Resume is automatic.
execcalls on the parent made afterforkreturns are NOT visible in children. Each child only sees pre-fork state.
Timing (Hetzner EX63)
Spawn cost is near-flat in N because children boot in parallel
(~10 ms each) and the snapshot+merge happens once.

