Exclusive by default
One writer per file
A claim is per workspace and per normalized path, held by a specific agent on a specific machine. Two agents cannot both hold a write lock on the same file.
How it works
/.relay is a coordination layer that sits underneath whatever agents you already run. It does not replace Git and it does not read your prompts. It arbitrates writes, understands what a change touches, and keeps every machine in the room on the same working state.
Edit, Write, apply_patch, write_to_file — whichever your agent uses. The call is intercepted before it reaches disk.
The hook calls relay_claim_file against the room's lock table. Locks carry a TTL, so a crashed agent never wedges a file permanently.
Relay checks whether the target is a dependent of anything another agent currently holds. If the blast radius overlaps, the claim is refused.
Granted: the agent edits normally. Refused: the agent is told who holds the file and moves on to other work instead of overwriting it.
The lock is dropped the moment the edit completes and the change is recorded as a code_edit event.
Teammates' clones receive the change as a patch, and Mission Control's board updates for everyone in the room.
When multiple agents try to edit the same file, /.relay uses file locking to prevent destructive conflicts. If one agent is modifying a component, another agent cannot silently overwrite those changes.
Exclusive by default
A claim is per workspace and per normalized path, held by a specific agent on a specific machine. Two agents cannot both hold a write lock on the same file.
TTL-based
Every claim carries a time-to-live (default 15s, clamped between 5s and 5m) with periodic cleanup. A dead agent or a killed terminal never leaves a file wedged.
Identity-aware
Each lock records the GitHub login and the agent that took it, so the board says @arjun / codex — not an anonymous process id.
Direct arbitration
Claims go straight to the host over HTTP, independent of the board's mirror — locking keeps working even when the display lags. relay doctor checks both chains separately.
A change in one file can affect dozens of others. So /.relay goes beyond simple file locks. Instead of only asking "is this exact file being edited?", it can answer "does this change affect files that another agent is currently working on?" — which lets agents work in parallel while staying safe across connected parts of the project.
@pony / claude ── holds ──► ui/Header.tsx
▲
imported by │
│
@unnath / cursor ── wants ──► ui/Nav.tsx ✗ dep-blocked
@arjun / codex ── wants ──► lib/date.ts ✓ granted (disjoint)
Tree-sitter parsing
Import edges are extracted with tree-sitter queries per language, not regex — so the graph reflects what the code actually depends on.
Union across the team
Each member's graph is ingested and merged into a single edge set for the workspace, so dependents are resolved across every machine in the room.
Languages
TypeScript, JavaScript, JSX/TSX, Python, Go, Rust, Java, C#, C, C++, PHP, and Ruby. node_modules, .git, dist, and build output are skipped.
Parallel by default
Disjoint regions of the project stay fully concurrent. The graph narrows what gets refused instead of serializing the whole team.
Agents are not always running on the same machine. One developer has an agent running locally; a teammate has their own filesystem, their own environment, their own agents. /.relay keeps everyone synchronized using patch updates — instead of constantly copying the entire project, it propagates the changes, so every agent stays on the same version of the codebase.
relay push
Sends your dirty files — uncommitted, in-progress work — into the shared room. No commit required, no branch dance.
relay pull
Applies the host's current dirty files onto your clone, so your agent starts from what the team actually has right now.
Patches, not copies
Only the delta moves. A repo snapshot layer plus an operational-transform core keeps concurrent edits reconcilable rather than last-write-wins.
Conflict surface
Edits touching the same regions inside a short window are reported as conflicts on the board and through relay_get_conflicts.
None of this needs a hosted backend. One person on the team runs relay serve — that machine is the host. Everyone else connects over an ngrok tunnel, straight to that laptop. You are the server. You are the client. Nothing lives on infrastructure you do not own.
host machine guest machine
───────────── ─────────────
agents ─► hooks ─► lock table ◄── ngrok ──► hooks ◄─ agents
│ │
dep graph lock mirror
│ │
Mission Control Mission Control
:3002 :3002
relay serve, owns the authoritative lock table, and mints invite links from the Team tab.Started by relay serve on localhost:3002, with the API on 127.0.0.1:3001. It runs on your machine — there is no hosted dashboard and no account to create.
File locks panel
The live lock table across every member of the room, labelled by GitHub user and agent, with mirrored and locally-claimed locks distinguished.
Lock graph canvas
An interactive canvas of the dependency graph with held and blocked files highlighted — the coupling that made a claim fail, made visible.
Code edits & timeline
A unified activity stream of edits, decisions, and tasks from all agents on all machines.
Agent session chat
Transcripts are harvested into one time-ordered history you can filter by agent and by owner.
Team & presence
Mint the room invite from the Team tab; see who is connected and what workspace they have open.
Notices
Peer clashes and overlapping edits raise notices instead of waiting for a merge to fail.
relay clone and relay add write pre-tool (claim), post-tool (release), pre-read, and stop hooks into your project for every supported agent. Bring whatever you already use — nobody on the team has to change how they work.
| Agent | Config file | Write tools intercepted |
|---|---|---|
| Claude Code | .claude/settings.json |
Edit Write NotebookEdit |
| Cursor | .cursor/hooks.json |
Write Edit Delete |
| Codex | .codex/hooks.json |
apply_patch Edit Write |
| GitHub Copilot CLI | .github/hooks/relay-os.json |
edit create |
| Antigravity | .agents/hooks.json |
write_to_file replace_file_content multi_replace_file_content |
Pre-read hooks also register interest, so the board can show what an agent is looking at — not only what it is writing.
Hooks cover coordination automatically. MCP is for agents you want to hand structured tools to — and for reading room context from a machine that has no relay installed at all. Run relay mcp-url to print a ready-to-paste config; the room endpoint is read-only for anyone off the host machine.
| Tool | Purpose |
|---|---|
relay_claim_file | Acquire an exclusive write lock before editing |
relay_release_file | Release the lock after editing |
relay_status | View the full lock table |
relay_get_conflicts | Overlapping edits in the last 5 minutes |
relay_get_recent_changes | Recent code-edit events across the room |
relay_get_chat_history | Unified agent chat, filterable by agent and owner |
relay_report_change | Push a code-change event |
relay_report_decision / relay_get_decisions | Append and read decisions |
relay_update_task / relay_get_active_tasks | Append and read tasks |
relay_get_project_context | Full JSON project context |
relay_sync | Re-read agent transcripts into unified history |
| Command | What it does |
|---|---|
relay login | Sign in with GitHub (uses the gh CLI, or device flow with GITHUB_CLIENT_ID) |
relay logout | Clear the local session |
relay whoami | Show the signed-in GitHub user and current project |
relay clone <url> [dir] | git clone, register the workspace, install agent hooks |
relay add <path> | Attach an existing local repo |
relay serve | API on 127.0.0.1:3001 and Mission Control on :3002 |
relay serve --no-ui | API and coordinator only, no dashboard |
relay push | Send your dirty working-tree files to the shared room |
relay pull | Apply the host's current dirty files onto this clone |
relay status | Health check — room, role, host, ports |
relay mcp-url | Print the MCP config for this room's shared-context endpoint |
relay doctor | Diagnose an empty Coordinator board |
gh CLI for relay login; ngrok for cross-machine rooms.RELAY_PORT (3001) · RELAY_UI_PORT (3002) · RELAY_UI_ORIGINIn progress
Each agent operating in its own isolated workspace off the same repository — free to experiment, modify, and test independently, with changes integrated back into the main codebase when the work is ready.
In progress
Deeper merge assistance on top of the existing operational-transform and patch layer, so overlapping edits reconcile instead of queueing.