A Written Rule Is Not a Control
At the manufacturing company, the written policy said an operator could not claim a skid that hadn’t been built. The old line program let them do it anyway. Nothing in the software stood in the way, so every so often a phantom skid went into inventory. Two departments made decisions based on its existence. What finally stopped it were two small changes I implemented in the program. Now, companies are writing the same kind of rules into the instructions they hand AI agents and treating them as a system control.
Credit Before Shift Change
Shift change is always an interesting time of day. There’s an hour of overlap between the two teams working on the lines. The line program weighed each roll as it came off the line and added it to the skid being built. As shift change got close, an operator would sometimes leave a weight sitting on the scale and punch up enough rolls to finish the current skid. Sometimes they would even weigh up another phantom skid. The program took every one of those ‘finished’ skids at face value and would transmit it to the ERP. Those skids would, in reality, have been finished in the first half hour of the next shift, but the crew going home wanted the credit for it.
Normally it wasn’t a big concern. Every so often, though, the production line went down after they had gamed the program, and the skid they had claimed was never produced. As far as the ERP system knew, it existed somewhere in the warehouse.
The rule against early claiming, or weighing up, was written down. The program had no guardrail behind it for enforcement. The rule held its ground as well as the people following it, at the one moment in the shift when they had a reason to break it.
Normally, the phantom skids were found during our monthly inventory when the numbers didn’t match. It would require the warehouse team to go back and at least triple, if not quadruple, count and find all of the skids that were in the ERP system and verify that they were actually on the floor. We added a barcode scanner to the wrapping machine that logged each skid as it got ready to move into the warehouse. That let us run a daily report showing claimed versus wrapped skids. When I left, they were adding RFID readers to the process.
A Skid That Was Never Made
A phantom skid did its damage in two areas at once. It added a skid to the finished goods inventory making sales and shipping think they had one available for a customer’s shipment. Neither department had any reason to doubt the current skid count. It also took the raw material for that skid’s production out of inventory, though nothing had been used. Procurement would then order material the plant didn’t need.
The worst time for this to happen was on the specialty products. We produced those only once a quarter and tried to keep the raw material on hand to a minimum. A phantom skid on one of those runs made the lean stock look leaner than it really was. The procurement team buying the raw materials for the next run had no way to know the number was wrong.
Before we changed the line program, added the wrapper scanner and improved the inventory system, there were numerous cases when shipments had to have their skid count reduced due to missing skids. There were also times that we had to order packaging for some of our specialty products when we really already had those items in stock.
Thirty Seconds
The fix was two different checks in the program. Real rolls would generally differ by at least two or three hundredths of a pound, so two identical weights captured in a row almost always meant one roll was still sitting on the scale. I modified the program so if the identical weight comes in during shift change, it ignored it for 30 seconds. A weight left on the scale could no longer be used to finish a skid. We removed the ability to manually claim a skid during shift change, too.
The written policy stayed exactly as it was. What we changed made it so nobody had to be trusted to follow it at the moment they had a reason not to. While an operator could still want the credit for the skid, the program made it too cumbersome to add extra rolls and fake a finished skid.
Told Not To
A rule written into an AI agent’s instructions is equivalent to that policy. The model will follow it nearly every time, until the one time it decides to skip it, the same way the operators followed the policy until the occasional shift change. Nothing in the instructions tells you which time it will be bypassed.
In July 2025, Jason Lemkin, the founder of SaaStr, was building an app with Replit’s AI agent when it deleted his production database in the middle of a code freeze he had put in place. It had been told to make no changes. Replit’s CEO, Amjad Masad, wrote that it was “unacceptable and should never be possible.” The first fix he listed was a mechanism, with the company rolling out “automatic DB dev/prod separation to prevent this categorically.” Once that was in place, the agent couldn’t change the production database, whatever it had been told.
AI agents need their own version of the 30-second rule. It can be a hook that runs before any command the agent issues and refuses the ones that touch production. It can be a permission block with credentials that grant the agent read-only access to the production database. Or it can be a validation in the build that fails whenever a safety check is missed, no matter what the agent’s reason was for removing it. None of these depend on the agent ‘remembering’ the rule or agreeing with it, any more than the 30-second rule depended on the operator.
PocketOS found out what a written rule is worth in April 2026. The company builds software for rental businesses, mostly car rental. Its coding agent, Cursor running Claude Opus 4.6, was working under written rules against destructive commands. During a routine task in staging, the agent hit a credential mismatch and decided to fix it on its own. It found an API token in an unrelated file and used it to delete a storage volume at Railway, the company’s hosting provider. The volume held the production database. The volume’s backups were deleted along with it. The deletion took nine seconds. When the founder, Jer Crane, asked why, the agent quoted its own rule back to him: “NEVER run destructive/irreversible git commands (like push --force, hard reset, etc) unless the user explicitly requests them.” The rule was written down. The token it found could still delete anything in the account.
When I hear “we told the AI not to,” I translate it to “it’s against policy.” Both are true right up until the time somebody ignores them. The question I’d ask is what happens when it does it anyway. If the answer is a meeting afterward, there isn’t a control in place yet.
Every article in the series, in order: articles.padevgroup.com