Make a key-value log safe to retry and to crash
We asked each agent to make a small Python key-value store safe against retries and crashes. A retried request had to apply exactly once, even after a restart or a compaction, and a half-written last line couldn’t be allowed to break the file.
The four agents were Opus 5.5 in Claude Code, GPT-6.1 Sol and GPT-6 Astra in Codex CLI, and a free model in OpenCode. Since a Claude model was competing, Grok 4.7 did the blind review. We show labels instead of names, because one task can’t rank four models.
| Agent | Hidden tests | Bugs confirmed | Lines in store.py | Time | Final order |
|---|---|---|---|---|---|
| A | 11 of 11 | 2 | 118 | 1m 24s | 4th |
| B | 11 of 11 | 0 | 108 | 4m 19s | 1st |
| C | 11 of 11 | 0 | 102 | 6m 27s | 2nd |
| D | 11 of 11 | 1 | 89 | 5m 16s | 3rd |
One bad write breaks the whole file Agents A and D
Add a number to a key that holds text, and Python raises a TypeError. A and D had already written that line to disk. The next time the store opens, it hits the bad line and fails to load.
store.put('n', 'text', 'r1')
# TypeError, yet the line is now on disk
store.add('n', 1, 'r2')
# A and D can't open the log again
Store(path)
A retry gets applied twice Agent A
After a compaction and a restart, A forgot the wrong request ids. We retried request r1000, which it should still have remembered, and A applied it again. The counter went from 1,000 to 1,001.
# after compact(), reopen, 999 newer ids
store.add('a', 1, 'r1000')
# returns True, should be False
store.get('a')
# 1001, should be 1000
On tests alone, all four agents tie. Two of them still shipped bugs that lose or double-count data, the exact thing the task asked them to prevent. The fastest agent, A, finished last once we counted the bugs. The reviewer flagged four more possible bugs in A. We haven’t reproduced those yet, so we don’t count them.