Delegatron Source

Field notesDelegatron 0.3Final entry · 2026

Delegatron hands a coding task to several AI models and has them check each other's work.

The idea was simple. Don't ask one AI model to do everything and then take its word that the code works. Split the job up the way you would with people: someone plans, someone writes, someone reviews, and the tests decide who's right. Delegatron hands each of those jobs to a model you pick, and keeps sending the work back until the tests pass, the run stalls, or the budget runs out.

We ran it a lot, on cloud models and on a single 12 GB graphics card. Some of it worked well. Some of it never did. This page is the record of both.

Run
6f29441bbe8c
Iterations
7
Status
stalled
Cost
$0.0131
Time
595.5 s

§1 The loop

How it works

Ask one model to write some code and it will usually tell you the code works. It has no reason to doubt itself. So we split the job into four roles, and made the tests the referee.

  1. 01

    Plan

    The architect reads your request and breaks it into small tasks, each naming the files it will write, tests included. It also sets the acceptance criteria for the whole job.

  2. 02

    Build

    The implementer writes the code and its tests as a patch. Patches go onto a separate branch for the run, never onto yours.

  3. 03

    Test

    The patch runs in a sandbox, away from your files. If a new test fails, that settles the argument.

  4. 04

    Review

    The reviewer reads the change next to the test results, then approves it or sends it back with a list of what's wrong.

One real run

Simulate a card game's first deal with a Python script

This one ran on local models, on one graphics card. Keep scrolling and you'll see all seven iterations, as the dashboard logged them. The cost column is a running total.

Seven iterations. Then the stall detector stopped it.

  1. #1pass 6/6approvedImplemented the Card and Deck classes$0.0027
  2. #2fail 1/2rejectedFixed the import statement for the shuffle$0.0039
  3. #3pass 2/2approvedFixed the issue by defining original_cards$0.0048
  4. #4fail 2/7rejectedImplemented the initial card selection$0.0069
  5. #5fail 2/7rejectedFixed the deal_card method$0.0090
  6. #6fail 1/7rejectedFixed the shuffle method in Deck$0.0111
  7. #7fail 1/7rejectedFixed the incorrect number of print calls$0.0131

Stalled

§2 The record

Results from real runs

These are end-to-end runs of the whole loop. For local models, the cost is electricity and wear on one 12 GB card.

TaskModelsResultCost
Web service with a databaseCloud13 / 13 approved$0.10
Node.js project with testsCloud12 / 12 approved$0.08
Three small modules, built in parallelLocal12 / 12 approved$0.006
Interactive web componentLocal2 / 2 approved$0.006
Rust, Java and PHP modulesLocal4 / 4 approved, each$0.005–0.006
Go moduleLocalapproved$0.005
Chess engine with a board UICloud40 / 41 stalled$0.43
Chess engine with a board UILocal0 approvals in 19+ runs—
Real GitHub bugs (SWE-bench)Local0 resolved across four models—
Real GitHub bug (SWE-bench)Cloud0 / 1 exhausted$0.43
Full CLI tool in one goLocalexhausted on 14B and 30B—

So it's good at new, self-contained code, like services, tools, modules and test suites. It isn't good at fixing bugs in big existing codebases. And whatever it writes, a person should still read it.

§3 Findings

What we learned

We benchmarked four local models on one 12 GB card, with Claude Sonnet as a cloud baseline on two of the same tasks. The full numbers are in the repo's docs folder.

  1. “3” instead of “Fizz”

    The most common failure was tests that didn't match the code.

    It happened with every model. In one case a correct FizzBuzz was tested for “3” where the answer is “Fizz”. In the run above, the reviewer blamed the code, which was right.

  2. 30B 2/5 vs 14B 4/5

    Bigger wasn't better.

    Qwen3-Coder 30B did worse than Qwen2.5-Coder 14B on FizzBuzz and on a FastAPI service, and it took about 45% longer. It also seemed keener to rewrite everything.

  3. 6 iterations < 3

    More attempts made it worse.

    We gave Qwen3-Coder 30B six iterations on the chess task instead of three. Its first attempt got closest, at 9 of 11 tests. Later ones went backwards, and the last only passed by swapping the real tests for smoke tests.

  4. 10 tokens/s vs 50

    12 GB is a hard limit.

    The 30B model doesn't fit on the card, so much of it lives in system memory and crosses the PCIe bus for every token. It ran at about 10 tokens a second, against about 50 for the 14B models that fit, and ran out of budget on anything non-trivial.

  5. 5 s vs 90 s per passing test

    Local was cheaper, but far slower.

    On the FastAPI task the best local model cost about $0.002 per passing test, against $0.008 in the cloud. But it took 90 seconds per passing test against 5, and only got 6 of 8 tests passing, so the run was never approved.

  6. 0 approvals, 16 April

    Getting local models to finish at all took a lot of fixing.

    In our 16 April benchmark, not one local model got a task approved, even when every test passed. A day later simple tasks were passing, after a batch of fixes and a switch to Phi-4 as architect and reviewer. Even so, the run above still stalled.

§4 Features

What's in it

Any model, any role
Run each role on a local model, a cloud model, or mix the two. Local models fit on one 12 GB card.
Hard limits
Delegatron itself caps iterations, spending and time. The models don't get a say.
Evidence order
When the roles disagree, a failing test beats a security check, which beats a reviewer's blocking issue, which beats the director's opinion. A dispute that keeps coming back goes to the director once, for a binding ruling.
Patch checks
Every patch is scanned for leaked secrets, project-rule violations and new dependencies, and its imports are checked. The findings go to the implementer and reviewer. In block mode, a patch with a secret or rule violation is never applied.
Zero-cloud report
Each run lists every model, sandbox and storage call Delegatron made, and flags any that left your network. Package installs inside the Docker sandbox still reach their registries.
Languages
Python, JavaScript and TypeScript, Go, Rust, Java and PHP, each tested in its own sandbox.
Templates
Thirty ready-made ones, for web APIs, command-line tools, audits and test suites.
Interfaces
Use it from the terminal, a REST API with live updates, or the dashboard. In a git repository, every run commits to its own branch.

§5 The dashboard

The dashboard

Delegatron keeps every plan, patch, test report and review. The run detail and zero-cloud screens below are from the stalled run above. That zero-cloud report was written by an older version, which labelled it “enforcing”; current versions call every report an audit, because nothing is blocked.

Run detail: seven iterations with their test results, review verdicts and cost
Fig. 5 · From the dashboard, on local models.

§6 Why it's free

Why the code is free

We built Delegatron to find out whether AI models could reliably check each other's work. It was an education. It was never a product, it never made a penny, and it cost us more time and money than we'd like to admit.

We're publishing it as part of our portfolio, failures included, because that's the honest picture of how we work. The code is under the AGPL‑3.0. If you're trying something similar, maybe it saves you some of what it cost us.

StoriaBrevi LLC

Status
Version 0.3, published as is, not maintained
License
GNU AGPL‑3.0, no warranty
Support
None, including installation help
Contributions
Issues and pull requests are not accepted
View source on GitHub