relay
Live multiplayer

Watch an agent work.
Together.

Everyone on the link watches the same agent session as it runs. One person has the wheel, everyone else can suggest the next step, and the wheel can change hands mid-task.

Run it in any git repository. It prints a link to share, and the agent works in a sandboxed clone on your machine. Needs an Anthropic API key or a Claude Code login.
relay4Kp2xQmN7aWorking
Avi

Add a token-bucket rate limiter to the API

Readsrc/router.ts84 lines
Writingsrc/middleware/rate-limit.ts
export function rateLimit({ rate, burst }: Limits) {  const buckets = new Map<string, Bucket>();  return (req, res, next) => {    const ok = take(buckets, req.ip, rate, burst);    ok ? next() : res.status(429).end();  };
Himanshu suggests

Run the tests before we ship it

AAviat the wheel
HHimanshuwatching
YYouwatching
Avi has the wheel while the agent adds a rate limiter. Himanshu suggests running the tests, Avi sends it, a test fails, and Avi hands the wheel to you to fix it.

One writer. Never two.

Screen-sharing an agent gets you an audience. Relay gets you a relay: exactly one person has the wheel, the server enforces it, and everyone else can suggest the next step or ask to drive.

Ask → hand over → release
A watcher asks for the wheel and the driver hands it over, on every screen at once. A released wheel is free for anyone in the room to take.
Enforced on the server
Not a disabled button. The server rejects any instruction, stop or publish that doesn't come from the driver, and runs instructions one at a time, in order.
Suggestions wait for the driver
Watchers can type too. Their suggestions wait in the dock, signed in their colour, and reach the agent only if the driver sends them.
0:00 / 0:36
Avi copies npx relayrun from this page, runs it in a terminal, and opens the link it prints. In the session he asks the agent to paginate an endpoint and invites Himanshu, whose screen shows the same run as it happens. Himanshu asks for the wheel, Avi hands it over, and Himanshu's next instruction runs on both screens.

Your repo stays on your machine.

The agent runs on your laptop, in a fresh clone of your current commit, on your own Claude credentials. What crosses the network is the session itself: the commands the agent runs and their output, the files it opens, and the edits it makes.

No upload, no clone on a server
Nothing to hand over before you start. The relay keeps the transcript so a finished session's link still opens; it never holds your repository.
The server is a relay, not a runtime
It orders events, enforces the lock and fans out the transcript. Your shell and credentials never reach it; of an API key it sees only the last four characters.
Sandboxed by default
The agent's commands can write only inside the session's temporary folders, reach only package registries and GitHub, and can't read your SSH keys, cloud credentials or secret environment variables.

What happens when you run it

  1. 01

    You start the agent

    npx relayrun in any git repository. The agent works in a temporary clone of your current commit; the CLI connects out to the relay and prints a link. Nothing inbound, so no ports to open.

  2. 02

    The server stamps the order

    One counter, assigned in one function. Clients render in that order and never sort — which is why two browsers agree on what happened when.

  3. 03

    Everyone sees it at once

    Every tool call, result and plan update is broadcast as it happens. Join an hour in and you get the whole transcript first, then the live stream.

  4. 04

    The work becomes a branch

    Every file the agent changes appears in the changes panel with its diff. Whoever has the wheel publishes the work as a branch in your repository, ready to check out, or as a pull request if relayrun was given a GitHub repo and token.

What's actually running

Engine
Claude Agent SDK, the same agent loop and tools that power Claude Code. Relay adds the room around it, not a different model.
Topology
The agent runs on the host's machine and streams events up over one WebSocket. The server coordinates; your repository stays put.
Ordering
A server-assigned seq on every event, from a single function. Clients render in that order and never sort.
Isolation
A temporary clone of your current commit per session, deleted when you stop relayrun. The agent's commands run in an OS sandbox by default; --no-sandbox removes it, for sessions where you trust everyone with the link.
Catch-up
Full transcript replay on join, then the live stream — the same path a dropped connection recovers through.
Reconnect
A 30-second grace window holds your identity — your seat stays reserved through a wifi blip.
Persistence
relayrun.in mirrors transcripts to Postgres, so a finished session's link opens as a read-only replay instead of an error.
Questions

Before you run it

The things worth knowing before you paste this into a terminal.

01Where does my code go?

The files the agent reads go to the Anthropic API, exactly as in Claude Code. They also appear in the session transcript, so everyone with the link sees them and the relay keeps them for replay. Your repository as a whole is never uploaded.

02What can the agent do to my repo?

It works in a temporary clone of your current commit, not your checkout. Its commands are sandboxed by default: writes stay in the session's folders, network reaches only package registries and GitHub, and your SSH keys, cloud credentials and secret environment variables are off-limits. Nothing reaches your repository until the driver publishes a branch.

03Can someone watching change anything?

Not while someone has the wheel. Watchers can suggest instructions and ask for the wheel; only the driver can send, stop or publish. The server checks every message, so a hand-crafted WebSocket frame gets the same answer as the button. When the wheel is free, anyone in the room can take it.

04What happens if I close my laptop?

The agent goes offline with it. A run in progress stops, and the room stays open with the full transcript. When your laptop wakes, relayrun reconnects to the session on its own, as long as the session hasn't closed. Nothing runs while it sleeps: that's the trade for keeping the repository on your machine.

05Do I need to connect an account?

No. There's no Relay account and nothing to connect. You need Node 20.9 or later, a git repository, and an Anthropic API key or a Claude Code login. The sandbox runs on macOS, Linux and WSL2; Linux needs bubblewrap and socat.

06What does it cost?

Nothing from Relay. Runs bill your own Anthropic API key (pass --api-key) or run on your own Claude Code login. The key is only ever sent to Anthropic; Relay sees its last four characters, so the room can show which key is paying. If someone else will drive, use a key: Anthropic's terms don't allow routing other people's requests through a Free, Pro or Max plan.

Run it. Send the link.