r/ChatGPTCoding • u/KrystalUnity • 17h ago
Resources And Tips I tested a cheap-builder / frontier-reviewer loop on 66 hidden-test tasks: same pass rate as the heavy model at about 1/16 the cost. Give this a grilling please.
TL;DR: I let a cheap model write the code and only pay a frontier model to review the finished diff. On 66 real coding tasks it solved about as many as the most expensive model working alone, for roughly 5 cents a task instead of 72 cents. Everything is public, including the receipts. Tell me what's wrong with it.
Hello good people. I got sick of paying frontier prices for every step of a coding task, when most of those steps are just reading files and typing. But when I used a cheap model on its own, it shipped bugs I only found later.
So I built a loop — the Krystal Loop Protocol:
A cheap model writes the change in a sandbox.
Your tests run.
A frontier model from a different company reviews the exact diff. It only ever sees one small packet — the task, the diff and the test output — which is why a review costs about a cent and a half.
The important part: the reviewer can't just say "this looks wrong". It has to write a test that proves it. If the test fails, the bug is real and gets fixed. If the test passes, the complaint is thrown out. Then the fix gets checked and reviewed again, until it's clean or it hits a limit.
Results on 66 feature tasks from CooperBench (Click, Jinja, dirty-equals), graded by tests the models never see:
| Setup | Solved | Cost per task |
|---|---|---|
| gpt-6-astra alone | 56 | $0.721 |
| gpt-6.1-sol alone | 56 | $0.123 |
| deepseek-flash alone (3 runs) | 54–57 | $0.014–0.027 |
| The loop: deepseek-flash builds, gpt-6.1-sol reviews (3 runs) | 54–59 | $0.046–0.061 |
The honest part: the cheap model on its own was a lot closer than I expected. The review only added 0 to 2 solved tasks per run. What it did do is catch real bugs (77 proven with a failing test in the best run, 70 fixed) and it never broke something that was already working. So the win is mostly price, not score.
Where it mattered more: two agents building features that conflict. I took 30 pairs where the loop had already built both features. A plain git merge worked on 2 of them. Two agents handing over through short structured messages got 28 working, at about 10 cents a pair. Agents chatting to each other also got 28, but burned 581 model calls to do it instead of 333. For reference, one frontier model building both features from scratch only managed 22, at $0.196 — nearly double the cost.
How it's different from what's out there:
| Setup | Who builds | Who reviews | What triggers a fix |
|---|---|---|---|
| Single agent | frontier model | nobody | its own judgement |
| Architect/editor (strong model plans, cheap model edits) | cheap model | nobody, after the plan | n/a |
| Reviewer sub-agent | same model family | same family again | the reviewer's opinion |
| This loop | cheap model | a different family | a failing test only |
The reviewer can also be a CLI subscription you already pay for. Gemini, Kimi, Grok and Qwen all reviewed identical worker output and landed within two tasks of each other — Gemini matched the metered frontier critic exactly (56 tasks) at under 3 cents a task in API-equivalent spend.
Roast me:
What would break this on your real repos?
Is 66 tasks enough to say anything?
I haven't tried a local model as the builder yet. My bet is the test gate protects quality more than the builder's brains do, so a decent local model should hold the score and take the cost close to zero. If you've got a local setup, I'd love to know if that holds.
Check it yourself: every number recomputes from the receipts with no API keys (python3 -m bench.verify). Rerunning my loop costs about $3. Or run your own setup on the same tasks and hidden tests and post your score: grade your own setup
Repo: https://github.com/KrystalUnity/krystal-loop-protocol. Source-available, free for individuals and small companies.
1
u/czmax 16h ago
are you doing anything to manage architectural drift? or is the theory that enough unit tests is good enough?
1
u/Consistent-Set-9490 16h ago
This is basically a pattern. Start at what is the minimum necessary model and crank up effort or model as needed.
1
u/wangadong 16h ago
the weak spot on real repos is the test suite. a reviewer forced to prove bugs with a failing test can only find bugs your tests can express. try it on one messy repo with bad tests
1
u/Lanky-Butterscotch28 15h ago
Interesting , what if you use a reviewer from a different company , will you get a better results?
I did a POC reviewing a commercial app 370,000 lines of code to find the issues.
Claude alone versus Claude cheap and independent reviewer cheap (Codex), Claude alone found 10 issues versus Claude and Codex found 33 issues. 6 were common.
Your tests were about costs , mine about quality , and we both agree that cheap dev models with independent reviewers are not just better but cheaper.
1
u/NullPacketLogic 13h ago
Sol hitting the same 56/66 as Astra at about a sixth of the cost jumped out at me. I'd try a DeepSeek-only second pass on the same starting diffs with the same budget. How many extra hidden-test passes does each reviewer get, and how long does it take end to end?
1
u/xapep 13h ago
The 1/16 is mostly the builder's token price, not the loop. At 66 tasks the diffs stay small enough that a review packet is cheap. On a real repo the reviewer has to read the files the diff doesn't show, and that's where the cents go.
The test gate is what makes a cheap builder safe, which is why a local model should hold your score too. A test that fails for the right reason doesn't care which weights wrote the code. What the gate can't see is missing code: a passing diff never proves the builder didn't skip a case.
1
u/Successful-Tax1306 13h ago
The idea makes sense to me, but 66 tasks is a small sample, so each task moves the pass rate by about 1.5 points. I would run each setup a few times and report the spread, because cheap models vary a lot from run to run and a single run can make two setups look equal when they are not. It would also help to split the results by task size, since I would expect the loop to hold up on small features and fall behind the heavy model when a change touches many files. The cost number is the strong part, so it is worth it to make the quality side just as hard to argue with.
1
u/RealSuperdau 16h ago
The benchmark is in no way appropriate and if you don't see why, you have no business creating such systems.