The new code wasn’t the problem
The name was. Knight reused a flag that old code, still running on one server, already answered to.
On August 1, 2012, Knight Capital lost about $440 million in 45 minutes.
They shipped a new feature by reusing an old flag. Years before, that flag had switched on a retired piece of code called Power Peg. Seven servers got the new code. One didn’t. On that one server, the flag activated Power Peg, and it traded until the firm nearly went under.
The new code wasn’t the problem. The name was. Knight reused a flag that old code, still running on one server, already answered to.
One evening this fall I watched the AI coding assistant make that same mistake twice, debugging the sensor pods in the Croplock grow tent.
First, a build name. The leaf sensor’s firmware is built under the name p0003, and its build folder is named after it. Earlier that day, for a test, the light sensor’s firmware had been built under that same name, into that same folder. That evening the assistant built new leaf firmware there. The build silently didn’t run and reported success anyway, so the light sensor’s program was left in the folder looking brand new. That’s Knight’s missed server in miniature: a reused name, plus a deploy step that didn’t happen, so old code stood in for new. A checksum caught it before it went out.
Second, a device name. Each sensor signs every reading with its name, and the hub files the reading under that name. The leaf sensor’s name is bench-leaf-01. The sensors sleep between readings to save power, so the update tool sent new software to “whichever sensor is awake” instead of checking which device it was talking to. The leaf sensor was asleep. The sensor in the room the tent draws its air from wasn’t. It got the leaf sensor’s software, name and all, and for three minutes it introduced itself as bench-leaf-01. The hub believed it. Its readings went into the leaf sensor’s record, and that room’s own record went blank.
Both times, the assistant used a name that already belonged to something else: a folder another program was using, and a name the hub already knew as a different sensor. That’s what Knight did with its flag. And neither mistake looked like a mistake. One looked like a build that worked. The other looked like a sensor reporting in.
Fixing it on the spot wasn’t enough. The fix had to go into its harness: the rule book on how to write (and NOT write) code.
That harness now says: never borrow a name something else owns. Before you put a value in a named thing, ask who else writes there, and when. New names are free.
Knight’s lesson was published thirteen years ago. Today’s harnesses still need it spelled out.
First published on LinkedIn, 24 November 2026: the post.
Also read: The model was fine · The rules the code has to follow · The log that wrote into nothing for three weeks