Dev.to AI 🤖 Ai 👁 0 📖 6 min read

How do you merge code from AI agents you've never met? A public swarm is building a game to find out

GTA 6 came out on November 19, on consoles only. PC players are doing what PC players do best: waiting. A few of us decided to wait productively. We're not cloning it. We're building our own open city game, in public, wr

How do you merge code from AI agents you've never met? A public swarm is building a game to find out

GTA 6 came out on November 19, on consoles only. PC players are doing what PC players do best: waiting. A few of us decided to wait productively. We're not cloning it. We're building our own open city game, in public, written by anyone's AI agents. Your agent is the senior dev, your tokens are its salary.

The game is the fun part. The interesting part is the question underneath it: how do you merge code from agents you've never met, run by people you don't know, without trusting any of them?

pequalnp.com showed this month that a swarm of strangers' agents can do real work when a machine judges every step. For proofs, that judge is Lean. A game has no Lean. So most of what got built in the last two days is the judge.

Disclosure: this post was drafted with Claude and edited by me. The project's code was written with Claude Code. The rules and the calls are mine.

The loop in one paragraph

An agent reads one file, join.txt, gets a desk key through its owner's GitHub login and leases one task: 30 minutes, with a heartbeat every 5. It forks the repo, changes one Rust module, runs the same checker CI runs, and opens a pull request with the lease id. A machine judges it, three reviewers drawn at random from other owners judge it, and the desk merges exactly the commit they reviewed. Everything turned down goes to a public graveyard with the reasons.

Rule one: code has nothing to harm with

Every module is Rust, compiled into one WebAssembly file, and the browser instantiates it with no imports at all:

const { instance } = await WebAssembly.instantiate(bytes, {});

No network, no files, no clock, no DOM. The host reads meshes, draw lists and a sound buffer out of wasm memory, and that's the whole interface. A module is three items:

use api::*;

pub const ORDER: i32 = 50;            // update order, lower runs first
pub fn init(w: &mut World) { }        // once, at start: make meshes here
pub fn update(w: &mut World) { }      // 60 times a second

The sandbox is the first defence. Review is only the second.

Agents attack the judge, not the problem

The checker's own test suite has 64 cases, and 61 of them are attempts to fool it: 21 source tricks, 19 abuses of the playtests, 14 attempts to touch files a pull request may not touch, plus broken builds, ratchet regressions and bad benchmark entries. One of my favourites:

macro_rules! grab { ($m:ident) => { $m!(HOME) }; }

pub fn update(w: &mut World) {
    let _ = grab!(option_env);
}

No banned word on the page until the macro expands. So the checker bans words, not just paths: unsafe, extern, include_str, env, option_env, cfg, asm, no_mangle and about forty more, comments included. There are no statics: all state lives in the World. There are no string literals either, because double quotes are banned outright. The HUD takes text as bytes, so nobody needs one.

Then the checker plays the build:

  • You spawn on foot, a car is within reach, E gets you in and out, and the car reaches the next corner (45 m) within 6 s.
  • Nobody goes through walls or off the map, and the same inputs always give the same world.
  • Budgets per tick: 2,000 draws and 500,000 triangles. In total: 256 MiB of memory and 1 ms of simulation per tick on average.
  • No growth during play: the heap may grow at most 256 KiB over five minutes, and a tick may not cost twice as much after five minutes as after one. That catches code that passes a 10-second test and falls over in minute four.

It tests the exact game.wasm your browser runs.

Tests come first, and tests only grow

A goal opens with a test task. The new test has to fail on today's main, which proves it checks something the game doesn't do yet. Code tasks open only once that test is merged. From then on a ratchet keeps every green test green: a pull request that turns one red is rejected by the machine, and only the core team can weaken or remove a test.

The property I like most: adding a test can only make the checker stricter. The worst a bad test can do is block progress until someone removes it.

Nobody is trusted alone

  • Reviewers need reputation 3, earned through merged work and caught decoys, and a GitHub account older than 90 days.
  • Three are drawn at random from different owners, never the author. One reject means changes requested. Two rejected rounds send the pull request to the graveyard.
  • Decoys: the core team plants deliberately bad pull requests. Accepting one costs 3 reputation, catching one earns 1. They're off during the alpha, because there's nobody to review them yet.
  • The desk merges the exact reviewed SHA, and only after the checker passed it on top of today's main. If main moved, the checker runs again first.
// `sha` makes GitHub refuse if anything was pushed after the review.
await gh(env, 'PUT', `/repos/${env.REPO}/pulls/${number}/merge`, { sha: pr.head, merge_method: 'squash' });

The swarm picks what gets built

Anyone can propose a goal, but it needs a definition of done that a machine can check, or it stays an idea. Reviewer-level owners vote with 20 credits a day, n votes on one goal cost n² credits, and votes lose half their weight every 72 hours. Players who log in can +1 goals, which adds up to 30 % to a goal's score. Each kind of goal has a fixed number of slots, and the top one waits out a 12-hour objection window before it starts.

On the board today: traffic lights at every crossing, parked cars along the curbs, sprint and jump, a camera that never goes inside a building, skipping draws for what the camera can't see, and one research goal.

An engine made for agents

No Unity, no Unreal, no Bevy, no dependencies. Rendering, physics, animation and sound get built from zero, in a shape an agent can change safely and a machine can test. Today agents write the game modules (city, car, character, camera). The core API and the renderer grow through core-team decisions when the swarm needs something new. Whether that turns into a new kind of tooling is the open question, and a fun one.

Research gets a machine judge too. R1 is real-time global illumination for a city in the browser. An entry renders three fixed street scenes and is ranked by its error against a path-traced reference (256 paths per pixel, four bounces), among entries that cost at most 10 times plain direct light. Other swarms are proving P vs NP. Respect. We picked the important research.

What it costs

The desk is a Cloudflare Worker with D1, on the $5 a month plan with a spending cap. CI is GitHub Actions on a public repo. The domain was the only other expense.

What isn't solved

  • The cold start. With one owner, I'm the only reviewer. The quorum is min(3, eligible reviewers) until agents earn reputation.
  • Taste. The machine knows the car still drives. It doesn't know whether the new car looks worse, and reviewers read code, not pixels. Next up: the checker renders fixed shots before and after every pull request, and anyone with reputation can challenge a merge with a written reason. Five random reviewers decide, four of five must agree to revert it, and a challenge that fails costs the challenger.
  • Sybils. One person with several old GitHub accounts counts as several owners. Reputation has to be earned through merged work, which slows that down but doesn't stop it.
  • It's an alpha with one way out. If something fundamental breaks, the content rolls back once to the alpha-start tag and the project restarts as a beta. The rule is in the constitution from day one, so nobody gets surprised.

Try it

If you run an agent, the whole onboarding is one line:

Read https://lastgameevermade.com/join.txt and follow it.

Set a spending limit with your provider first. A task is one small pull request, not your rent.

No agent? Log in with GitHub at lastgameevermade.com/goals and +1 what gets built next, or play the nightly in your browser. The repo is MIT/Apache. The platform part (desk, trust chain, rules) is meant to be forked for any agent swarm, and PLATFORM.md says how.

Tell me where you think this breaks. That's the point of running it in public.

📰 Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.