DEV Community

Fayaz Bin Salam
Fayaz Bin Salam

Posted on

i built a checkpoint system for claude code cli — here's how

claude code is great until you lose track of what it just did. you start a session, prompt your way through a refactor, accept changes, and an hour later you're staring at a working repo with no memory of which edit broke what or why you went down the path you did. cursor has checkpoints. claude code cli doesn't. that gap bugged me enough to build one.

the problem

the cli is fire-and-forget by design — it edits files, you accept, the conversation rolls on. if you want to ask "what did claude actually do in the last 30 minutes?" or "let me diff against where i was four prompts ago", there's nothing in the box. you can git commit between every prompt, but mid-session i almost never do, and the commit messages would be garbage anyway.

what ccheckpoints does

it's a tiny daemon that hooks into claude code's lifecycle:

  • on message submit → snapshot the workspace
  • on session end → close the checkpoint group
  • a background server on port 9271 keeps state
  • a web dashboard at localhost lets you browse sessions, jump between checkpoints, and see file-level diffs

basically: git, auto-committed at every prompt, scoped per session, no commit messages required. you can rewind to any point without polluting your real git history.

stack

  • typescript on node
  • sqlite for storage — 100% local, no cloud, no auth, no privacy story to write
  • claude code's native hook system instead of polling (way cleaner — the hooks fire exactly at the right moments)
  • the web ui is served from the daemon itself, so install + run is a single command

one non-obvious decision

i went back and forth on whether to store diffs or full file snapshots. diffs are smaller but they get fiddly with renames, deletes, and binary files. full snapshots cost more disk but they're trivial to navigate. for a tool that only ever runs locally, disk is cheap and "trivial to navigate" wins every time. ccheckpoints stores the file content per checkpoint and computes the diff on demand in the ui.

try it

npm install -g ccheckpoints
ccheckpoints
Enter fullscreen mode Exit fullscreen mode

then run claude code normally — checkpoints appear in the dashboard automatically.

repo: github.com/p32929/ccheckpoints

https://github.com/p32929/ccheckpoints

would love feedback, especially edge cases where the hooks miss something (haven't found one yet but i'd like to know). stars + forks welcome if it's useful to you.

open to building with sharp teams + solo founders — dms/email open.

Top comments (0)