Why Legacy System Veterans Don't Trust AI to Write Code: Hard Lessons from P0 Incidents
A developer shares how AI-generated code caused production incidents in a 7-year-old legacy service, leading to a workflow shift where they now write code themselves with AI reviewing, reserving AI-only generation for low-risk internal tools.
I've relied heavily on AI for new projects over the past two years — it's fast and handles grunt work well. But when I return to the company's 7-8 year old legacy service, I become extremely conservative: every AI suggestion makes me ask whether it understands why a field was designed that way originally.
This conservatism isn't about path dependency or reverence for history. In March through May this year I genuinely used AI to modify a lot of code in that legacy system (using top-tier models, cost is not an issue). The result: AI really can produce P0-level incidents. I'll cite just a few examples.
Some AI-generated code did make it to production because the generation speed is tempting. I reviewed most of it, but I can't guarantee correctness — only that no issues have surfaced yet. Scary near-misses are frequent. Last week a client reported several devices stalling. I panicked because these remote devices lack full debugging interfaces; we can only inspect logs.
While digging through logs I found a log line that should appear once had been printed dozens of times. I knew this was an AI-introduced bug but couldn't pinpoint why. I couldn't ask AI "why did devices crash?" or even "why is this log repeating?" because I didn't know if the log anomaly was a symptom or the cause. Re-reading the code revealed a mis-nested loop that didn't break execution. The actual device failure turned out to be a hardware glitch that self-resolved later.
That helpless feeling is unacceptable. A trusted client once told me about another engineer who seemed clueless in meetings, destroying confidence and ending the partnership. Having worked with this client for years, I refuse to become that engineer. So for production-grade industrial projects, my workflow is now: I write, AI reviews — not the other way around. The nature of the process is completely different.
For internal tools and low-impact frontends I still let AI write and modify freely. I have a clear sense of what AI can touch and what it cannot.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
