Two agents in one repo will disagree unless they share a past
Two agents, one repo, Tuesday afternoon. One is wrapping the payment client in retries, because its session established three hours ago that transient gateway failures get retried at the call site. The other is ripping retries out of a neighbouring module, because its session established forty minutes ago that retries belong in the queue consumer and nowhere else. Both branches pass review in isolation. Both are defensible. They land within an hour of each other and the payment path now retries twice, at two layers, with no one having decided that.
Nobody wrote a bug here. Both agents reasoned correctly from what they could see, and each saw a different slice of the team's past. That is the whole failure. Parallel work is fine when the shared context is real. It goes sideways when each worker rebuilds that context from scratch and rebuilds it differently. Adding a third agent does not average the disagreement out, it just adds a third past.
The usual patches treat the symptom. A stricter review checklist catches the collision after both edits already exist. A longer instructions file helps until it grows past the point anyone maintains it, and it still cannot say which rule replaced which. Neither one gives the second agent access to what the first decided this afternoon.
The root fix is that both agents read one record of decisions, written as work happens rather than reconstructed later. We build kgai for that. Decisions go into an append-only, immutable decision log, projected deterministically into a graph, so the retry-at-the-consumer decision is something the second agent finds before editing rather than something a human catches in review. Recall is lexical matching plus graph traversal with no embeddings in the read path, which means the same question gives the same answer on both machines. There is no daemon and no server.
Two properties matter when agents work at once:
- Changing the team's mind is explicit. A new decision supersedes the old one through an explicit link, the new decision carries the reason, and recall returns only decisions in force. Dead ends stay queryable, and the agent that would have proposed one gets told it was already tried.
- Parallel writes cannot collide textually. Each writer appends to their own shard, so two agents recording at the same moment produce no conflict to merge. Team sync is opt-in through an S3 bucket you own.
Capture happens at the write boundary, through a skill and hooks, so the afternoon's decision is in the log by the time the second agent asks. It ships as a Claude Code plugin plus a standalone kg CLI, MIT licensed. At a million decisions across 30 writers' shards a decision lookup answers in roughly 100 ms, though recall and free-text search are slower than that.
More on what happens across machines in five devs, five agents, and on the gap between written docs and live decisions in decision drift.
Give both agents the same past and they stop arguing through your codebase.
Try it on your repo. Two commands, MIT, nothing leaves your machine until you configure a bucket.
See how kgai compares to other tools on the comparison page, or browse the other notes.