BATON

A terminal multiplexer for AI coding agents.

Running a handful of coding agents at once gets messy fast — windows to juggle, sessions scattered across tabs, and no single place to see who is working, who is stuck, and who is waiting on you. Baton is to AI agents what tmux is to shells: one keyboard-driven cockpit over the whole fleet.

You hold the baton. The agents play. You conduct. 🎼

single static binary macOS & Linux MIT licensed Go 1.26+

Install

$ brew install cmj0121/tap/baton
$ curl -fsSL https://raw.githubusercontent.com/cmj0121/baton/main/scripts/install.sh | sh
$ go install github.com/cmj0121/baton/cmd/baton@latest

Then run baton. It starts its background server and drops you on the dashboard: A spawns an agent, enter zooms into it, q detaches and leaves everything running. Lost? ? always lists the keys for wherever you are.

The cockpit

Baton cockpit demo — the key list, panels spawned, the conductor opened, two panels grouped into a work item, and the same ? pressed again in the split and in the zoom
One key does the whole tour: ? lists the keys for wherever you are. Panels spawn, n C calls the conductor, g g then g c groups two into a work item — and ? again in the split, C-t ? in the zoom, are three different tables.

Why not just tmux?

Because tmux has no idea what is in the pane. It hands you windows; you supply the memory of which one is which. Baton assumes the pane holds an agent, and the rest follows from that.

What you are doing tmux, by hand Baton
Finding who needs you cycle the panes and read a live state per panel, and a C-t a inbox of the ones that stopped for a human
Keeping related work together name the windows, remember the scheme work items — a named group of panels, made with two keys
Handing work out type it into each pane yourself dispatch a task to one or a whole group, or let a conductor agent drive the fleet
Stopping a runaway build nothing CPU, memory and process caps, held over the panel's whole process tree
Knowing what the fleet costs nothing the billing window's tokens and cost, and your quota bars, traced to a panel

Five things a multiplexer does not do

Attention, not polling

One quiet clock ranks every panel — running, idle, done, stuck — and an agent can raise its own hand above the lot. C-t a opens the inbox from any view, and a desktop notification finds you when nobody is looking.

A conductor

An agent that drives the fleet for you: it spawns, groups, signals and prompts the other panels over the socket, through baton ctl or the baton mcp tools, fenced so it cannot wreck its own host.

Tasks and a backlog

Dispatch a brief to one agent or a whole work item, delivered when it is ready. A persistent backlog is drained onto free agents by a server-owned scheduler, and a Lua hook can rewrite or veto a brief.

Caps over the process tree

Cap a panel's CPU, memory and processes and hold its whole process tree to it, so a runaway build cannot take the machine with it. Enforced with cgroup v2 on Linux.

Usage traced to a panel

The billing window's tokens and cost, the focused panel's share of them, and your account's rate-limit bars — in the footer, and attributable to the panel that spent them.

…and the rest of the cockpit

Work-tree diffs, a git menu, signals, fleet-wide grep, container isolation, remote access over ssh, panel logging, Lua plugins, themes — every one of them a keystroke away.

Documentation