Recording vs Replay vs Snapshot vs Backup
524 words2 min read3 subsectionsFrom the README at ft 0.15.21
These four words refer to four distinct mechanisms. They are often conflated; the codebase treats them as separate concerns.
| Concept | What it captures | Why | Restored how? | Lives where? |
|---|---|---|---|---|
| Snapshot | Bounded mux topology + per-pane terminal metadata at a point in time | "What did the swarm look like?" | Inspect it or compare pane membership; ft snapshot restore <id> --dry-run emits a metadata-only, non-executable descriptor/status report |
session_checkpoints + mux_pane_state tables |
| Session checkpoint | Persistent session-progress markers | Diagnose and plan manual recovery after an unclean shutdown | Inspect with ft session; production does not execute a checkpoint restore |
session_checkpoints table |
| Recording | Time-ordered event log of everything that happened | "What did the swarm do?" | Deterministic replay via the replay subsystem | .ft/recorder-log/events.log (append-log backend) |
| Backup | The whole ft.db + manifest as a portable archive |
Disaster recovery, host migration | ft backup import |
[backup.scheduled].destination when set; otherwise <workspace>/.ft/backups/ |
When to use which
- Crashed and want my panes back? Inspect saved sessions/checkpoints, use the restore dry-run as a bounded metadata aid, and recreate the required state manually. Neither
ft watchnor the snapshot CLI currently executes recovery. - Want to debug a workflow that fired in a way you didn't expect? Recording + replay; you can re-run with the exact inputs and step through.
- Moving to a new host or recovering from disk loss? Backup. Always backup before major upgrades; the migration engine will create a safety backup automatically but explicit is better.
- Need a quick "what did this fleet look like 3 hours ago" answer? Snapshot. They're cheap to take and labeled.
Recording determinism guarantee
A recording, replayed on the same ft version with the same seed, produces byte-equal results. This is the project's definition of replay determinism. The replay subsystem owns the harness; deviations are caught by the diff engine.
Export terminal context in CASR format
Export one pane's retained native flight-recorder history as a JSON bundle of CASR canonical sessions:
ft record export-casr --pane 7 --output conversation.json
# Write JSON to stdout, or raise source admission limits for a larger recorder.
ft record export-casr --pane 7 > conversation.json
ft record export-casr --pane 7 \
--max-source-bytes 1073741824 \
--max-scan-events 500000 \
--output conversation-large.json
This command uses the workspace's configured append-log or SQLite recorder and
a read-only snapshot. It does not open a recorder writer or repair its files.
A missing or unavailable selected backend is an error; the command does not
silently read a different backend. It is included in the default
session-resume feature and does not require the casr executable to export.
Terminal input and output carry explicit terminal-observation roles. They are not authenticated conversation turns: input may be an attempted or denied send, and output may contain echoes, status lines, or screen snapshots. The bundle preserves session boundaries and history-gap information, always redacts text, and omits raw recorder identity and marker-detail strings. Exporting does not import the bundle into a provider or resume an agent.
The default bounds are 10,000 selected events, 100,000 scanned events, 256 MiB of
stored event data including framing, and 16 MiB each for selected text and the
serialized bundle. Source admission includes other panes in the retained
recorder. Exceeding a bound refuses the export instead of silently returning a
complete-looking truncated history. The bundle is fully
converted before output publication. --output uses private, no-overwrite
publication on supported platforms; stdout remains available where that
publication mechanism is unavailable. A concurrent rotation or incomplete
active frame can require retrying the read.