skip to content
agentmash get started
docsthe advisory

what your agent sees

the advisory

The injected paragraph is the product. Everything else exists to deliver it. It is a prompt, so it is written as one: state the facts, then the adaptation, in terms the agent can act on without abandoning its task.

Two independent things decide the shape.

Axis 1 — is their change in your working tree? The same checkout means yes, and then the failure is a stale read: your old_string no longer matches, or it does match and silently reverts theirs. A different branch, or a clone of their own on a branch of the same name, means no: re-reading the file cannot help you, and the failure is a merge conflict whose fix is to keep the edit additive. (Each edit carries an opaque id of the checkout it was made in, an HMAC of the hostname and the folder under a key that never leaves the machine, so it names neither; /check hands it back with the holder, and the hook compares it with its own.) When nobody can tell, because a server, a hook or a client from before the id sent none, the level is the one the same checkout would get, and the advice says what to do either way: if you share their checkout, re-read the file; if not, pull once they have pushed, or expect to merge. A write in the last five minutes is recent enough that your copy is probably behind it.

Axis 2 — is the other agent still there? That is a fact about them, not about your tree, and the two really are independent: a teammate can have gone home an hour ago and their change still be the exact thing that breaks this edit.

LevelFires whenWhat the agent is asked to do
ACTIVE COLLISIONSame file, their change is in your tree, last write ≤ 5 min ago, and they are still around — or a confirmed symbol overlap, whatever their presenceRe-read the file now and rebuild the edit against it; leave the declarations they just changed alone
STALE READThe same situation, but the board says that teammate is gone (silent or session ended)Identical re-read: their write is still in your tree. What is dropped is the claim that anyone is editing alongside you
PARALLEL EDITSame file, their change is on another branchNothing to re-read — keep the edit additive, don't reformat or reorder, name any divergence in the reply
RECENT EDITSame file, their change is in your tree, older than 5 minRe-read only if this edit depends on lines they may have moved; otherwise carry on
NEARBY EDITA different file in the same directory (AGENTMASH_SCOPE=dir)Nothing. One sentence, for awareness

Severity is meant to be honest, so the weakest shape is one sentence with no imperative in it. If everything sounded urgent the model would learn to discount all of it, and the loud cases are the ones that have to land. That is also why presence demotes: ACTIVE COLLISION is the only level whose headline is a claim about a person — someone is in this file right now and will be surprised by what you do — and once they have closed the laptop that sentence is false. The other three levels claim nothing about anyone being present, so presence leaves them alone. It only ever takes a level away, never adds one: presence is computed per developer, so "alice is active" does not mean alice is active in this file.

Three details are worth knowing:

  • A confirmed symbol collision is never demoted. When the server reports which declarations collided rather than just which file, that outranks both axes — a symbol you are about to call, in a file you are not editing, is a real collision, worded as one ("…, which src/api/handlers.ts depends on for createUser", not "a different file in the same directory"). That level was earned by proof that the declaration moved, not by anyone being at a keyboard, and it does not lapse when they go to lunch. When presence and the symbol evidence disagree, the message says so out loud rather than resolving it silently.
  • idle is not gone. The active window defaults to two minutes, which is shorter than one agent turn, so a teammate reading their own diff is idle. Their session is open and they are at the desk; the collision stands. Only silent and session ended demote.
  • A goodbye is a fact, a silence is a guess, and the two are worded differently. An ended session is reported by the client, so the advisory says there is nobody in the file. A silent one is a timeout on the server's clock, so it says the file is stale without claiming the desk is empty.

When several teammates hold the same file, the most urgent one gets the full shape and the rest get a name and a timestamp. STALE READ sorts above PARALLEL EDIT for that purpose: a stale read fails inside the current edit where nobody is looking, while a merge conflict fails at a merge, where git and a human both are.

from README.md, “What your agent actually sees”