The baton
The takeover
Here, Worktree or No, the $1 cap, one request at a time.
When Claude Code stops on a rate limit, Relief opens a window (on Windows) that runs frontier continue --baton. On other systems it records the command and you run it in a terminal yourself. The window asks one question before anything is spent:
Claude Code hit its usage limit in <your project>.
Relief can carry on with your own keys (<providers>), spending at most $1.00,
one request at a time. Nothing is committed, pushed or merged.
[H]ere carry on in this folder
[W]orktree carry on in a separate copy on branch frontier/baton-<stamp>
[N]o leave it; run `frontier continue --baton` later
Type h! or w! to always do that without asking, or n! to never open this window again.Anything unclear, such as pressing Enter or a typo, counts as No. Only a clear answer may spend money.
Here or Worktree
Here works in the project folder itself. The checkpoint makes it undoable. See Checkpoints.
Worktree works in a separate git worktree next to the project, on a new branch frontier/baton-<stamp>, made from the checkpoint. Uncommitted work comes along. Files that hold secrets do not. A worktree that Relief makes from a trusted project is trusted too, so it follows the same rules.
The limits
- A spending cap.
baton.maxUsdis the cap for one takeover, $1 by default. It is checked before every model request. - One request at a time. Per provider account, so a rate limited account is waited for, not hit in parallel. A burst once got a whole account blocked at a gateway.
- No subagents. None run beside the main one.
- No commit, push, merge or branch switch. The changes are left in the working tree for review.
What it starts from
The first message is built from what was recorded: up to eight of your recent requests, Claude's last two answers (cut to 1,500 characters each), the latest saved handoff, Claude's transcript summary for this folder, and the git state. It is labelled as notes to check against the files, never as instructions. It is redacted again, cut again and stripped of hidden characters whatever wrote it.
Settings
The baton setting is user only: a repository cannot switch the window on, off or to auto.
| Key | Values | Meaning |
|---|---|---|
baton.onLimit | ask, auto, off | ask shows the window. auto carries on at once in where. off opens no window; the command still works by hand. |
baton.where | here, worktree | Where auto carries on. |
baton.maxUsd | a number | The spending limit of one takeover. |
Answering h! or w! saves auto with that place. n! saves off.
By hand
frontier continue --baton # asks Here, Worktree or No
frontier continue --baton --where worktree # answers for youIf a takeover is already running for the folder in another window, the command says so and stops. If no baton is open, it makes a checkpoint first.
The window never carries your Claude session
The window's environment is the hook's own, minus CLAUDECODE, anything starting CLAUDE_CODE_, and ANTHROPIC_AUTH_TOKEN. Those belong to the Claude Code session that ran the hook, and passing them on is not Relief's job.