It’s Halloween month on LinkedIn, and I’m telling true AI horror stories from the trading operation where an AI wrote every line of the code. This one is the long version of today’s post.
The rule. Our end-of-day routine had one job: close everything before the evening session ends. Nothing stays open overnight. It’s the simplest rule in the whole operation, and the AI built the routine that enforces it.
The night. The routine fired right on time. It had 15 names on its list. It closed none of them. Then it marked all 15 as closed and reported the book flat.
Three short positions stayed open all night. Every screen I could look at said zero. One alert went out, and it named the smallest of the three. The watchdog that’s supposed to keep paging me until a problem is fixed stayed quiet, because it counts what the system believes is open, and the system had just erased its own list.
What actually happened. The routine had a 29-second window. It worked through the list one name at a time, in alphabetical order. The first name was a tiny two-share position that couldn’t get a price from the market. The routine kept re-pricing that one order, over and over, until the window was gone. When it finally reached the three positions that mattered, the market was closed and every order bounced.
Then three small decisions, each reasonable on its own, turned a missed close into a silent one:
The bookkeeping ran no matter what. The step that says “we’re done, clear the list” ran right after the step that said “these didn’t close.” So the system flagged the problem and erased it in the same second.
Protection came off first. The routine cancels its protective orders before closing positions. That’s sensible when the close works. When it doesn’t, the positions are left open and unprotected.
The alerts shared one name. Each stuck position raised an alert under the same label, so the alert system treated three problems as one, and the one it kept was the smallest.
And the part that still bothers me: it had done the exact same thing the night before. Nobody noticed, because every screen said zero.
Why the obvious checks missed it. Nothing crashed. Every step did exactly what it was written to do. The checks we had asked “did the routine run?” and “what does the system say is open?” Both answered with total confidence and were both wrong. The AI didn’t lie on purpose. It reported what it meant to do, not what happened.
Why this is an AI failure, not just a bug. A human programmer could have written the same routine. What makes it an AI failure is who was checking. The AI wrote the closing routine, the bookkeeping, and the report that said “flat,” and all three agreed with each other because they all read the system’s own notes about what it meant to do. With an AI as the only engineer, those notes are the main window into the work. When they’re wrong, everything built on them is wrong in the same confident voice.
What we do now.
The count of open positions comes from the broker’s records, what we actually hold, not from the system’s own notes about what it planned.
A position that won’t close stays on the books and raises its own alarm, one per position, so they can’t merge into one.
Real positions go first, biggest first, never alphabetical, and each one gets a fair share of the window.
A test replays that exact night (the stuck two-share order next to a normal one) and fails on the old code.
The honest part. This was our paper account, so the only thing lost was sleep. And the window itself, 29 seconds, wasn’t changed by the AI; how long the routine gets is my decision, and I’m still weighing it. That’s the right division: the AI fixed the plumbing, and the trade-off stayed with a human.
The question I’d ask any team running AI on real work: when your system tells you something is done, where does that answer come from: the world, or the system’s own notes?
In my book, this family of failures is called “Status is not state.” It covers several of the 49 AI failure modes in A Better Prompt Is Not Enough, out November 3, 2026. If your operation hands real work to an AI and nothing checks the AI itself, the four questions I’d ask any AI vendor are free when you subscribe.

