Baton reads configuration from ~/.baton, from each harness’s own settings, and from baton.json in a repository. Set BATON_HOME to move the Baton directory.

Files

config.json is written with owner-only permissions on Unix. /auth and /settings refuse a malformed file instead of replacing it, so a hand-edit error never deletes your keys.

config.json

Unknown provider and notification fields survive a write.

Key lookup

A key resolves in this order:
  1. ~/.baton/config.json.
  2. The harness’s own settings.
  3. The environment variable.
baton secret check names the winning source for every harness without printing the key.

Permission modes

Baton passes these modes to Claude and Codex. Cursor, Grok, OpenCode, and Antigravity keep their own permission flow.

Roles

A role can also set effort and a prompt path. Prompts live in ~/.baton/roles/<role>.md. Set "review": false to skip the reviewer turn. /roles shows the resolved rows with their source.

Hooks

Roles declare six hooks in roles.json. Each hook runs with a timeout. A failing plan hook aborts the run. A failing implement hook fails the task before the commit. A failing review hook marks the review failed.

Shared worktree directories

Each listed directory that exists and is gitignored becomes a symlink in a new worktree. Use it for build output and caches only.

Terminal behavior

Baton uses RGB colors only when COLORTERM is truecolor or 24bit, or when TERM contains direct. A term that advertises 256color without direct gets the nearest xterm-256 color, and every other term gets a 16-color palette picked by role. Set NO_COLOR to any non-empty value, or run with TERM=dumb, to draw without palette colors.

Next

Harnesses and auth

Choose a harness and find the key it will use.

Data and privacy

What Baton stores and what leaves the machine.