How to rewind and branch¶
Reyn's time-travel lets you rewind to a past checkpoint and optionally branch from that point. This guide covers the available commands and UI.
For how it works under the hood, see Time-Travel concepts.
Open the rewind picker¶
This opens an interactive checkpoint picker in the TUI, listing the checkpoints on the current branch — plus any abandoned branches, as a tree, when there are any (#3987 ②). Each row shows:
| Column | Description |
|---|---|
| seq | Global sequence number of the checkpoint |
| time | Timestamp when the checkpoint was created |
| kind | Boundary type: turn / plan-step |
| anchor | The first line of the human prompt active at that checkpoint (truncated to 80 characters), when one is known — a hint for which checkpoint to pick, not the full conversation |
| owner | Shown only when relevant: (owner unknown) if the checkpoint's owning session couldn't be determined, or (agent/sid) if it belongs to a session other than the one you're rewinding — a checkpoint that already matches carries no marker |
The picker's own title states which of the two rewind shapes below Enter will perform — session-local to your current session by default — before you pick a row.
Navigate with ↑ / ↓, select with Enter — selecting a row does exactly what typing /rewind <seq> for that row does. Press Esc to close without rewinding.
Over --connect (the remote client), the same checkpoints are printed as a plain text list instead: the picker is a local region and is not carried on the wire. Rewind from there with /rewind <seq>.
Rewind to a specific seq¶
Rewinds this session only: your conversation state is restored to seq N, every other session stays exactly where it was. This is the default — add global to rewind every session instead:
A rewound-past future is never lost — it stays reachable as an abandoned branch (the picker's tree view still shows it, and typing its seq again switches back). What a rewind genuinely costs: a cancelled in-flight turn's re-run spends budget again, a target past the retention window is genuinely unreachable, and a global rewind stops every OTHER session's in-flight work too — not just this one's.
User workspace files remain at HEAD either way — Reyn time-travels its own .reyn/ state only.
Rewind vs fork-switch¶
/rewind <N> is a unified checkout, so the same command covers both directions:
- A seq on the current branch: undo (rewinds the current branch).
- A seq on an inactive branch: fork-switch (activates that branch).
The picker (bare /rewind) shows abandoned branches too, when there are any — as a tree, each branch's checkpoints indented under its own header, an abandoned one marked. A session that has never forked still sees the plain current-branch list it always has.
Web edit (Phase 2d)¶
When using Reyn through the web interface (AG-UI SSE / A2A), /rewind opens the same checkpoint picker. After selecting a checkpoint to branch from, the web edit flow presents the original message for you to retype your edited version and submit — inline prefill is not supported in the web surface, so you enter the replacement text directly. Submitting creates a new fork from the rewound checkpoint.
Pending features¶
| Feature | Status |
|---|---|
/rewind with in-turn edit (ctrl+t) to create a new fork-and-edit branch |
✅ Phase 2c, landed |
| Branch tree view in the picker (checkpoints on abandoned branches, not just the current one) | ✅ #3987 ②, wired — bare /rewind shows both branches as a tree (abandoned marked); /rewind <N> already fork-switches to an inactive branch's seq |
Esc Esc double-tap shortcut to open the picker |
⏳ not yet wired — open it with /rewind |
/rewind picker over AG-UI SSE / A2A web surface; web edit via AskUserMessage UX |
✅ Phase 2d, landed |
Retention window config (retention: keep_generations: N) — considered, decided not to wire (#3987, 2026-08-11): the WAL/generation GC already runs correctly on the default live-only floor, throttled at every chat-turn boundary, with no unbounded-growth risk. The only thing a retention: config block would have added is a deeper undo window than the live floor — a capability nobody had asked for while it sat unconfigurable. RetentionPolicy.from_config was removed rather than left dead.