skip to content
agentmash get started

git worktrees and agentmash: use both.

git worktrees isolate checkouts: each agent works in its own copy of the repository, on its own branch, so no two agents write into the same file on disk. agentmash tells your agent what your teammates’ agents are changing, on any branch and any machine, before it edits. it doesn’t warn your own agents about each other: keeping them apart is the worktree’s job.

what worktrees do

a git worktree is a second working directory of the same repository, with its own files and its own branch, sharing one history. Claude Code’s --worktree flag starts a session in a worktree of its own, and Cursor can run an agent’s task in a worktree too. either way, agents running side by side on one machine stop editing the same files on disk.

what worktrees don’t catch

what agentmash adds, across branches

every edit from every developer’s agent goes to one room for the repository, and every worktree of it reports to that same room, each on its own branch. agentmash compares each developer’s edits with their teammates’, never with their own, so before an edit your agent is told about a teammate’s change to the same file, worded by where that change is:

side by side

what happensgit worktreesagentmashboth
two of your own agents writing one file on diskcan’t happen: each has its own checkoutcan happen, and neither is warnedcan’t happen
two of your own agents changing one file on two branchesfound at the mergeneither is warned: both report as youfound at the merge
knowing what a teammate’s agent is changingnoyes, before each edityes, before each edit
a teammate’s agent changing the same file on another branchfound at the mergetold before the edittold before the edit
a teammate’s change to a function your file importsfound when something breakstold before the edit, in JavaScript and TypeScripttold before the edit, in JavaScript and TypeScript
teammates’ agents on other machinesnot seenin the same roomin the same room
a teammate’s agent and yours changed the same file anywaya merge conflict for a personyou’re told as the session finishes, before either change landsyou’re told as the session finishes, before either change lands

keep your worktrees

nothing about a worktree flow changes. someone connects the repository once, each developer signs in once with npx agentmash login, and every worktree of the repository reports to its room from then on.

what it doesn’t do

what counts as a conflict →the five levels →claims →reconciliation →known limitations →