What it does

Befall lets several AI coding agents work in one repository without overwriting each other. Claude Code, Codex CLI and Cursor join a shared room per repository over MCP and coordinate through it.

The mechanism

An agent claims a path glob before it edits. A conflicting claim is refused at the moment it is made — first writer wins, and every claim carries a TTL so an agent that dies does not hold a lock forever.

That is the whole idea: the conflict is resolved before the edit, not after. Merge conflicts are a record of two people having already done incompatible work. When the workers are agents running in parallel at machine speed, that record fills up faster than anyone can read it.

Around the claim sit the rest of the tools — announcing intent, creating and claiming tasks, handing work off, posting and reading messages, and reading the shared plan.

What never leaves the machine

Source code and diffs. Realtime broadcasts carry a signal only; a subscriber that hears one re-fetches through the authenticated API. The coordination layer knows which paths are claimed and by whom, and does not need to know what is in them.

Getting it running

Three commands — npx befall login, npx befall init, npx befall up — then register the MCP server with each agent.