Checkpoints
A complete, independently restorable worktree state, captured by Claude Code and Cursor hooks after each
tool call, or by git hf checkpoint.
Early preview · v0.1.0-rc.1 · 15 Oct 2026
High-frequency source control for AI agents
ghf (Git High Frequency) checkpoints your worktree every time an agent finishes an edit. Any authorized agent, on any machine, can go back to it: restore, diff, apply or fork. Your commits stay exactly as they are.
tests=pass annotation
fork: a second attempt in its own worktree and
trace
Measured on a 2,000-file repository, release build, Apple Silicon laptop. The benchmark is
in the repo and reproducible with cargo test --release. Full numbers
01 · The problem
Git was built around human-sized decisions. Between commits, coding agents pass through the last green state before a bad refactor, the approach that almost worked, the attempt another model was making. Then it is gone.
02 · How ghf works
holds accepted history: commits, branches, pull requests.
holds recoverable working history, with its own retention, permissions and sync.
No commits, trailers, notes or refs. Plain Git users never need to know ghf exists.
A complete, independently restorable worktree state, captured by Claude Code and Cursor hooks after each
tool call, or by git hf checkpoint.
The checkpoints for one unit of work. Any authorized agent can list, diff, restore, apply or fork it.
Traces close, finalize against the commit that landed, and are pruned 30 days later. Pins and holds keep what matters. Pruning never touches Git.
Tests passed, then a later step broke them. Find the last checkpoint annotated tests=pass and
restore it. No WIP commit, and the restore is itself recorded as a checkpoint.
$ git hf trace log --annotation tests=pass
#7 ck_01m5054dg9rkmmeasv0rcxd8x0 2026-10-15T16:08:12Z 2 change(s) claude-code:s1 [tests=pass]
$ git hf trace restore ck_01m5054dg9rk --in-place
restored ck_01m5054dg9rkmmeasv0rcxd8x0 in place (2 written, 1 deleted); recorded as ck_01m5054dmjth7gspksqcfddsh0
Tests passed, then a later step broke them. Return to the last checkpoint annotated
tests=pass, without a WIP commit.
Another worker continues from the exact file state, uncommitted changes included.
Two models try different approaches from the same checkpoint, each in its own worktree and trace.
When a run escalates, list the trace and diff any two points.
A checkpoint is acknowledged only once it is durable locally. Sync catches up when the network returns.
Open source, self-hosted, three steps to set up.
Quick startgit hf after every edit. It writes checkpoints to its own store under
.git/ghf and syncs them to ghf-server, from which any other machine can restore. Git
itself is only read.Safe by default
Restore goes into a new worktree by default. In-place restore and apply refuse if anything uncaptured would be lost.
A conflict on any path means nothing is applied and the working tree is unchanged.
Going back is itself recorded in the trace, so a restore never erases where you were.
A checkpoint is the full worktree state, stored as content-addressed objects (BLAKE3, zstd). Each one restores on its own, and unchanged directories are shared.
Parallel agents use separate Git worktrees, each with its own trace. A second writer gets
E_WRITER_LOCKED.
No commits, trailers, notes, refs or objects in Git. ghf keeps its own store under .git/ghf.
Built for agents
Every command takes --json and returns one versioned envelope with stable error
and exit codes. Nothing prompts in automation, and mutating commands accept an idempotency key.
--json on every command{"schema":"ghf/v1","command":"trace apply","ok":false,
"error":{"code":"E_APPLY_CONFLICT","message":"1 conflicting path(s); the working tree is unchanged"},
"data":{"applied":false,"conflicts":[{"path":"src/lib.rs","reason":"content changed on both sides"}]}}
Self-hosted
Every team runs its own ghf-server: one Rust binary plus a data directory, with
repository-scoped tokens.
ghf-server --data-dir /var/lib/ghf token create --name fleet --repos 'acme/*'
ghf-server --data-dir /var/lib/ghf serve --listen 0.0.0.0:7878 \
--tls-cert cert.pem --tls-key key.pem
git hf init --server https://ghf.example.com --repository acme/project
git add .ghf && git commit -m "Enable ghf"
git hf trust
echo "$GHF_TOKEN" | git hf login
git hf hooks install claude-code # or: cursor
git hf skill install
That's it: every agent edit is now a checkpoint. The user guide covers the rest.
| 2,000-file repository, release build | p50 | p95 |
|---|---|---|
| Checkpoint after editing files | 25 ms | 28 ms |
| Checkpoint after creating a file | 42 ms | 45–51 ms |
| Restore on another machine | 0.6 s | |
| Sync of 250 checkpoints (about 2,000 objects, 0.7 MB) | 2.3 s | |
Measured on an Apple Silicon laptop. Reproduce with cargo test --release.
Open source under Apache 2.0. Rust, Linux and macOS.
Early preview. ghf is currently being tested in Cloop and Automaze Works. Anything can change before v1 is officially released, including commands, the JSON schema, the server API and the storage format.