How it works

Every feature,
end to end.

/.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.

01 / Write lifecycle

What happens when
an agent edits a file.

step 01 Agent calls a write tool

Edit, Write, apply_patch, write_to_file — whichever your agent uses. The call is intercepted before it reaches disk.

step 02 Pre-tool hook claims

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.

step 03 Dependency graph consulted

Relay checks whether the target is a dependent of anything another agent currently holds. If the blast radius overlaps, the claim is refused.

step 04 Write proceeds or is blocked

Granted: the agent edits normally. Refused: the agent is told who holds the file and moves on to other work instead of overwriting it.

step 05 Post-tool hook releases

The lock is dropped the moment the edit completes and the change is recorded as a code_edit event.

step 06 Room propagates the patch

Teammates' clones receive the change as a patch, and Mission Control's board updates for everyone in the room.

02 / File locking

Exclusive claims,
with an expiry.

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

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.

TTL-based

Locks expire on their own

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

Locks have an owner

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

Hooks talk to the host

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.

03 / Dependency-graph locking

Files do not
exist alone.

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

Real imports, not guesses

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

One supergraph per workspace

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

Polyglot out of the box

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

Only overlap is blocked

Disjoint regions of the project stay fully concurrent. The graph narrows what gets refused instead of serializing the whole team.

04 / Patch sync

Same page,
different machines.

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

Share your working tree

Sends your dirty files — uncommitted, in-progress work — into the shared room. No commit required, no branch dance.

relay pull

Take the host's state

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

Changes on the wire

Only the delta moves. A repo snapshot layer plus an operational-transform core keeps concurrent edits reconcilable rather than last-write-wins.

Conflict surface

Overlaps flagged live

Edits touching the same regions inside a short window are reported as conflicts on the board and through relay_get_conflicts.

05 / Rooms & tunnels

Your laptop
is the backend.

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
06 / Mission Control

Everything, on
one board.

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

Who holds what, right now

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

The blast radius, drawn

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

Every change, in order

A unified activity stream of edits, decisions, and tasks from all agents on all machines.

Agent session chat

Read what agents said

Transcripts are harvested into one time-ordered history you can filter by agent and by owner.

Team & presence

Share and join

Mint the room invite from the Team tab; see who is connected and what workspace they have open.

Notices

Conflicts surfaced

Peer clashes and overlapping edits raise notices instead of waiting for a merge to fail.

07 / Agent hooks

Installed once.
Invisible after.

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.

08 / MCP

Tools for agents
that want them.

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_fileAcquire an exclusive write lock before editing
relay_release_fileRelease the lock after editing
relay_statusView the full lock table
relay_get_conflictsOverlapping edits in the last 5 minutes
relay_get_recent_changesRecent code-edit events across the room
relay_get_chat_historyUnified agent chat, filterable by agent and owner
relay_report_changePush a code-change event
relay_report_decision / relay_get_decisionsAppend and read decisions
relay_update_task / relay_get_active_tasksAppend and read tasks
relay_get_project_contextFull JSON project context
relay_syncRe-read agent transcripts into unified history
09 / CLI reference

Ten commands,
total.

Command What it does
relay loginSign in with GitHub (uses the gh CLI, or device flow with GITHUB_CLIENT_ID)
relay logoutClear the local session
relay whoamiShow 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 serveAPI on 127.0.0.1:3001 and Mission Control on :3002
relay serve --no-uiAPI and coordinator only, no dashboard
relay pushSend your dirty working-tree files to the shared room
relay pullApply the host's current dirty files onto this clone
relay statusHealth check — room, role, host, ports
relay mcp-urlPrint the MCP config for this room's shared-context endpoint
relay doctorDiagnose an empty Coordinator board
10 / Roadmap

What lands
next.

In progress

Git worktree isolation

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

Richer conflict resolution

Deeper merge assistance on top of the existing operational-transform and patch layer, so overlapping edits reconcile instead of queueing.

The layer is ready

Do not just add more agents.
Just relay.it

Try now for free