$ cat ~/map/pi-better-rewind-redo.md
pi-better-rewind-redo
Rewind files and conversation together from an earlier message, with multi-level redo and recovery from interrupted restores.
extensions✓ Sep 11
Facts
- GitHub Stars
- ★ 9
- Forks
- 1
- license
- Apache-2.0
- npm / mo
- —
- last push
- Sep 10, 2026
install
pi install npm:pi-better-rewind-redo## TL;DR
A pi extension that rewinds files and conversation together from an earlier message, powered by filesnap snapshots stored outside the workspace, with multi-level redo and recovery from interrupted restores.
## Key points
- $/rewind selects an earlier user message, previews the planned writes and deletions, and restores files and conversation together; /redo returns to the state before the last rewind and repeats for multiple levels.
- $A checkpoint is created when each user message starts, including messages added while Pi is working; sending a new message clears redo history.
- $Snapshots live outside the workspace — no Git repository is required, and Git history and index are left untouched.
- $/rewind-status shows checkpoints, redo history, recovery status, and storage location; /rewind-recover retries recovery after an interrupted or failed restore.
- $The official filesnap CLI is installed automatically as an npm dependency — no Rust toolchain, global filesnap installation, or environment configuration is required.
- $Requires Node.js 22.19+; developed against pi 0.85.1 and tested on Linux x64 — other platforms have not been tested.
## FAQ
Q How is this different from pi's built-in /tree and /fork?
pi's /tree and /fork navigate the conversation only. Using them creates a new checkpoint boundary and clears this extension's redo history without restoring files; /rewind and /redo are for combined file and conversation navigation.
Q What happens if a restore is interrupted?
A recovery journal is saved before files change, and files are restored before the conversation. If restoration fails, the extension tries to restore the previous state; if recovery also fails, it retains the journal and snapshots and blocks further editing until /rewind-recover succeeds.
## References
## Related entries
$ pi-rewind-hook
Pi extension that records file-state rewind points so /tree navigation, fork, and resume can restore exact file snapshots alongside the conversation.
$ pi-duo
Two persistent, resumable peer agents — Austin implements up front, Tony verifies behind — sharing each other's live session context.
$ CCompactor
Turns finished coding-agent sessions — Pi, Claude Code, Codex — into compact, verified, provenance-linked handoff artifacts, in TypeScript.
## Guides
Last updated: Sep 11, 2026