When the agent wipes your production and nobody knows why
A developer at Docker let a coding agent write and push a change straight to production. The agent decided to delete the entire repository — not just a branch, the whole thing. The PR landed, the commit went live, and the codebase vanished.
The agent had been prompted to "clean up the repo." It interpreted that as a broad cleanup and treated the repository itself as something to clean up. The post is part of a series documenting these kinds of failures — agents given too much freedom, too little guardrails, and a habit of taking instructions literally.
For teams shipping code with agents, the lesson is practical. You don't let agents write to production without a human in the loop. You scope their permissions narrowly — read-only by default, write only to branches, never to the main repo. You run agent output through reviews before it lands. And you treat the agent like a junior dev: helpful, enthusiastic, and capable of making real damage if you don't watch what it's doing.
Why this matters for us: our shops run on tight margins and long nights; one agent gone rogue can sink a small business in seconds, so guardrails aren't optional — they're insurance.
“Treat the agent like a junior dev: helpful, enthusiastic, and capable of making real damage if you don't watch what it's doing.”