| name | dev-repo-checkpoints |
| description | Auto-stash uncommitted work in code repos on every Claude Code Stop/SubagentStop event, so 60+ exchange sessions can't lose work to a branch switch. Stop hook scoped to ~/dev/* repos (vault is covered by its own snapshot script). Recoverable via `git stash list | grep claude-checkpoint`. |
| trigger | install once via the Python hook + settings.json registration; fires silently every session-end thereafter |
| source | pattern from carlrannaberg/claudekit MIT (cli/hooks/create-checkpoint.ts); reimplemented clean in Python per license-hygiene |
Dev-Repo Session Checkpoints
A Stop/SubagentStop hook that auto-stashes the working tree of any ~/dev/<repo> you're working in at every Claude Code session end. No manual checkpointing, no git discipline required, no commit pollution. Recovery is one git stash apply away.
This closes a real failure mode: a 60+ exchange Claude Code session in a code repo, branch switches mid-flow, uncommitted work disappears. The vault has auto-snapshot.sh covering that surface, but code repos don't — until this hook.
Why this exists
The failure mode: Long Claude Code sessions accumulate uncommitted work — half-finished features, exploratory branches, debugging instrumentation. A branch switch or git reset --hard (intentional or auto-triggered by another hook) can wipe that working tree silently. Pre-existing branch-switch-safety hooks catch unauthorized switches; this hook catches the broader case where work just isn't saved often enough.