piagent_
← ~/map

$ cat ~/map/pi-rewind-hook.md

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.

extensions✓ Oct 16

Facts

repository
github.com/nicobailon/pi-rewind-hook ↗
GitHub Stars
★ 167
Forks
16
license
—
npm / mo
—
last push
Sep 28, 2026

install

pi install npm:pi-rewind-hook

## TL;DR

Pi extension that records exact file-state rewind points as hidden session entries, restorable during /tree navigation and across forked and resumed sessions — snapshots are git commits kept reachable under a single ref.

## Key points

## FAQ

Q What does it need to run?

Pi agent v0.74.0 or later, Node.js for installation, and a git repository — Rewind only works in git repos and stores snapshots as git commits.

Q What happens with no retention settings?

Exact history is kept with no automatic expiration, which can grow git object storage without bound over time; configure rewind.retention with maxSnapshots and maxAgeDays to prune, optionally pinning labeled entries.

Q Does it work with custom compaction setups?

Yes — with pi-custom-compaction installed, Rewind can bind an exact checkpoint to a background-summary marker's own session-tree node; without it, pi's default compaction and Rewind's native compaction checkpoints continue to work.

## References

## Related entries

Last updated: Aug 31, 2026