The baton
How the baton works
From a usage limit to a reviewed diff, in four moves.
Claude Code stops when it hits a usage limit. The baton is how Relief picks the task up where Claude left off, on your own keys, and hands it back.
The four moves
1. Connect once. frontier connect claude adds a few hooks to Claude Code's own settings file and a small skill that asks Claude to save handoffs at milestones. After that, Claude Code tells Relief what is happening after each turn. See Connect it once.
2. A checkpoint at the limit. When Claude Code stops with a rate limit, Relief makes a git commit of your whole working tree and points a ref at it. It does this through a throwaway index, so your files, your index and your branches are never touched. See Checkpoints.
3. The takeover. A window asks Here, Worktree or No. Nothing is spent until you answer. On Here or Worktree, Relief carries on with your own keys, one request at a time, inside a spending cap of $1 by default. See The takeover.
4. Return and review. When Claude is back, it audits what Relief did. Relief writes a run record for exactly this. See The run record and Return and review.
What has been run
A first end to end run, on 2026-11-19, in a scratch git project with a failing test, on free Groq models and no paid key:
- Three Claude Code hook events (a prompt, a stop, and a stop with a rate limit error) opened the baton and made a checkpoint commit without touching the working tree.
frontier continue --baton --where worktreemade a separate copy from the checkpoint, read the files, showed a diff, asked before the edit, made it, and ran the tests. The copy passed 2 of 2 tests.- The original folder stayed on the buggy commit with no new commit. The run record listed the models, the changed file and a cost of zero.
- When one free model was busy, the run moved to another free Groq model, and the answer was labelled
free lane, as designed.
A second run, on 2026-11-20, used a real defect instead of a toy: a copy of this site's own repository with an old layout bug put back, so one of its tests failed. The same three hook events went through the real frontier hook command, then frontier continue --baton --where worktree ran on free Groq. It changed one line of CSS, the copy passed 3 of 3 tests, the original folder was byte for byte unchanged with no new commit, and the run record said a cost of zero. A free model once answered a step as a labelled substitute while the pinned one was busy.
What those runs did not cover: the hook events were written by hand in the documented shape, so a genuine Claude Code rate limit firing the hooks has not been seen yet, because it cannot be forced. There is no automatic baton for Codex. Two runs in two projects prove the path works, not how often it succeeds. Without a terminal, a takeover stops at its first question and spends nothing.
What it records
The hooks write a small journal of each turn to .frontier/baton/journal.jsonl: what you asked and what the host answered, cut to size and redacted. The journal stays inside the project and is kept out of git by a .gitignore inside the baton folder, so your own .gitignore is not edited.
What it never does
- It never reads, stores or forwards a Claude credential.
- It never routes Claude Code's traffic or drives Claude Code with another model.
- It never commits, pushes, merges or switches your branch. Changes are left in the working tree for review.
See Your Claude account for how that is built.
When there is no Claude Code
frontier continue --baton works by hand too. If no baton is open, it makes a checkpoint right then and asks the same question.