try it
Two terminals in the same repo, each with its own identity (AGENTMASH_DEV overrides
git config user.email, which is how one machine plays two developers). This needs a room
whose key is in the checkout, one init made (on your own server as above, say). In a
repository connected on the website, a machine signed in with npx agentmash login is always
its GitHub login, whatever AGENTMASH_DEV says, so both terminals are one developer, and one
developer's sessions don't warn each other unless asked to: try it there on your own as below,
with a teammate, or with a second GitHub account on another machine.
On your own, as one developer. Set AGENTMASH_WARN_SELF=1 for both terminals (exported in
the shell, or a line in the repository's .env) and leave AGENTMASH_DEV out. The check
before an edit then leaves out only the asking session's own edits and claims, so your second
agent is warned about your first: two Claude Code terminals, or Claude Code and Codex side by
side, in any room. The steps below read the same, with your other agent where they say
alice's agent and your first session's prompt as its task. Two agents in one checkout get
ACTIVE COLLISION; two worktrees, PARALLEL EDIT. Your commits, and the files you change by
hand, are still yours and no other agent's.
Terminal A (
AGENTMASH_DEV=alice): ask Claude Code to modifysrc/models/user.ts. The dashboard shows the edit within ~2 seconds, attributed to alice, with her prompt as the task hint.Terminal B (
AGENTMASH_DEV=bob): ask Claude Code to edit the same file. Before touching it, bob's agent receives — in its own context:[AgentMash: ACTIVE COLLISION]alice's agent is working insrc/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 deletedAt). Their write is already in your working tree, so whatever you read from this file earlier is out of date. Re-readsrc/models/user.tsnow and rebuild this edit against what is actually there: a staleold_stringeither fails to match or quietly reverts their change. LeavedeletedAtnamed and shaped as alice left it — that is what they just changed. If your task genuinely needs those same lines, change them and say so in your reply, so the overlap is visible.It re-reads the file, adapts, and says so in its response. The file shows up on the dashboard's collisions page, and the collisions badge in the sidebar counts it.
Terminal B again, in a different file. Ask bob's agent to edit
src/api/handlers.ts, which imports something alice just changed. It gets a collision with no shared path, which nothing in v0 could see — and if alice has since ended her session, the level stays loud and the message says why:[AgentMash: ACTIVE COLLISION]alice's agent has open work insrc/models/user.ts(whichsrc/api/handlers.tsdepends on forcreateUser) — last write 1 min ago on your branch (feat/soft-delete), while working on 'rename createUser and add a deletedAt column to the user model' (+1/-1 lines). alice is not at the keyboard, and this is still a collision rather than a stale file: the overlap is confirmed atcreateUser, and a declaration someone else has already changed does not become safe to write against because its author stepped away. Their write is already in your working tree. Readsrc/models/user.tsbefore you finish this edit — you are about to write againstcreateUseras it used to be, and it has moved. LeavecreateUsernamed and shaped as alice left it — that is what they just changed. If your task genuinely needs those same lines, change them and say so in your reply, so the overlap is visible. alice ended their session 20 min ago.Had the match been by path alone rather than by declaration, the same absent teammate would have produced
[AgentMash: STALE READ]instead — same re-read, no claim that anyone is editing alongside you.Kill the server. Both agents keep working: zero errors, zero delay, zero mention of AgentMash. The dashboard says so and reconnects on its own when the server returns.
Step 4 matters as much as steps 2 and 3.