Artificial Intelligence

AI Agent Took the Wrong Action? How to Set Up Human Approval

Talha Aslan 20 min read 5 views

Short answer

What should you do first when an AI agent takes the wrong action?

When an AI agent takes the wrong action, first stop the agent and suspend the access keys it uses. Then pull the action log, list what actually happened, reverse whatever you can reverse, and give affected people accurate information. The durable fix is to put irreversible actions behind human approval.

Keep reading for the full details and examples

If an AI agent you connected to your automation emailed the wrong person, deleted a record, or triggered a payment, stop the agent first and contain the damage second. The lasting fix is not a different model. It is sorting every action by risk and placing human approval where a mistake cannot be undone. This guide covers the first hour, a risk class table, and the approval setup, and you can build most of it with your own team.

The most common mistake under pressure is leaving the agent on while you look for the cause. Every minute it keeps running, it can repeat the same error on new records. So the order matters: stop first, then assess, then analyze the root cause.

The second mistake is blaming only the model. The model may have made a bad call, but your setup allowed that call to become a real email or a real deletion. In other words, the real question is this: why did the action go through without anyone seeing it?

Answer that honestly and the fix becomes clear. For example, if the agent deleted a record, somebody granted it the right to delete. Therefore the thing to repair is the permission and approval design.

What steps should you take in the first hour?

The sequence below helps you regain control without making things worse. Write down who did each step and when, because those notes feed the review later. Also put one person in charge, otherwise several people will try to repair the same record.

  1. Stop the agent and any scheduled jobs that trigger it. Closing the chat window is not enough.
  2. Temporarily disable the API keys and connected account permissions the agent uses.
  3. Export the action log and store it somewhere nobody can change it.
  4. List the affected items: which emails went out, which records changed, which payments started.
  5. Reverse what you can: restore from backup, move messages back to draft, open cancellation requests.
  6. Send a short, honest correction to anyone who received a wrong email.
  7. Tell your privacy lead or legal counsel if personal data reached the wrong recipient.
  8. Keep the agent off until you know the root cause.

On the payment side, cancellation and refund terms depend on your provider. So do not assume a time window; check the official support pages of your payment processor. The note about personal data is not legal advice. Confirm your notification duties with a qualified professional, because they vary by state and by country.

Why does an AI agent take the wrong action?

OWASP describes this problem in its risk list for large language model applications under the name Excessive Agency. According to that source, the harm comes from a system that can perform damaging actions in response to unexpected, ambiguous, or manipulated model output. It names three root causes:

  • Excessive functionality: the agent can reach tools the task does not require. For example, a read only helper that can also see a delete tool.
  • Excessive permissions: the connected account holds broader rights than the job calls for.
  • Excessive autonomy: high impact actions go ahead without independent verification.

The trigger itself is usually ordinary. The model matches the wrong customer name, fills a gap with a guess, or follows a hidden instruction inside a document it read. We explain the first case in our guide to AI hallucination and the second in our article on prompt injection attacks. We will not repeat them here, because this article is about the design that makes a trigger harmless.

What does human in the loop approval actually mean?

Human in the loop approval means the agent prepares an action, shows it to an authorized person, and waits. Nothing happens until that person accepts. The agent does the preparation, the human makes the decision, and the system carries it out.

Three conditions make this work. First, the system that performs the action must enforce the approval, not the agent itself. OWASP also recommends implementing authorization in downstream systems instead of relying on the model to decide. Even if the model claims it has approval, the system should refuse to act without a real approval record.

Second, the approver must understand what they are approving. Third, rejecting must be as easy as accepting. Otherwise the approval screen turns into a button people press without reading.

Not every action needs a human. An agent that asks at every step wears the team out, and soon nobody looks at the screen. The better approach is to sort actions by risk and put approval only where it counts. For the wider picture of safety controls, see our article on what AI guardrails are.

Which action belongs in which risk class?

In our projects we sort actions into four classes. One question decides the class: if this action turns out wrong, can you reverse it, and who feels the impact?

Risk classExample actionsApproval modelHow to reverse
1. ReadSearch records, pull a report, view a calendarNo approval, logging onlyNothing to reverse; narrow the access scope
2. DraftEmail draft, quote text, suggested tagA person reviews the draft and sends itDiscard the draft
3. Reversible writeAdd a note, change a status, open a taskAutomatic within limits, sampled review afterwardVersion history or restore the old value
4. Irreversible actionSend external email, delete a record, pay, refundHuman approval before every action; two people for high amountsNone or limited, which is why approval comes first

Fill in the table for your own tools. The same action can land in different classes at two companies. For example, deletion is reversible in a system with a trash folder, and class four in a system that erases permanently.

External email is a special case. It looks technically simple, but you cannot call it back once it leaves. So we always keep it in class four.

Do not be optimistic while classifying. If you are unsure, place the action one class higher, because extra approval slows you a little while missing approval can cost you a customer. Later you can lower the class based on data.

Do read and draft actions need approval?

Asking for approval on reads is usually pointless, but reading is not risk free. If the agent reads a record it should never see, it can carry that information into a later output. So for the read class you set scope limits instead of approval: the agent sees only the tables and folders the task requires.

The draft class is the safest starting point. The agent writes the email, prepares the quote, and suggests the record; a person takes the last step. You do not even need a separate approval screen here, because sending already belongs to the human.

We recommend running every new AI agent in draft mode first. For a few weeks, track how many drafts you send without changes. As that share rises, the numbers show you which actions can move up a class.

Draft mode has one trap. In some tools, creating a draft and sending a message sit inside the same permission. In that case the right you granted for drafting also carries the right to send. Review the permission screen with that in mind, specifically for email and calendar connections where permissions often arrive as a bundle.

How does approval work for reversible write actions?

Waiting for approval on every class three action wipes out the benefit of the agent. Instead, you combine three safeguards: limits, version history, and review after the fact.

  • Limits: you set a number for how many records the agent may change per hour or per run. Anything above it goes to approval.
  • Version history: the system keeps the old value of every change, so you can restore it in one step.
  • Sampled review: each day a person checks a few randomly chosen actions.

Bulk actions follow their own rule. A single record update is reversible, but the same update applied to thousands of records becomes irreversible in practice. Therefore treat bulk changes above a set count as class four.

Mapping this split process by process is the first thing we do in ai automation services projects: we write down which step flows automatically and which one waits for a person before any setup begins. You can build the same table in a spreadsheet. What matters is making the decision before anyone writes code.

Which approval model fits irreversible actions?

In class four the rule is plain: the agent prepares, a human approves, the system executes. OWASP explicitly recommends human approval for high impact actions. You can choose among three models here.

  • Single approval: one authorized person sees the action and accepts it. This is usually enough for an external email or a single record deletion.
  • Dual approval: two different people approve. Use it for payments, refunds, and bulk deletion.
  • Delayed execution: after approval, the action enters a short waiting period, and you can cancel during that time.

The right model depends on the size of the possible harm. An appointment reminder to one customer and a campaign email to your whole list are the same action type, but the impact differs enormously. So tie the approval rule to recipient count and amount, not only to the action type.

The approver should not be the person who built the AI agent. You tend to trust a flow you built yourself, and a different pair of eyes catches errors more easily. Try to keep that separation even in a small team. For instance, one person builds the flow and another handles approvals.

What should the approver see on the approval screen?

A window that says "The agent wants to perform an action, approve?" helps nobody. The approver needs concrete information to decide, specifically these six items.

  • The full content: the recipient, subject, and body of the email; the name of the record to delete; the amount and payee of the payment
  • The scope: how many records, how many people, which system
  • The reasoning: which request and which data led the agent to propose this
  • Reversal details: whether you can undo the action, and how
  • A diff: for record updates, the old and new values side by side
  • Options to reject or edit: the approver can change the text or decline with a reason

Approval fatigue is a real risk. On a screen that asks for hundreds of approvals a day, people start accepting without reading. To prevent that, keep the number of requests low, group similar actions, and visually separate the risky ones.

Approvals also need an expiry. If you approve in the evening something the agent prepared in the morning, the data may have changed. So let an unanswered request expire and cancel; it should never execute by default.

How do you apply least privilege to an AI agent?

Least privilege means the agent can reach only the tools and data its task requires. OWASP sums it up in two points: limit the tools you give the agent to the necessary ones, and keep the permissions those tools hold in other systems to the minimum.

  1. Create a separate user account for the AI agent. Do not connect your own admin account or an employee account.
  2. Grant that account only the permissions the task calls for. If it reads email, do not grant sending.
  3. Shorten the tool list. Every tool the agent never uses is one more option it can pick by mistake.
  4. Avoid open ended tools. Define narrow ones such as "read a file in this folder" instead of "run any command."
  5. Rotate access keys on a schedule and use a separate key for each integration.

When you need a strong, unique password for each integration, our password generator does the job. If you wonder how an agent talks to tools, our articles on function calling and the Model Context Protocol explain the technical side.

Scope is harder to limit for agents that operate a screen directly, because the agent sees everything you see. For that type, read our guide to computer use agents.

Can an agent go live without a test environment?

It should not. A test environment is a copy where the agent works without touching real customers, real money, or real records. As a result, a mistake there only teaches you something.

A good test environment includes a copy of real data with personal details stripped out, a mail setting that sends nothing externally, your payment provider's test mode, and the same tool definitions as production. Routing every email to one internal address instead of the real recipient is the simplest and most effective safeguard.

Run bad scenarios as well as good ones. For example: a request with missing information, two customers with the same name, a document with a hidden instruction, a request for an action the agent has no right to perform. You need to see whether the agent stops, asks, or guesses. For systematic stress testing, our article on AI red teaming shows the way.

Go live in stages too. Start with draft mode, then one user or a small group of records, and finally the full scope. Review the logs at each stage and move on only when they look clean. If you plan to run the agent on your own server, we covered the setup in our self-hosted AI agent guide.

What should the action log record?

Without a log you cannot know what happened, and you cannot fix what you cannot see. OWASP lists logging and monitoring as a measure that does not prevent the problem but helps you detect and limit the damage. Keep these fields for every agent action:

  • A timestamp and the run identifier
  • The trigger: which user, which form, which scheduled job
  • The input the agent received and the sources it read
  • The tool it called and the values it passed
  • The result the tool returned
  • The approval record: who approved or rejected what, and when
  • The value before the change

Store the log where the AI agent cannot write, because a trail it can edit proves nothing. Also limit the personal data that lands in the log; the recipient and subject usually suffice instead of the full email body.

Keeping a log is not enough, because somebody has to look at it. So set up simple alerts: more emails in an hour than expected, deletions in quick succession, a payment request outside business hours. Start with low thresholds and reduce the noise later.

How do you prepare a rollback plan?

A rollback plan is the written answer, for each action type, to "how do we put this back?" If you start looking for that answer during an incident, you are already late.

  1. First, list every system the agent can write to.
  2. Then write the reversal path for each: version history, trash folder, backup, cancellation request.
  3. Next, flag actions with no reversal path and move them to class four.
  4. Also match backup frequency to how often the agent runs.
  5. Finally, test a real restore at least once.

Prefer "mark as deleted" over permanent deletion. The AI agent then hides the record, and after a set period a human approves the permanent removal. As a result, deletion drops from class four to class three.

If you have no backup routine, build that first. Our website backup strategy guide covers sites and files, and our database backup and restore guide covers the data layer. A backup you never tested is not a plan. Also, if the agent changes many records during the day, a nightly backup falls short, so you need a structure that keeps change history.

How do you set limits and a kill switch?

A limit is a ceiling on how many actions the agent can perform in a given period. OWASP recommends rate limiting as a measure that reduces the number of undesirable actions and gives monitoring time to catch problems. So even when an error occurs, the harm stays inside the ceiling.

Define limits in several layers: actions per run, emails per hour, total payment amount per day, records changed at once. Base the numbers on your normal volume; for example, look at the daily average over recent months. A flow that normally sends twenty emails a day should not have a ceiling in the thousands.

Loop protection is also a limit. If the agent calls the same tool with the same values over and over, something is wrong, and the system should notice and cut the run. Put a ceiling on step count and spend as well.

A kill switch, in other words, is the mechanism that cuts everything in one move. It needs three properties: a non-technical person can use it, the agent cannot disable it, and it halts queued work as well as new work. The simplest version is suspending the agent's account and turning off the flow. First decide who presses it and when. Then try it once on a calm day, because you do not want your first attempt to happen during an incident.

What safeguards does an email sending agent need?

An email to the wrong person is the most common incident among readers who land on this page. Email is irreversible, and it also goes out under your brand name. So it deserves its own list.

  • Never let the AI agent type the recipient freely. Instead, the address should come from a verified field in the customer record.
  • Keep an allowlist of domains. At the start, the agent can send only to your own domain and addresses you approved.
  • Check attachments separately, because attaching another customer's invoice is worse than a wrong sentence.
  • Require approval for every bulk send.
  • Point the reply address to an inbox a human reads.

Using a separate sender address for the agent is also a good habit. Then, if something goes wrong, you close only that address and the team's mail keeps working. You can test the authentication records of the new address with our SPF, DKIM, and DMARC checker.

Phone automation carries a similar risk: the agent calls the wrong person or gives wrong information. We cover the safeguards specific to voice in our article on whether an AI voice agent can answer your business phone.

Post-incident review template

Once the incident is closed, write a short review. The goal is not to find someone to blame; it is to prevent a repeat. Filling in the headings below on a single page is enough.

  1. Summary: what happened, when you noticed, who noticed.
  2. Impact: how many records, how many people, which systems; the financial and reputational outcome.
  3. Timeline: the trigger, the agent's steps, the times of the stop and the rollback.
  4. Root cause: which function, permission, or autonomy was excessive; which control was missing.
  5. Why you did not catch it sooner: where an alert, a limit, or an approval should have stepped in.
  6. Fixes: an owner and a date for each.
  7. Risk table update: which action moved to which class.
  8. Restart condition: which tests the agent must pass before it runs again.

Do not settle for "the model made a mistake" as the root cause. The model will make mistakes; however, your question is why that mistake became an action. In most reviews the answer comes down to one of three things: an unnecessary tool, a permission that was too broad, or a missing approval step.

If you want a broader risk management structure, the NIST AI Risk Management Framework is a voluntary resource that helps you place your review inside a larger system.

What can you set up yourself, and where do you need help?

You do not need to be a developer for most of the safeguards in this guide. Building the risk table, creating a separate account for the agent, narrowing permissions, switching email to draft mode, and using the review template take an afternoon. Many common automation tools offer a way to pause a step for human approval; confirm it in the official documentation of your tool.

If you are still choosing a tool, our comparison of Zapier, Make, n8n, and Power Automate helps. For the general use of agents in marketing work, see our guide to AI agents for marketing.

Help usually becomes necessary at these points: enforcing the approval record inside the system that performs the action, rollback that spans several systems, integration with custom software, and tamper resistant log storage. Specifically, that work calls for knowledge of code, servers, and permission architecture. However, you should have the simple safeguards in place before you reach that stage, otherwise you build expensive infrastructure on top of a weak design.

If you hire outside help, ask these questions: which actions are irreversible, where is approval mandatory, where do the logs live, and who holds the kill switch? If you cannot get clear answers, then the setup is not ready. We describe the scope of custom agent work on our AI agent development page.

Does an approval step slow the team down?

Not if you set it up well. The slowness comes from approval in the wrong place, not from approval itself, because most actions never need a person. Read and draft actions never wait, and reversible actions flow within limits. In short, a person steps in only for decisions that truly matter.

There are a few practical ways to speed approvals up. First, send the notification to a channel the team already watches. Second, make the approval screen readable on a phone. Then group similar actions in one list. Name a backup approver, so one person's day off does not stop the whole flow.

Over time the approval data itself guides you. If you have not rejected a certain action type for months and a reversal path exists, you can lower it to class three. On the other hand, an action type you often correct points to a problem in the instructions or the data. Fix the source there instead of removing the approval.

Make these decisions from records instead of a feeling. "The agent works well now" is not sufficient grounds to widen its permissions. Simple measures such as rejection rate, correction rate, and incident count give you firmer ground.

Setup checklist

Before you turn the AI agent back on, tick the items below one by one. Each missing item is a door for the next incident, so do not skip any.

  • Every action type has a written place in one of the four risk classes
  • The agent has its own account with only the permissions it requires
  • Unused tools are off the list
  • Irreversible actions wait for human approval at the system level
  • The approval screen shows the full content and the impact of the action
  • Bad scenarios ran in the test environment
  • The log sits where the agent cannot change it, and alerts are on
  • Each write action has a written reversal path that you tested at least once
  • Hourly, daily, and per run limits exist
  • Everyone knows where the kill switch is and who owns it
  • The post-incident review template is ready

Review the list a few times a year and whenever you connect a new tool. The permissions of an AI agent widen quietly over time, so a regular check catches that drift. After staff changes, update the approver list too, because a former employee's approval right can stay open.

At Talha Aslan and team, we follow the same order when we set up business process automation with ai: the risk table first, then permissions, approval, and logging, and the agent itself last. If the point where you get stuck is custom integration or rollback architecture, getting help at that stage makes sense. The rest you can run yourself with this guide.

Frequently Asked Questions

Can I recall an email my AI agent sent to the wrong person?
In most cases, no. Once an external email reaches the recipient's inbox, it is outside your control. What you can do is stop the agent, list the sent messages from the log, and send a short, honest correction to each recipient. If the message contained personal data, inform your privacy lead or counsel. The lasting safeguard is requiring human approval before sending.
Does every agent action need human approval?
No. A setup that asks for approval at every step tires the team, and people start accepting without reading. Read and draft actions need no approval, and reversible writes can flow under limits with sampled review afterward. Require approval in advance only for irreversible actions such as external email, record deletion, payments, refunds, and bulk changes.
Can I restore a record the agent deleted?
It depends on the system. If it has a trash folder or version history, you restore the record from there; otherwise the only path is a backup. With an outdated backup you lose the changes in between. So prefer marking records as deleted over permanent deletion, leave the permanent step to a human, and test a restore at least once beforehand.
Will switching to a better model solve the problem?
Not on its own. A more capable model may make fewer mistakes, but no model is free of errors. The harm comes from a faulty output turning into a real action with nobody checking. Shortening the tool list, reducing permissions, and adding approval to irreversible actions lower the risk regardless of the model. Build the controls first, then evaluate models.
What exactly is a kill switch for an agent?
A kill switch is a mechanism that halts all agent activity in one move. The simplest version is suspending the agent's account and turning off the connected flow. A non-technical person should be able to use it, the agent must not be able to disable it, and it should stop queued work too. Decide who presses it, and try it once.
Can a small business set this up without developers?
Yes, for the most part. Building the risk table, creating a separate account for the agent, narrowing permissions, and switching email to draft mode require no technical expertise. Many common automation tools let you pause a step for approval; confirm it in their official documentation. Outside help usually matters for custom integration, rollback across several systems, and tamper resistant logging.
  • ai agent
  • human in the loop
  • human approval
  • ai agent safety
  • least privilege
  • audit log
  • automation risk
Share:
Talha Aslan

Google Partner digital marketing expert. Hands-on with SEO, Google Ads, web design and e-commerce projects since 2012; every post here comes from that experience.

Next project

Get a quote for your project.

Your brief goes straight to Talha Aslan and team: strategy led by Talha, delivery by an experienced team. We reply the same day and send the scope, timeline and price as a written quote within 1 business day.