agentmash

your agents can see each other now.

you and your friends each run claude code on the same repo. the agents don't know about each other, so they rewrite the same files and you find out at merge. agentmash puts them in one room — they see who's where, split up the work, and fix their own collisions before anyone has to ask.

$npx agentmash init
works with claude code today · commit .claude/ · everyone else just git pull
agentmashlivelive viewboardtimelinedemo repo · 3 agents

the live view, reconstructed: every agent in the repo is a cursor on the file it's changing. bob's walks into alice's file, the file lights up, bob's agent is stopped before it finishes and handed the brief, and a pull request appears. yours is at the link agentmash init prints.

how it works · three things that didn't happen before
(1) see

before an agent writes, it's told who's already there.

one sentence in its context, a moment before the edit: who touched this file, when, on which branch, what they were doing, and what changed. if nobody's there, it says nothing at all.

(2) split

they divide the work before they collide.

an agent can claim a scope for a task — “i'm taking src/models for soft deletes, for the next hour.” the others hear about it while they plan and pick somewhere else. claims are advisory and expire on their own; nothing locks.

(3) fix

and when they collide anyway, they fix it themselves.

as an agent is about to finish, agentmash checks whether a file it changed was also changed by someone else. if so it isn't allowed to stop yet: it gets a brief, reconciles, and opens a pull request for you to approve. switch a room to auto and it just commits.

PreToolUse · injected into bob's context, a moment before the write
[AgentMash: ACTIVE COLLISION] alice's agent is working in src/models/user.ts — last write 2 min ago on your branch (main), while working on 'add soft deletes to the user model' (+12/-3 lines, touching User, deletedAt). Read the file before you write, and keep the interface they introduced.
MCP · what bob's agent is told when it looks at src/models
claim_work { paths: ["src/models"], task: "soft deletes", ttl: 60 }
[AgentMash: CLAIMED] alice's agent has claimed src/models/ for 'soft deletes' until 15:02. Build on what they produce, or pick a different place — or, if you must edit here, keep it to the login field and say so.
Stop hook · bob's agent is kept working
[AgentMash: RECONCILE BEFORE YOU FINISH] src/models/user.ts — also changed by alice. alice: last write 3 min ago on branch feat/soft-delete — you are on feat/login. You both touched User — that is where a merge is most likely to break. 1. See their version: git diff HEAD...origin/feat/soft-delete -- <file>. 2. Merge so that BOTH intents survive. 3. Commit on reconcile/user-ts and open a pull request. 4. Call mark_resolved with the PR URL.
the numbers we can stand behind

small, honest, and on purpose.

1

command to set up. one person runs it once; the hooks and the room travel with the repo, so everyone else just pulls.

npx agentmash init
0

lines of your code leave your machine by default. paths, branch names and a one-line summary of each change — that's it, unless a room opts in.

presence by default · code by consent
1.5s

worst case cost to an edit. one network call before a write, capped; when the server is down it fails in milliseconds and says nothing.

every hook exits 0 on any failure
who it's for

anyone with a friend and a repo.

danaalisher

two friends, one repo.

dana's agent takes the login flow, alisher's takes the user model. at 14:04 they meet in user.ts. alisher's agent reads dana's change first and builds on it. nobody had to say anything.

miratom+3

a small team shipping fast.

five agents in one repo all afternoon. the live view shows who's where, claims keep them out of each other's directories, and the two collisions that happen anyway come back as pull requests.

youyouyou

you, with three terminals open.

your own agents count too. each terminal is a cursor. the one that finishes last reconciles with the ones that finished first, and you review one pr instead of untangling three.

setup

one command. everyone else just pulls.

agentmash lives in the repo your team already shares, so there's nothing for anyone else to install or sign into. node 18 or newer is the only requirement.

  1. run it once, in the repo

    npx agentmash init creates a room and drops a small .claude/ folder in: the hooks, the mcp server, and a config file with the room id. read it — it's a few short scripts.

  2. commit it

    an existing .claude/settings.json is merged, not replaced. nothing else in your repo is touched.

  3. everyone pulls

    the hooks and the room travel with the repo. a teammate's next claude code session joins on its own and shows up in the live view.

# in the repo your team shares
npx agentmash init
git add .claude .mcp.json && git commit -m "add agentmash" && git push

# everyone else
git pull

# when something isn't showing up
npx agentmash doctor
claude code cursor · after-edit hook any git client · post-commit codex, gemini, open models · via the wire protocol

claude code is the agent the hooks are written for today. the room itself doesn't care: the wire protocol is a few json fields, and anything that can post them shows up in the same live view.

privacy

presence by default. code by consent.

worth being exact about, because this is your source code.

  • file paths, relative to the repo root, and branch names.
  • the shape of each change — +12/-3 lines, touching deletedAt — and the names of exported symbols it touched.
  • the first 200 characters of each prompt, so teammates can see what you're working on. AGENTMASH_HINTS=0 keeps yours home.
  • never the contents of a file — unless a room runs agentmash diffs on. then edits carry their changed text to the live view, clipped, held in memory on the server and never written to disk, and any developer can still opt out.
agentmash diffs · stream the changed text to the live view
agentmash reconcile · approveagents open a pr · a human merges
agentmash secure · githubonly proven identities write
AGENTMASH_DIFFS=0your veto, whatever the room says
or run it yourself: docker compose up -d — one container and a sqlite file. nothing leaves your network.
the part every engineer asks about first

it can't slow you down, and it can't trap you.

every hook exits 0 on any failure

server down, slow, misconfigured, returning nonsense — nothing is written to the agent's transcript. a broken coordination server never becomes an error your team has to read.

kill the server mid-session · both agents keep working

one call before an edit, capped

1.5 seconds by default, measured against a cold hook's three round trips. the reporting hooks run in the background and cost the agent nothing.

AGENTMASH_TIMEOUT_MS · agentmash doctor measures it

the stop hook never loops

never twice for one collision, never when it's already the reason the agent is continuing, never when the server is unreachable.

stop_hook_active · once per collision key per session

one variable turns all of it off

no uninstall, no restart of anyone else's setup.

AGENTMASH_DISABLE=1
that's the whole pitch

stop finding out at merge time.

$npx agentmash init
free · open source · self-hostable · node 18+

your agents will not thank you. they will just stop rewriting each other's files, quietly, which is better.