The baton
Connect it once
frontier connect claude adds the hooks and the handoff skill, after asking.
frontier connect claudeClaude Code is the only host so far. The command shows exactly what it will change and asks Connect? [y/N] before it writes anything. In a script, with no terminal to ask, it changes nothing unless you add --yes.
What it writes
It reads and writes one file: ~/.claude/settings.json, or settings.json inside the folder named by CLAUDE_CONFIG_DIR. Claude's login files are never opened.
| Claude Code hook | Runs in the background | Why Relief listens |
|---|---|---|
UserPromptSubmit | Yes | To record what you asked. |
Stop | Yes | To record what Claude answered. |
StopFailure | Yes | To notice a rate limit and open the baton. |
SessionStart | No | Kept for the return step. |
Each entry runs frontier hook <event> with the marker frontier-baton in the command. Node and the Relief script are named by absolute path, so the hook works in the shells Claude Code uses on Windows and elsewhere. Background hooks mean Claude never waits for Relief, and each has a timeout of 15 seconds.
It also installs a small skill, frontier-handoff, at ~/.claude/skills/frontier-handoff/SKILL.md. The skill asks Claude to call the frontier_handoff_save tool at milestones, with the goal, the decisions and the next steps, and never with keys or .env contents. That is the part of the story only Claude knows.
What it keeps
Your other settings and your own hooks stay exactly as they are. A dated backup of the settings file is saved next to it, named settings.json.frontier-backup-<time>. Connecting twice adds nothing, because every Relief entry carries the marker.
After connecting
Restart Claude Code, or open /hooks in it, so it loads the hooks.
Disconnect
frontier disconnect claudeThis removes exactly the entries that carry the marker, and the frontier-handoff skill, and leaves everything else. It makes a backup first and asks the same way.
The hook is untrusted input
What Claude Code hands a hook is treated as untrusted text. It is parsed as JSON only, capped at 512 KB, cut to size and redacted before it is written, and never placed in a shell command line. Events other than the four above are ignored, so a new Claude Code event cannot surprise it.