Snapshots

Per-clone and world snapshots — save, restore, branch, and MCP tools.

Snapshots

Save clone state at a point in time, restore it for deterministic replay, or branch a new run from a checkpoint. Snapshots work per clone and across all five deep clones as a world snapshot.

Per-clone snapshot

const blob = await clone.snapshot();
await clone.restore(blob);
DetailValue
Formatgzip JSON, schema-versioned (molar/clones-stripe@v1, etc.)
Chaos rulesPersisted in snapshot state
DashboardRun workspace → Snapshots — list, label, restore, download, delete

Branch from snapshot: spawn a new runId initialized from a saved snapshot (dashboard or SDK).

World snapshot

Pause all active deep clones, snapshot each, then resume — one named checkpoint across Stripe, Twilio, email, auth, and S3.

import { world } from "@molar/clones";

const registry = world.localRegistry([stripeClone, emailClone]);
await world.snapshot(registry, runId, "checkout-complete");
await world.restore(registry, runId, "checkout-complete");

MCP: world_snapshot, world_restore, molar_clone_world (Molar API).

MCP tools

ToolDescription
molar_clone_snapshotSave snapshot from admin URL; returns base64 gzip
molar_clone_restoreRestore from base64 bytes
world_snapshotCross-service snapshot via Molar API
world_restoreAsync world restore via Molar API
molar_clone_worldaction: snapshot | restore with name

Limits

LimitDetail
RetentionDefault ~100 MB per snapshot; org quota enforced
Fixture clonesWorld snapshots cover deep clones only — not fixture tier
Cold storageSnapshots are in-memory per run unless exported gzip