What is recorded
After every Edit, Write, MultiEdit or NotebookEdit the agent performs, gitvow writes the working tree into a snapshot commit and records it under a ref that belongs to the session:- The snapshot’s parent is the current HEAD, so
git diff HEAD <snapshot>shows exactly what the agent had changed at that moment. - Ignored files are excluded, and so is a default exclusion list (
.env*,*.pem,*.key,*secret*,*credential*, and gitvow’s own.gitvow/and.claude/directories), so a snapshot never contains more than a carefulgit add -Awould. Excluded paths that are already committed stay as they are in HEAD. - The ref is not under
refs/headsorrefs/notes, so it never appears ingit log, is never pushed by the pre-push hook, and is invisible to branches.git gckeeps it because a ref points at it. - The session note on a later commit names the last snapshot taken before that commit, which ties the two records together.
What it is for
- Rewind code, not conversation. Restore a snapshot into a scratch worktree and read or run the agent’s version. The transcript stays local by design; a snapshot is the code side of that story.
- See what a person changed. Line-level attribution already tells you how many lines a human changed after the agent; the snapshot lets you see which.
- Recover discarded work. An agent’s edit that was reverted before committing is still in the snapshot.
Retention and cost
Snapshots live in.git/objects and cost roughly what one git add -A costs per edit. gitvow keeps the most recent 200 per session by default and gitvow snapshots prune --older-than 14d deletes older refs; unreferenced objects go with the next git gc. gitvow uninstall --purge-snapshots deletes them all. Snapshots can be turned off in the policy file.