Introduction
Baton coordinates multiple AI coding agents on one repo — isolated git worktrees, a live dashboard, shared memory, and one-file handoff.
Baton is a local-first coordination hub for the AI coding agents you already use — Claude Code, Cursor, Codex, Gemini, Aider, OpenCode — working on one repo at the same time without stepping on each other.
Each task runs in its own isolated git worktree. A tiny daemon + dashboard give you a live view of who is editing what, warns you when two agents touch the same file, and lets you hand a piece of work from one agent to another with a single command.
The one-line pitch
Plan on your expensive agent. Pass the baton to your cheap one. Baton emits a curated, cheap-to-execute brief — not a raw history dump — so work continues instead of being lost.
Why Baton
Developers run two or three AI CLIs to save money and quota. The problem is coordination:
- Two agents edit the same file and silently clobber each other.
- You lose context when a session ends or a model hits its limit.
- The expensive model re-explores the codebase every session because nothing is remembered.
Baton fixes this with a handful of ideas, all local and all under your control:
- Worktree-per-task — every task is an isolated branch + working directory. No checkout juggling, no in-session conflicts.
- A queryable knowledge base — your repo (or a whole multi-repo hub) indexed into a graph + a ~2k-token
CODEBASE.mdmap, so agents navigate with targeted queries instead of re-reading the repo every session (~300× cheaper). - Live coordination — a daemon streams edit-signals over SSE; the dashboard shows live agents, conflicts, and progress.
- Shared, evidence-checked memory — agents save and recall facts; stale facts (whose files changed) are withheld so models don't hallucinate.
- Installable skills — reusable agent playbooks (like a disciplined bug-fix) installed into each agent's own config.
- One-file handoff —
baton passpackages a session into aHANDOFF.mdbrief with a token/cost estimate; another agent runsbaton takeand continues.
What Baton is not
- It is not a hosted service. The daemon binds to
127.0.0.1only; nothing leaves your machine. - It is not a model or an agent. It coordinates the agents you already have on your PATH.
- It does not lock you in. Worktrees are standard
git worktree; remove Baton and your repo is untouched.
Next steps
Set up with your agent
Copy one prompt into Claude Code, Cursor, or Antigravity and let it do the whole install.
Quickstart
Install, build, and run the daemon + dashboard in a few minutes.
Setup & multi-repo hubs
One command to wire up a repo — or a whole project across several repos.
Core concepts
Worktrees, the daemon + dashboard, and the realtime model.
Architecture
The zero-dependency daemon, event bus, and SQLite signal store — the engine room.
Security model
Loopback-only, Origin + Host guards, opt-in writes: what a hostile page can't do.
CLI reference
Every command and flag.