e2b@2.35.0
Minor Changes
-
95e4dc2: Add
sandbox.fork()andSandbox.fork(sandboxId)for forking a running sandbox. The sandbox is checkpointed in place (briefly paused, snapshotted with its full memory state, and resumed — its ID and expiration stay untouched) andcountnew sandboxes are created from that snapshot. Each fork succeeds or fails independently: the returned array contains one entry per requested fork, either a runningSandboxinstance or anError(Promise.allSettled-style). Per-fork error codes map to the same error classes as other API errors (e.g. 429 toRateLimitError).const sandbox = await Sandbox.create() const [fork1, fork2] = await sandbox.fork({ count: 2, timeoutMs: 60_000 }) if (fork1 instanceof Sandbox) { await fork1.commands.run('echo "hello from fork"') }