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);
| Detail | Value |
|---|---|
| Format | gzip JSON, schema-versioned (molar/clones-stripe@v1, etc.) |
| Chaos rules | Persisted in snapshot state |
| Dashboard | Run 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
| Tool | Description |
|---|---|
molar_clone_snapshot | Save snapshot from admin URL; returns base64 gzip |
molar_clone_restore | Restore from base64 bytes |
world_snapshot | Cross-service snapshot via Molar API |
world_restore | Async world restore via Molar API |
molar_clone_world | action: snapshot | restore with name |
Limits
| Limit | Detail |
|---|---|
| Retention | Default ~100 MB per snapshot; org quota enforced |
| Fixture clones | World snapshots cover deep clones only — not fixture tier |
| Cold storage | Snapshots are in-memory per run unless exported gzip |
Related
- Core concepts — virtual clock and tenant isolation
- API & SDK — admin and control-plane APIs
- Troubleshooting — large snapshot and restore errors