Point two agents at the same repo and they collide — one overwrites the other, and both waste time redoing the same work.
Run Claude, Codex, and any agent on one repo — without the collisions.
A communications protocol for multi-agent collaboration in a local repo, working across LLMs and systems. Every agent reads and writes the same ledger instead of overwriting each other.
cargo install --path crates/rally-cli Rust 1.85+ · Apache-2.0 · any agent, any host · no server
Product walkthroughs
See it at work
The turn loop
Nine steps, one shared record
Every agent takes the same turn. Four steps append a fact to the log, three read it back before advising, and two — the edit and the verification — belong to the host alone. Rally has no arrow into or out of those two, and that gap is the charter, not a missing feature.
- 1
rally whoamiSelf-locate
reads · writes nothing
Host runtime, repo root, repo id, worktree, build id, cwd. An agent that doesn't know which host it is can't honestly sign what it writes.
- 2
rally enterJoin the room
writes · presence
Registers the session and returns the mission, the current lead, and whether an acknowledgement is still owed. Idempotent per protocol session.
- 3
rally ackAcknowledge
writes · acknowledgement
Confirms you ingested the rules, guardrails, lead, and mission. An unacknowledged agent counts as one that hasn't really joined.
- 4
rally nextAsk what to do
reads the room
The wake-intent check. There's no push path, so an agent that never pulls is never woken — and if actionable is false, don't invent work from room state.
- 5
rally say claimReserve the resource
writes · claim
Eleven resource types across four access modes — file, dir, branch, port, process, service, task and more. On conflict the append is refused and the message names the holder.
- 6
rally check before-writeCheck the boundary
reads · advisory by default
Asks whether a live peer already claimed this path. Path-based, so it can't see a database or a port. Warns by default; --strict aborts the write.
- 7
the host editsDo the work
Rally never enters this step
The actual change. Rally records and advises; it never gates, grants, schedules, spawns, retries, or executes.
- 8
the host verifiesProve the work
Rally never enters this step
Tests, builds, whatever proves the change. Rally stores the evidence string you choose to record; it doesn't judge the work.
- 9
rally say <kind>Record what happened
writes · artifact, handoff, decision…
Any of 16 fact kinds, so a peer — or your own restarted session — reads the outcome back instead of asking a human. A handoff completes only when the receiver writes its own acknowledgement.
All nine steps land in one file, .rally/log/<engagement>.jsonl — append-only, one fact per line, committed with the code, carrying git merge=union so sibling worktrees merge without conflict. Room state, next's recommendation, and the dashboard are all projections replayed from it, which is why losing the cache loses nothing.
Claude and Codex in the same room
Rally isn't tied to one tool or one model. Claude Code, Codex, or any host that can run a CLI speaks the same protocol and reads the same facts — so agents across different LLMs and systems actually coordinate instead of working blind to each other.

Two agents never touch the same file at once
A `check before-write` step confirms no peer holds a claim on the file you're about to edit. No overwritten commits, no deleted work, no two agents quietly fighting over the same file.
Hand off by lane, play to strengths
Agents claim lanes and hand off by fact. Give the hard refactor to one, the tests to another, and let them run at the same time — each doing what it's best at, all coordinated through the room.
Parallel speed that still leaves a trail
Facts are an append-only ledger; room state is derived from it. Every claim, handoff, and decision is replayable — so working in parallel never costs you the record of who did what, or the ability to rebuild the room from disk.
- Works with any agent or host — not locked to one vendor
- No server, no network — state lives in the repo
- Tolerates agents that crash mid-write — quarantines and rebuilds on corruption
Does it only work with Claude Code?
No — any coding agent or host can join. Claude Code and Codex get auto-coordination hooks out of the box (SessionStart + PreToolUse from a fresh clone); anything else reads and writes the same room through the `rally` CLI.
How do two agents avoid editing the same file?
Before an edit, `check before-write` confirms no peer holds a claim on that path — backed by a warm-snapshot cache and an opt-in fail-closed mode on watchdog timeout. Linked git worktrees share one room through the repo's common dir.
Does it need a server or network connection?
No. The store is an append-only JSONL log in the repo with a derived SQLite cache. Files, Git, rsync, or a shared folder can move facts; Rally just defines what the bytes mean.
What happens if an agent crashes mid-write?
The store tolerates torn ledger lines and quarantines-and-rebuilds on corruption — it's designed for agents that die unexpectedly. The SQLite cache is rebuildable from the log at any time.
The first time I ran a second agent in a repo I already had one working in, they collided immediately: both edited the same file, one quietly overwrote the other’s commit, and neither knew what the other had decided. Two agents, and I got less than one agent’s worth of work.
Rally is the fix. It’s a room that lives in the repo where every agent — Claude, Codex, whatever I’m running — writes down what it’s touching and checks before it steps on anyone. So I can point all of them at the same project at once: they split the work, each takes what it’s best at, and they finish faster instead of fighting over the same files. No server to stand up, no chat to babysit — just an append-only log I can rebuild from disk if anything goes sideways.
cargo install --path crates/rally-cli Rust 1.85+ · Apache-2.0 · any agent, any host · no server