# Forks and rewind

> A fork is a new workspace rooted at another one's snapshot. Preparing a state once and branching it is cheaper than building it again.

Part of the reachpad docs: https://reachpad.dev/docs. Rendered page: https://reachpad.dev/docs/forks. Last checked 2026-08-21.

## Fork

```bash
reachpad fork <id>
reachpad fork <id> --count 5
reachpad fork <id> --snapshot <snap>
```

`fork` branches a new workspace from the source's last save and prints its id. `--count <n>` branches several from that one save and prints an id per line, which is what makes a fan-out one command. `--snapshot` roots them at an older save instead of the current one. The source is untouched.

> Note: Every child holds a workspace slot of its own, so `--count 5` spends five of them.

## Lineage and rewind

```bash
reachpad ws lineage <id>
reachpad ws rewind <id> --snapshot <snap>
```

`lineage` lists the retained checkpoints with their ids, oldest first. `rewind` moves a workspace back to one and keeps the forward history as an auto-created fork, so rewinding loses nothing.

Both keep their v0.1 spelling under `ws` until they get a v1 verb. Automatic recovery history is managed rather than kept forever; retained forks and rewinds pin the checkpoints they depend on.

## What this is for

Install the toolchain, clone the repo, warm the caches, then pause. That workspace is now a template: fork it per task and each agent starts from a machine that is already set up. Trying three approaches to the same problem is three forks of one prepared state, running at once, none of them able to break the others.
