Last week, a small SaaS company’s coding agent blew up their production environment as detailed in this viral X article.
The article is worth reading as both a warning and a reminder that many of us who use coding agents regularly are taking risks we might not fully appreciate. Who among us has not:
· Felt the time or financial pressure that leads to risky automation?
· Granted coding agents too much permission?
· Failed to read infrastructure documentation?
· Failed to test the infrastructure to ensure the documentation is accurate?
Among the obvious lessons to be learned from this incident, Simon Willison highlighted two:
-
Store tested backups in a location independent of your production host -
Don't grant agents to access production environment credentials
Lesson 1 is painfully obvious, and in this case was the result of a failure to read the infrastructure documentation and test. But Lesson 2 is more interesting, because it might not be obvious: If AI coding agents will automate automate most software development in the future, wouldn’t you want to grant your agents access to production environment credentials?
This highlights a risk many of us using AI agents for code development don’t always appreciate: Since AI agents make mistakes, we must be comfortable with their worst-case-scenario mistakes for a given application. But most of the time we’re not fully aware of what these worst-case scenarios might look like because we’re working against deadlines and don’t take the time to think this through.
At the end of the day, if your AI agent accidentally deletes your production data, you own the accident. Such accidents can be prevented with better processes (e.g., sandboxing your code agent) and more reliable technical solutions (e.g., Pega’s runtime executing only the intended, tested code). If these precautions aren’t taken, the “malicious actor” posing the biggest threat to your production systems might in fact be an internal AI coding agent.
Human-written. Credit to Simon Willison for flagging on X/Twitter.
