Technical note

Commits are how your AI agents talk to each other

One afternoon we had 3 AI coding agents working the same repo at once, plus a human testing on a phone. It mostly worked. Where it broke, it broke the same way every time: each agent acted on a picture of the files that had quietly gone stale.

One agent rewrote a whole stylesheet and flattened a fix another agent had landed minutes earlier. One agent's commit scooped up a half-finished change that was not its own. And one agent shipped a correct fix to disk that the running server never loaded, so everyone kept debugging a bug that was already fixed.

There are no traffic cops, only git

Coding agents do not take file locks and do not see each other's editors. The only shared truth they have is the repository and the process table. Which means the coordination system is one you already own: git.

Two agents on one repo are two carpenters framing the same wall. They do not need a meeting. They need to look at the wall before nailing into it.

The rules that held

Commit early, commit per feature. A commit is the only way one agent's work becomes visible to another. Uncommitted work is invisible, and invisible work gets scooped or clobbered. We stopped treating commits as milestones and started treating them as messages.

Look before any wholesale rewrite. Before an agent replaces a whole shared file, it runs git status and reads the last 5 commits. If the file moved since the agent last read it, the agent re-reads before writing. Surgical edits beat full-file rewrites whenever more than one pair of hands might be active.

On-disk is not live. After any agent ships a fix to a running service, verify the process actually loaded it: compare the process start time against the file's modified time. A correct file and a stale process look identical from the outside, and the difference cost us a debugging loop.

Automated tests must not touch real settings. A test that clicks through the live UI mutates live state. One of our test runs silently flipped a real saved preference. Drive tests through explicit parameters, and if a test must touch a setting, it restores the value it found.

The clean split, when you can get it. One agent owns a repo's edits. The others test, report, and work other repos. Every collision we hit came from blurring that line. The blur is sometimes worth it for speed. Just know that is the trade you are making.

None of this is exotic. It is the discipline any crew uses on shared ground, applied to workers that never get tired and never look up. Teach them to look at the wall first and they build fast without building over each other.