skip to content
agentmash get started
docsreconciliation

what your agent sees

reconciliation

When a claim did not prevent it — two agents changed the same file anyway — the usual outcome is that a human discovers it at merge time. AgentMash moves that moment earlier, and leaves the deciding to a person.

A Stop hook runs as an agent is about to finish its turn. It asks the room whether any file this session edited was also edited by someone else. If so, it says so, once, to the person at the keyboard:

[AgentMash: OVERLAP] A file this session changed was also changed by alice@example.com,
so a person decides how the two changes come together: nothing was stopped, merged or
committed for either side.
• src/models/user.ts — also changed by alice@example.com.
  alice@example.com: last write 9 min ago on branch main — you are on feat/login
  while working on 'soft deletes' (+12/-3 lines, touching User, deletedAt).
  You both touched User — that is where the two changes are most likely to meet.
  Your side: 'add a login endpoint' (+8/-1 lines).
Look at both changes with alice@example.com before either one lands.

It only ever advises. It never blocks the agent's finish and never tells an agent to fetch, branch, commit, push or open a pull request. (It used to: it blocked the finish with a brief to reconcile, and an agent with the permissions to do so pushed a branch and opened a pull request on its own, for a teammate's change that had never been pushed; in a headless claude -p run the block ended the run as an error.) The server never sees code, so it cannot merge anything either.

agentmash reconcile …What happens as a session finishes having overlapped a teammate
approve (default)The person is told once, with whose change each file meets. A person decides.
autoThe same as approve. (It once had agents commit the result on their own; a room set to it keeps working.)
offNothing is said. Overlaps show on the board and in get_collisions, and nowhere else.

Two MCP tools go with it: get_collisions tells an agent the same thing on demand, and asks it to say so in its reply and leave the teammate's change alone; mark_resolved records how a person settled it (a PR URL, merged, no actual conflict, dismissed), which is what makes the room stop asking. A settled collision shows on the dashboard's collisions page with a ✓ and a link to the PR.

Hooks from before this, still committed in a repository, block on any mode but off; the server answers them off, so they go quiet instead, until npx agentmash init there brings them up to date. The MCP server committed beside them hears the same off, so its get_collisions says reconciliation is switched off whatever the room is set to; init brings it up to date too, and on a machine signed in with npx agentmash login, running login again updates the copy in ~/.agentmash/hooks. doctor says when either is older than the CLI. The hook never speaks twice for the same overlap in a session, and never when the server cannot be reached.

When it can't answer, it says so. A quiet room and an unreachable server are worded differently, on purpose:

Nobody else has been active in "team repo" in the last 60 min. The coordination
server answered normally, so this is a real "no one", not a failure to reach it.
The AgentMash coordination server at https://agentmash.dev is unreachable
(fetch failed).

Treat who else is working in this repo as UNKNOWN. This is not the same as
"nobody is working on anything" — AgentMash could not ask.

The same distinction covers a rejected room, a 500, a non-JSON body, a repo that was never connected, and AGENTMASH_DISABLE=1. The request budget is 4 s (AGENTMASH_MCP_TIMEOUT_MS), not the hooks' edit-path budget: an agent asking mid-plan is waiting on the answer, so patience is worth more there than it is inside an edit.

from README.md, “Reconciliation: telling the person before either change lands”