skip to content
agentmash get started
docstry it

start

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):

  1. Terminal A (AGENTMASH_DEV=alice): ask Claude Code to modify src/models/user.ts. The dashboard shows the edit within ~2 seconds, attributed to alice, with her prompt as the task hint.

  2. 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 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 deletedAt). Their write is already in your working tree, so whatever you read from this file earlier is out of date. Re-read src/models/user.ts now and rebuild this edit against what is actually there: a stale old_string either fails to match or quietly reverts their change. Leave deletedAt named 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.

  3. 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 in src/models/user.ts, which src/api/handlers.ts depends on for createUser — 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). You are both changing createUser. alice is not at the keyboard, and this is still a collision rather than a stale file: the overlap is confirmed at createUser, 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. Read src/models/user.ts before you finish this edit — you are about to write against createUser as it used to be, and it has moved. Leave createUser named 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.

  4. 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.

from README.md, “Demo script”