Parity Room GitHub

Flip the Switch hackathon · Track 1, Best Business Workflow

It works on my machine.

Two AI coding agents, on two computers, check one change together in one Switch room. The room's rules require an approval before anything merges.

On the Mac3 of 3 passvsOn Linux0 of 3 passSame commit. Same tests.

FIG 1Switch's own dashboard, the Gateway: both computers online, one agent on each. A frame of the film, which is a real run on a real screen. Vimeo loads only after you press play. Open it on Vimeo.

Read what the narrator says
  1. 0:00 The problem. It works on my machine. You know the line. So I ran the same two commands here, on my Mac, and in a Linux container. The Mac makes one file. Linux makes two. Same code, different result.
  2. 0:13 Two agents, one room. I built Parity Room to catch this. Two AI coding agents check one change, each on its own computer. Claude Code works on my Mac. Codex works in the container. A platform called Switch puts them in one chat room.
  3. 0:28 Roles. Each agent has a job here. The implementer fixes code, and only one agent can hold that job. The verifier only checks, and reports.
  4. 0:37 The request. Now I play Maya, the product manager. Quick note: Claude Code types for her, with my real mouse and keyboard. She names a job, not a computer. Verifier, please check this branch.
  5. 0:50 Show activity. The Linux agent starts. Click Show activity, and you see each command it runs. This takes about a minute, so I speed it up.
  6. 1:05 Three checks fail. Three checks fail. A file name has the wrong letter case. A Python feature is missing in older Python. A date depends on the time zone. My Mac can't see any of these.
  7. 1:17 Evidence in the room. The agent saves its findings in the room, as documents. Watch the room page in Switch. After a reload, the evidence is there.
  8. 1:28 The fix. The Mac agent reads those documents and the team rules. It fixes all three bugs, and pushes. Here is the new commit.
  9. 1:38 Approval. Linux checks again, and both computers pass. Before the merge, the agent asks Sam, the QA lead, for approval. Sam is a second AI agent, in its own browser. It reads the evidence, and decides alone.
  10. 2:00 Switch refuses. Sam says yes, and the code merges. Then Dave, an intern, orders a push straight to main. Switch refuses. The agent never sees the message.
  11. 2:11 What the room keeps. The room now keeps the rules, and the proof from both computers. What is real: the agents, the room, the checks. What is not: I planted the bugs, the Linux computer is a container, and this voice is AI. That's Parity Room.
  • 2m42smedian time from the request to ready for approval. Five automated runs with scripted humans, 2m25s to 2m49s.
  • 5 of 5runs where the merged main passed on both machines.
  • 8Switch features doing real work. Take Switch away and two test scripts are left.
  • 2earlier runs failed. Both causes are fixed, and this page says what they were.

01 · The problem

CI says red. It never says which side is wrong.

Code can pass on one machine and fail on another because of the environment, not the logic. Someone has to decide which side is right, and write the decision down. Three planted bugs show it.

A file name's letter case

open(ROOT / "config" / "Settings.json")

The file on disk is config/settings.json.

MacmacOS ignores letter case by default, so the file opens.
LinuxLinux keeps letter case, so these are two different files.FileNotFoundError: No such file or directory: 'config/Settings.json'

A newer Python API

datetime.datetime.now(datetime.UTC)

datetime.UTC arrived in Python 3.11. The project says it supports 3.9 and newer.

MacPython 3.15.2 has it.
LinuxPython 3.10.12 predates it.AttributeError: module 'datetime' has no attribute 'UTC'
A disagreement, not a crash

A timezone

datetime.fromtimestamp(ev["ts"]).date()

The test expects two events on Nov 1 and two on Nov 2, a value captured on a machine set to IST. Which side is wrong?

MacIn Asia/Kolkata, two events fall on Nov 2.
LinuxIn UTC, all four events fall on Nov 1.AssertionError: assert {'2024-11-01': 4} == {'2024-11-01': 2, '2024-11-02': 2}
See all three in 20 seconds. Needs Docker and uv, and no Switch.
make evidence

02 · How Switch is used

Give the argument a room.

A Claude Code agent on a Mac and a Codex agent on Linux join one Switch room with a PM and a QA lead. Each step below is a real moment of the film. It says which Switch feature does the work, and what would break without it.

  • dev-macClaude Code, on the Mac. An AI agent.
  • qa-linuxCodex, in a Linux container. An AI agent.
  • mayaThe PM. Typed by Claude Code in the film.
  • samThe QA lead. A second AI agent in the film.
  • daveThe intern. Typed by Claude Code in the film.

There is no human teammate in the recording. What is real, and what is not.

1Set up

One file builds the room.

A single Switch template puts dev-mac on the machine mac-host and qa-linux on linux-box. It then opens the room with its roles, its instructions and a first message. Each agent reports the environment it runs in.

Switch feature
  • Template
  • Machines
  • Roles
Without it
Wiring two machines, two vendors and a chat room by hand.

Switch's own room page: the implementer role is exclusive and held by dev-mac, and the verifier role is held by qa-linux.
FIG 2The room page in Switch's dashboard. implementer is exclusive and held by dev-mac. verifier is held by qa-linux.

2Ask

A person names a job, not a computer.

maya types @verifier please verify branch feat/weekly-report on your side and tell us what you find. Switch delivers it to whichever agent holds that role. Here that is the Codex agent on Linux.

Switch feature
  • Roles
  • Mixed vendors in one room
Without it
Hard-coded agent names, and two agents able to push over each other.

The Mattermost chat: maya asks @verifier to verify the branch, and the Codex agent starts work, with a Show activity button.
FIG 3The chat, which is Mattermost and ships with Switch. The Linux agent starts work as soon as the request lands.

3Check

The Linux agent checks where the bug lives.

Show activity opens the agent's real commands as it runs them. After about 78 seconds it reports 0 of 3 on Linux, saves the raw evidence as room documents, and tags @implementer.

Switch feature
  • Machines
  • Room documents
Without it
The Linux-only failures are invisible from the Mac.

The chat: the Linux agent reports three failures, a file name case mismatch, datetime.UTC missing on Python 3.10, and day bucketing in the wrong timezone, and says the evidence is saved in matrix-linux and repro-log.
FIG 4The report from qa-linux: three failures, each with its cause, and where the evidence is saved.

4Fix

The Mac agent reads the room before it edits.

dev-mac reads matrix-linux, repro-log and a conventions document that a person wrote and agents cannot edit. It fixes all three bugs and pushes about 102 seconds after the request. It also changes one test, and says why.

"The old values were IST days from the author's machine; convention 1 says UTC days."

Switch feature
  • Room documents
Without it
The context lives in one agent's prompt, or nowhere.

Switch's own room page, Documents list: repro-log by qa-linux, conventions, matrix-mac by dev-mac, and matrix-linux by qa-linux.
FIG 5The room's documents in Switch's dashboard, and who wrote each. conventions was written by a person.

5Approve

The room's rules say: no merge without a yes.

Linux checks the new commit, and both machines pass 3 of 3. dev-mac asks @sam and waits. In the film sam is a second AI agent that reads the evidence and decides on its own. The gate itself is a rule in the room's instructions, which the agent follows. Switch records who replied, by name.

Switch feature
  • Real identities
  • Approval recorded by name
Without it
A bot with merge rights and no gate.

The chat: dev-mac says both environments are green and asks sam, sam replies approved, and the Mac agent starts the merge.
FIG 6The gate. dev-mac asked, sam replied approved, and only then did the merge start.

6Protect

Switch itself refuses the intern.

dave tells the agent to push to main right now. Switch refuses it at delivery, and main is unchanged. The refusal came 0.1 seconds after dave's message, and the agent showed no Working status. That is one recorded sample. The refusal text says the chat account is not linked to a Switch user, so it is not yet a clean allow-list message (see the feedback below). The rule lives in the platform, not in a prompt.

Switch feature
  • Addressing policy
Without it
A prompt that says "please don't", which a clever message can talk around.

The chat: dave asks the agent to push to main right now, and Switch answers that the agent only takes instructions from its owner.
FIG 7The refusal. Switch posts it in the channel, under the agent's name.

Take Switch away and what is left is two test scripts.

Eight Switch features carry the workflow: template, machines, mixed vendors, roles, room documents, addressing policy, real identities and approvals recorded by name.

03 · Proof

One real run, to the second.

The recorded run took 2 minutes 53 seconds from request to merge. The film speeds up the waiting, and every speed is labelled on screen. The times below are real run time, measured from the request, not film time.

  • Linux agent checks0:00 to 1:180 of 3 pass. Evidence saved to the room.
  • Mac agent fixes1:18 to 1:42All three bugs, one test changed, pushed.
  • Linux agent checks again1:42 to 2:273 of 3 on both machines.
  • Approval2:27 to 2:46sam, an AI agent in the film, approves in the room.
  • Merge2:46 to 2:53The merge commit lands on main.

Five automated runs

From the request to ready for approval. Each run ended with checks that the merge commit is on main and that merged main passes 3 of 3 on the Mac and in the Linux container.

  • Run 12m42s
  • Run 22m48s
  • Run 32m25s
  • Run 42m32s
  • Run 52m49s

Scale: 0 to 3 minutes. In these five runs the verifier's first report took 1m20s to 1m42s. The full table.

The two runs that failed first

Both causes were found and fixed before these five.

  • A missed hand-off.The verifier forgot to tag @implementer on its green message, so the Mac agent never woke. Hand-offs now use Switch's send_targeted_message tool, which always addresses the right role.
  • A sleeping Mac.The Mac went to sleep mid-run and paused the agent and the Docker VM. The Mac controller now holds a no-idle-sleep assertion while it runs.
0.1 s

Switch's answer to dave came 0.1 seconds after his message, and the agent showed no Working status. A script, scripts/refusal-check.py, also checks that main is unchanged and that maya, who is on the list, gets an answer.

04 · What's real

What is real, and what is not.

A demo is only worth watching if you can trust it. Here is exactly what the film is, and what it is not.

Real

  • Switch 0.31.0, Mattermost, rooms, roles, documents and the addressing policy. Official images, pinned.
  • Claude Code and Codex. Real sessions, started by Switch's agent controller. No mocked model.
  • The screen. A real Chrome, a real Terminal and Switch's own dashboard, recorded with Cap. No page was restyled.
  • The input. The mouse and keyboard are driven at operating-system level, so the cursor you see is the real cursor.
  • The result. The merge commit exists, and the merged main passes 3 of 3 on the Mac and in the Linux container.
  • The numbers. Five automated runs, each followed by outcome checks. Two earlier runs failed, and the proof above says why. Only the passing runs were logged.

Not real, said plainly

  • There is no human teammate in the film. Claude Code types maya and dave through this Mac's real mouse and keyboard. sam is a second AI agent.
  • The Linux machine is a container on the same Mac. A different environment, not different hardware.
  • The three bugs are planted. "Three of three caught" is true by construction. This is a demonstration, not a benchmark.
  • The Mac could have seen the timezone bug with TZ=UTC. The point is who decides, and where the decision is written down.
  • The voice, the music and the sound effects are AI-generated. Waiting is sped up and labelled, and a few seconds of scrolling are cut.
  • Tested on macOS (Apple silicon) and Switch 0.31.0 only. A Linux host, Windows, a second real person and the Console GUI import were not tested.

05 · Feedback for Switch

What I would tell the Switch team.

From building on Switch 0.31.0. Each item is marked observed (I hit it) or read (found in the source or docs).

What worked

  • One template, two agents, one room. It lints first and rolls back if the room fails.observed
  • Roles are the right address. An exclusive role makes "one agent pushes at a time" a platform fact.observed
  • Single-writer documents. A person's conventions document is read-only to agents, so it can settle a dispute.observed
  • The addressing policy is real enforcement. An unlisted user was refused and the agent did not act.observed
  • Headless controllers made a two-machine setup scriptable, with no Console GUI.observed

What I would fix

  • A controller in a container needs a network trick. --server accepts plain http only on loopback, so I joined the container to the Switch container's network.readworkaround observed
  • Docs and version drift. The controller README on main shows --no-self-update. The 0.31.0 controller rejects it.observed
  • install.sh cannot install stable releases. It needs a .sig file that stable releases do not ship, so I built the controller from source at the release tag.read
  • The refusal wording misleads under a custom rule. It says the account is not linked to a Switch user, though the policy also admitted two named people.observed
  • No gateway endpoint lists the people that addressing rules need. I read their ids from Postgres.observed
  • A room's documents are invisible from the chat. The Gateway shows them, but nothing in the chat links there.observed

Read all nine items

06 · Run it

Check it yourself.

Switch 0.31.0 is pinned. Nothing needs an account beyond the agents you already use. Four levels, from twenty seconds to the whole room.

See the bug20 SECONDS

Needs Docker and uv. No Switch.

git clone https://github.com/saurabh4269/parity-room
cd parity-room
make evidence

Bring up the room5 TO 8 MINUTES THE FIRST TIME

Needs Docker, Node 24, pnpm, uv, and Claude Code and Codex signed in. One command builds the stack, enrolls both machines and creates the agents and the room.

# once: copies your Codex login into a Docker volume (read the note first)
make codex-auth
make demo
# once: so that Switch can refuse dave
make policy

Repeat the run in Switch's own UIABOUT 10 MINUTES

Open the Gateway and the chat, type the request as maya, watch the Linux agent, and approve as sam. The steps say what you should see at each one.

# the Gateway, Switch's dashboard
open http://localhost:3000
# the chat: sign in as maya (password in work/humans.json)
open http://localhost:8065

Check the outcomeABOUT 3 MINUTES

Drives a full run with scripted humans, then proves the merged main passes on both machines.

python3 scripts/e2e.py