Batonv0.3.9

How Baton works

A tour of the ideas behind Baton, in plain words. No prior knowledge of "multi-agent" anything needed. If you'd rather just try it, run baton demo and come back later.

The short version

  1. You type a task.
  2. The orchestrator, one of your coding agents, plans it and starts workers.
  3. Each worker edits its own copy of your project.
  4. The workers can message each other while they work.
  5. When a worker is done, an agent from a different vendor reviews its changes.
  6. Your tests run, and the changes are merged into your project.
  7. You watch all of it, and step in whenever you want.

The screen

╭─ ✱ orchestrator ────────────────────────────── ✓ 2/4 · $0.23 ─╮   ← the lead's conversation with you
│ > fix the typo in the README and add a test                     │
│ • On it, splitting this up across the team.                     │
│ ❯ message the orchestrator · @agent · /command                  │   ← where you type
╰─────────────────────────────────────────────────────────────────╯
╭─ ✱ claude-1 ── find typo ─╮╭─ >_ codex-1 ── ? needs you ─╮╭─ ⇄ bus ─╮   ← one card per agent
│ ● Update(README.md)        ││ ? Run bun test, allow?       ││ c1→lead │      and the message bus
╰────────────────────────────╯╰──────────────────────────────╯╰─────────╯
 ⚑ 1 needs you   enter send  @ talk to an agent  / commands  tab agents  ← hints for what you can press
 ● 3/4 agents running · 15 calls · 4 msgs                 $0.23  +7 -7   ← status: activity, cost, lines changed

The agents

The orchestrator (the "lead") is the agent you talk to. Pick which one in /settings or .baton/config.toml; Baton picks your best signed-in agent on the first run. The lead:

Workers are regular coding agents (Claude Code, Codex, OpenCode, Gemini, …) that Baton starts for you. They're named after their agent, like claude-1 and codex-2. You can talk to any of them directly: @codex-2 use the existing helper instead.

You can also start agents yourself: /spawn codex 2 write tests starts two Codex workers with that label.

Worktrees: every worker gets its own copy

The biggest worry with several agents is them stepping on each other, or on your work in progress. Baton avoids this with git worktrees:

Your project needs to be a git repository. Baton offers to set one up if it isn't.

Reviews and merging

When a worker finishes, its changes are still only in its own copy. Getting them into your project takes three steps:

  1. Review. The lead asks an agent from a different vendor to review the diff (Codex reviews Claude's work, Claude reviews Codex's, …). The reviewer approves or asks for changes, and requested changes go back to the author automatically. A merge waits while a review is still open.
  2. Checks. Your verify command runs (workspace.verify, for example bun test). If it fails, nothing is merged.
  3. Merge. A 3-way merge applies the changes to your working folder, on top of anything you changed meanwhile. Your branch, commits and staged files are never touched, so committing is up to you.

Changed your mind? /undo reverts the last merge. ctrl+d shows every agent's changes, where you can read diffs, comment on lines, merge or ask for a review yourself.

How strict reviews are is up to you: workspace.review = "off" | "suggested" | "required".

Roles, skills and what the team remembers

The lead can give a worker:

If you turn on team notes, facts agents learn go into .baton/notes.md and every new worker starts with them. Each of these has its own on/off switch (baton features). Details: roles, skills and notes.

Agents talking to each other

Each agent gets a few extra tools from Baton:

So a worker can say "I've changed the API, you'll need the new field" to another. The lead gets more tools: starting agents, waiting for results, merging, reviewing.

Some things happen automatically:

You stay in charge

The inbox (ctrl+a) collects everything that needs you:

ctrl+n jumps to the next item, and ctrl+y approves the oldest request. When Baton isn't the focused window, you get a desktop notification.

The autonomy dial (shift+tab) sets how freely all agents act:

ModeMeaning
normaleach agent's own defaults: edits are fine, risky commands ask
autothey act on their own inside your project; destructive commands still ask
yolono prompts and no sandbox, for every agent
askevery edit and command waits for you

Your rules always hold, even in yolo:

[[policy.rules]]
match = "Bash(git push*)"
action = "deny"

Budgets stop spending at a limit (budget.run_usd, budget.per_agent_usd), and a watchdog flags agents that go quiet or repeat themselves.

Trust: a repository you cloned can't run commands or loosen safety settings through its .baton/config.toml until you approve that with baton trust.

Behind the scenes

Where to next

Baton 0.3.9 · MIT · Edit this page on GitHub