How Do You Contain an AI Agent Failure You Can't Prevent? A developer argues that containing AI agent failures is a design choice about authority, not prevention. The developer advises giving agents the least authority the job allows, using human-in-the-loop only for irreversible actions, and preferring undoable actions with thorough logging. The key is to build agents whose failures cannot cause harm, not ones that never fail. Every part of this series has quietly agreed on one thing: the agent will be wrong sometimes. Part 1 https://nugalaxy.ai/blog/production-ready-ai-agent-define-the-bar set the bar at "acceptably wrong." Part 3 https://nugalaxy.ai/blog/ai-agent-reliability-non-determinism measured how often. So the last question is not how to stop it from ever failing. It is the one that actually decides whether you can ship: when it is wrong, what is the worst that can happen? That worst case is not fixed. It is a design choice, and it is the one most teams never make on purpose. Two agents give the same wrong answer. One drafted an email for a human to send. The other sent it. One suggested a refund. The other issued it. Identical mistake, completely different consequence, because someone decided how much power the agent had when it was wrong. You set the blast radius by choosing what the agent is allowed to do, not by hoping it does the right thing. Give an agent the least authority the job allows. Let it read before it writes, propose before it executes. An action more dangerous than the agent's measured reliability has earned is a liability you chose. If Part 3 told you a step is right eighty percent of the time, that step does not get to move money unsupervised. Capability should track trust, and trust is a number you now have. Human-in-the-loop is not "approve everything," which kills the speed that made an agent worth building. It is a gate on the small set of actions where a wrong one is irreversible or costly: the disqualifying failures you named in Part 1 the known abuse modes are catalogued in the OWASP LLM Top 10 https://owasp.org/www-project-top-10-for-large-language-model-applications/ . Everything reversible and cheap runs on its own. Everything that cannot be taken back waits for a person. Prefer actions you can undo, and log enough to undo them. A dry-run mode, a soft delete, a confirmation step: these turn an incident back into a mistake. And you cannot contain what you cannot see, so trace every action. A traced failure gets caught in minutes and becomes a new case in your eval set https://nugalaxy.ai/blog/ai-agent-evals-eval-set Part 2 . The loop closes: containment feeds the very thing that measures reliability. That is the whole series. Define the bar, build the eval set that measures it, treat reliability as a distribution, budget the cost, and contain the failures you cannot prevent. None of it makes an agent perfect. All of it makes an agent you can actually ship. You cannot build an agent that never fails. You can build one whose failures cannot hurt you.