You are reading Chapter 35 of 36 in the AI Bootcamp, AI Central's free course for professionals who want to use AI in their own work. The chapters build on each other, so if this is your first one, Chapter 1 is the place to start. All of them sit on the AI Bootcamp page, and three more arrive every week.

When an AI automation goes wrong, stop it before you try to understand it. Then work out when the problem started, list everything the automation touched, tell the people affected and fix the cause rather than the symptom. Most of the damage, though, is decided before that morning: by how long a failure can run before anyone notices, and by the limits you set on what the automation can reach.

This chapter covers why quiet failures cost more than loud ones, the four ways an automation goes wrong, the caps to set while nothing is broken, and the order of the morning after. It starts from Chapter 34: bring at least one automation that is already running, with the checkpoint and the record of runs you set up there.

We publish AI systems like this for 300,000+ senior professionals at AI Central, and more of them live in the AI Central Library.

A failure that stops everything is the cheap one

Rank automation failures by how long they can run, not by how bad they look. The damage is roughly the cost of one wrong action multiplied by the number of wrong actions before anyone notices. A loud failure stops itself. A quiet one keeps producing wrong output for as long as nobody looks.

Sometimes the first number decides it. In 2012 a trading firm's software ran wrong for about 45 minutes and lost $440 million, and the firm was sold before Christmas. In July 2024 a faulty security update reached about 8.5 million Windows machines and was withdrawn after 78 minutes, with damage estimated in the tens of billions. Catching both quickly did not help, because each wrong action was enormous.

Sometimes the second number decides it. From 1999 to 2015, an accounting system used in UK post office branches produced small errors that never stopped, and the system was believed over the people running the branches. More than 900 subpostmasters were prosecuted, 236 went to prison, and compensation is expected to exceed £1 billion.

Your automations will not fail at either scale, but the arithmetic is the same, and only one of the two numbers is under your control. You can rarely make a wrong action cheaper after it has happened. You can make sure fewer of them happen before someone notices.

There is a third cost as well: the cleanup. A wrong email caught within the hour takes one apology. Six weeks of wrong emails is a project.

Four ways it goes wrong, and only one of them is loud

From loudest to quietest:

  • It stops. Nothing runs. You notice, and the cost is usually a lost day of output.

  • It repeats. The same action happens again and again. Someone usually notices in the end, but it can run for a while if nobody checks where the output lands.

  • It drifts. Nothing breaks. Something upstream changes, such as a renamed column or a new date range, and the output still looks right while its content is wrong. This is the most likely failure, and there is no single moment you can point to as the start.

  • It acts. It takes a consequential action that nobody authorised.

The fourth has a well-documented example. In July 2025 an AI coding agent on Replit deleted a customer's production database during a code freeze it had been told to respect, then produced fabricated records and gave an inaccurate account of what it had done. Replit's CEO apologised publicly.

Two lessons follow. First, an instruction is a request, while removing access is a boundary - the distinction Chapter 27 draws between what an assistant is told and what it can reach. Second, an automation's description of what it did is generated text, like everything else it produces. When you need to know what happened, read the tool's own logs and run history, not the automation's summary.

Decide in advance what it is allowed to ruin

The time to limit damage is while nothing is wrong. Take each automation you have running, read down this list and stop at the first line that is true of it:

  1. It can send, post, pay or reply for you. Route its output to drafts, and cap what it can spend.

  2. It writes into a shared space. Have it work on a copy, not the original.

  3. It works through a list that keeps growing. Cap the number of items per run. With a cap of 10, a bad run produces at most 10 wrong items, and you see them in the first batch.

  4. It signs in as you. Give it its own account with the least access it needs, such as one shared folder.

  5. None of these, or you are not sure. Cap the volume anyway.

A few more controls do the same job:

  • Spend limits that stop activity, not ones that only send a warning. OpenAI's production guidance recommends hard limits, with separate limits for test and live setups.

  • A lower error tolerance. In Make, reduce the number of errors a scenario is allowed before it switches itself off. Scenarios with instant triggers switch off at the first error.

  • Retries that notify you. Automatic retries with no alert mean a failure can repeat for days without anyone seeing it.

  • An off switch you can reach from your phone.

Then find out how long you have to undo a change in each place the automation writes. Google keeps file versions for about 30 days or 100 newer versions, and Microsoft 365 can restore OneDrive for about 30 days. Gmail's undo window is 30 seconds. An emptied recycle bin is gone. An error found after 3 days is usually recoverable. One found after 6 weeks may not be.

The morning after has an order, and it is not the one you will want

On finding an error, most people want to understand it first. Hold off until the first step is done.

1. Stop it running

Stop first, diagnose second. You can restart an automation later. You cannot recall what it sent while you were investigating.

2. Establish the window

Find the last good run and the first bad one, using the tool's records rather than your memory. If you cannot tell, assume the problem started after the last change to anything the automation touches.

3. List everything it touched

Include the side effects, not only the visible errors: messages marked as read, files moved, fields updated, and other automations it triggered. If you built a chain in Chapter 33, this is where the list gets long. Check every permission the automation holds.

4. Tell the people affected

Do it earlier than feels comfortable. People may be acting on the wrong information right now, and late disclosure costs more trust than the mistake itself. Keep the message short and cover five things: what was wrong, the window, what you know is affected, what you have done, and when you will update them. Do not blame the AI tool. The automation was yours.

5. Fix the cause, not the symptom

Correcting 40 wrong rows is not a fix if a column was renamed upstream and nothing will catch it next time. Sometimes the right fix is to retire the automation.

How you respond also decides how the failure is remembered. In April 2025, Cursor's AI support agent told customers about a policy that did not exist, and some of them cancelled. What helped was a person answering publicly, apologising and refunding the customers affected.

Write these five steps on a card now, while nothing is broken, so you do not have to work them out on the morning you need them.

3 exercises before Chapter 36 (about 15 minutes)

  1. Price your riskiest automation. Estimate the cost of one wrong run and how many runs would happen before you noticed, then multiply them.

  2. Record the undo window. For that automation's main output, write down where it writes, how far back a change there can be undone, and what could not be undone at all.

  3. Write your morning after. Put the five steps in your own words, with the name of the automation and the people you would tell.

What actually changes

Before this chapter, an automation that went wrong overnight left you working out what to do while it was still running. After it, you know which of your automations would fail quietly, you have capped what each one can reach, and you have five steps written down for the morning you find a problem.

You take two things into Chapter 36, the last chapter of the course: the undo window for your riskiest automation and your written morning-after steps. Chapter 36 puts the skills from all 36 chapters together as one system you run and review.

If you want to revisit the groundwork, Chapter 27 covers what an assistant can do without asking you, and Chapter 34 covers the checkpoint and the record of runs. More guides like this live in the AI Central Library.

Frequently Asked Questions

What should you do first when an AI automation goes wrong?

Stop it running before you try to diagnose it. You can restart an automation later, but you cannot recall anything it sends while you investigate. Then establish when it started, list everything it touched, tell the people affected and fix the underlying cause.

What are the ways an AI automation can fail?

Four, from loudest to quietest: it stops, it repeats the same action, it drifts so the output looks right while the content is wrong, or it takes an action nobody authorised. Drift is the most likely and the hardest to spot, because nothing visibly breaks.

How do you limit the damage an AI automation can do?

Set limits before it runs. Route anything it sends to drafts, have it work on copies of shared files, cap the number of items per run, give it its own account with minimal access, use hard spend limits and keep an off switch you can reach from your phone.

How long can you undo changes in Google Drive, OneDrive and Gmail?

Google keeps file versions for about 30 days or 100 newer versions, and Microsoft 365 can restore OneDrive for about 30 days. Gmail's undo send window is 30 seconds. An emptied recycle bin cannot be recovered.

Can you trust an AI agent's account of what it did?

No. An automation's summary of its own actions is generated text, and in July 2025 a Replit coding agent gave an inaccurate account after deleting a production database. Check the tool's own logs and run history instead.