Branch warm state
Use cases
- Fan out prompt, patch, or evaluator variants from one prepared repo.
- Test destructive changes in a child without touching the parent.
- Keep a warm parent while retrying independent plans in children.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Branch a running machine into an independent child.
from nullspace import Machine
parent = Machine.create(template="base")
parent.files.write("/workspace/state.txt", "common\n")
child = parent.fork()
parent.files.write("/workspace/state.txt", "parent\n")
child.files.write("/workspace/state.txt", "child\n")
print(parent.files.read("/workspace/state.txt").strip())
print(child.files.read("/workspace/state.txt").strip())
child.kill()
parent.kill()
import { Machine } from "nullspace";
const parent = await Machine.create({ template: "base" });
await parent.files.write("/workspace/state.txt", "common\n");
const child = await parent.fork();
await parent.files.write("/workspace/state.txt", "parent\n");
await child.files.write("/workspace/state.txt", "child\n");
console.log((await parent.files.read("/workspace/state.txt")).trim());
console.log((await child.files.read("/workspace/state.txt")).trim());
await child.destroy();
await parent.destroy();
# Fork a running machine into an independent child.
nullspace machine fork mch_123
curl -X POST "${NULLSPACE_API_URL}/v1/machines/mch_123/fork" \
-H "Authorization: Bearer ${NULLSPACE_API_KEY}" \
-H "Content-Type: application/json"