Inspiration

Our team kept running into the same problem. Each of us had an AI coding agent open on the same repo, and they kept getting in each other's way. Two agents would edit the same file, redo each other's work and drift apart. One of us would run out of Claude usage while a teammate's quota sat unused. And nobody could tell what any agent was doing. AI made each of us faster, but it made us worse at working as a team. We wanted our agents to work together the way a good team does.

What it does

Tandem turns everyone's AI coding agents into one coordinated team.

  • One prompt for the whole team. You type a goal like "Build a login page". A manager agent splits it into small tasks and lists the exact files each one touches and what has to happen first.
  • No collisions. When a worker claims a task, it locks that task's files in one atomic step, so two agents can never get the same task or file. If Claude tries to edit a file someone else holds, a hook stops it.
  • Work goes to whoever has room. Workers on every teammate's computer pull tasks themselves, each under its owner's Claude login. A worker that hits its usage limit hands its task back and returns after the reset. If a worker crashes, its files are released after two minutes.
  • Stuck work comes back to you. If two workers can't finish a task, the board marks it needs you with the reason and a Try again button.
  • One tested branch per goal. Finished tasks merge into tandem/<goal> and your tests run on it. A merge conflict or a failing test becomes a new task for a worker to fix. When the goal is done, one click merges it into your project.
  • A live board. Each goal has a lane, and its tasks move from Waiting to To do, In progress and Done. You can see who is on what, for how long, their last note and what it cost.

Teammates join with one invite link. They don't need GitHub, because the host shares the project directly, and Tailscale keeps it private on venue wifi.

How we built it

Everything is TypeScript, and the core is SpacetimeDB, which we use as the team's shared "brain."

  • Brain (SpacetimeDB module): Goals, tasks, file locks, workers, activity and shared memory live in one database. Our rules run inside it as reducers, so claiming a task, taking its locks and marking it claimed happen in one transaction. We wrote no separate backend, queue or cache.
  • MCP server: 17 tools that every agent uses to claim, report, complete and hand back work. It also includes a worker rules skill and a Claude Code hook that blocks edits to locked files.
  • Manager: A Claude agent that plans each goal into tasks and their dependencies, then merges, tests, optionally reviews and finishes the goal.
  • Launcher: The worker process. It claims tasks and runs Claude Code headless in its own git worktree, picking the model by task difficulty (Haiku for easy, Sonnet for normal, Opus for hard).
  • Dashboard: React and Vite, subscribed to the brain's tables, so it updates live and never polls.
  • CLI: tandem start and tandem join, with nothing to install globally.

No part talks to another directly. They all read and write the brain, and every screen updates live from it.

Challenges we ran into

  • Making collisions impossible. Telling agents to "please don't touch each other's files" isn't enough. We had to make claiming and locking a single atomic reducer, then prove it by having 10 clients race for one task. Exactly one wins, and a lock conflict leaves no partial locks.
  • Failure is the normal case. Agents hit usage limits, crash, get stuck and produce merge conflicts. We had to build a path for each: hand tasks back, time out locks from crashed workers, retry with a different worker, escalate to a human, and turn conflicts and failing tests into new tasks.
  • Sharing a repo without GitHub. Teammates had to be able to clone from the host and push branches back over the local network or Tailscale, since venue wifi often blocks devices from reaching each other.
  • Keeping agents in their lane. Claude Code needed a hook that checks the brain before every edit, because a prompt alone wasn't reliable.
  • Testing a multi-agent system without burning quota. We built a test suite that never calls an AI, plus a separate set of real Claude runs.

Accomplishments that we're proud of

  • File collisions are prevented by the database itself, not by asking agents to behave.
  • From a single prompt we got a goal planned, built by two Claudes in parallel, merged and passing its tests.
  • 362 checks across 11 suites. They cover the atomic rules, all 17 MCP tools over the real protocol, the full first-use journey in Chrome on desktop and phone, and every failure path.
  • Setup is one command for the host and one for each teammate.
  • Each teammate's quota stays in use: when one worker runs out, another picks up its work.

What we learned

  • Coordinating AI agents is a distributed systems problem. Atomic transactions, locks, leases and retries matter more than clever prompts.
  • SpacetimeDB was a great fit, because the database, the rules and the live sync are all one thing. That removed a whole backend from our design.
  • Agents follow guardrails such as hooks and locks far more reliably than instructions.
  • A human needs to see what's going on. The live board and the needs you state made people trust the system.

What's next for Tandem

  • Testing on macOS, Linux and across physical machines (so far it's tested end to end on Windows).
  • Real accounts and authentication in place of saved identity tokens, so the brain can be hosted safely on SpacetimeDB Maincloud.
  • Full support for Codex and other agents alongside Claude Code.
  • Smarter planning that uses what the team has learned in shared memory to plan better goals over time.
  • Deeper GitHub integration: automatic PRs, review comments and CI hooked into the goal lifecycle.

Built With

Share this project:

Updates

Submission history