An AI agent can make a mistake and still complete the action it was asked to take. It might update the wrong customer record, send a message before anyone notices, or finish the first few steps of a workflow and fail on the next one.
The useful question is not just, “Can I stop the agent?” It is, “If it has already changed something, what exactly can I put right—and how will I know what happened?”
There is no universal undo button for AI agents. Recovery depends on the action, the service where it happened, and what occurred afterward. The safest time to work that out is before the agent gets permission to change business data or affect someone outside your business.
Stopping an agent does not undo completed actions
Stopping an agent can prevent more work from happening. It does not necessarily reverse actions the agent has already completed in a connected service.
For example, suppose an agent updates a customer’s address in a business system, then sends an email to that customer. Stopping the agent after the email goes out might prevent the next step, but it will not automatically restore the old address or recall the email.
This distinction appears in product guidance, too. Visual Studio Code explains that stopping or steering an agent does not undo actions already completed. Its guidance concerns that product, but the broader planning lesson applies to any workflow: stopping ongoing work and recovering completed changes are separate problems.
Before connecting an agent to a service, list each action it can take. “Handle customer requests” is too broad. “Change a customer’s address,” “send a reply,” and “issue a refund” are more useful entries. Each action may have a different recovery path.
Three ways to recover from an unwanted action
People often use “undo” to mean several different things. For planning, separate recovery into three categories.
Restore the previous state. This means returning a record or file to an earlier version. For example, if an agent changes a customer’s phone number incorrectly, you might be able to replace it with the value that was there before.
Restoring is most straightforward when you know the previous value and nothing legitimate has changed since. If another employee has updated the record in the meantime, simply putting back an older version could erase their correct work.
Compensate with a new action. Some actions cannot be erased, but you can take another action to address their effects. If an agent creates an order by mistake, canceling the order may be a reasonable response. If it sends a message with incorrect information, you might send a correction.
This is not the same as making the original action disappear. The customer may already have read the message, or the order may already have started processing. A compensating action can reduce the harm without erasing what happened.
AWS describes this general approach for multi-step workflows: when a later step fails, a workflow may use compensating transactions to address earlier completed steps. That pattern requires planning; compensation is not automatic, and it can add complexity.
Accept that the action cannot truly be reversed. Some effects leave your systems as soon as they happen. A recipient may read a message. A payment or shipment may pass a point where cancellation is possible. A person may act on incorrect information.
For such actions, the recovery plan is about limiting further consequences: stop remaining steps, notify the right person, correct the record where possible, and decide whether someone should contact the affected party. Do not label an action “reversible” simply because you can edit a record afterward.
Make a recovery plan for each action
A practical recovery plan can fit in a simple table or checklist. For every action an agent can take, record:
- What can it change or trigger? Name the specific record, message, payment, order, or other outcome.
- Where does the action happen? Identify the connected service, not just the AI tool that initiated it.
- What evidence will show what happened? Decide what you need to check, such as the affected record, an activity history, a confirmation, or a copy of the outgoing message.
- What can put it right? Choose whether to restore the prior state, take a compensating action, or escalate because the effect cannot be undone.
- Who can do it? Name a person or role with access and authority to correct the issue.
- What would make automatic recovery unsafe? For example, has someone else since changed the record, or could cancellation create another problem?
This exercise turns “we can fix it later” into a testable plan. If you cannot identify the affected item, find evidence of the change, or name someone who can correct it, the action is not yet ready for unsupervised automation.
Consider the customer-record example. Before launch, decide how you would find the exact record the agent changed, what the old value was, and whether the business system keeps a history you can consult. Separately decide what to do if the agent has already sent a message. Restoring the address may be possible; recalling the message may not be. One workflow, two different recovery plans.
Plan for workflows that only partly finish
A multi-step task is not one indivisible action. It is a sequence of actions, and a failure in a later step does not necessarily cancel earlier ones.
Imagine an agent that updates a customer record, creates an order, and sends a confirmation. If the record and order are updated but the confirmation fails, the business may be left with a valid order and no message. If the confirmation succeeds but the order creation fails, the customer may have been told to expect something that does not exist.
For each step, decide what should happen if the next step does not complete. Should the workflow stop and alert a person? Should an earlier step be corrected? Is there a suitable compensating action, such as canceling an order? The right answer depends on the business process; an automatic cancellation is not always safer than asking someone to review the situation.
AWS’s saga guidance is one example of how designers handle longer workflows: they treat the work as separate transactions and plan possible compensating actions for failures. It is a technical pattern, not a feature that every AI agent provides. The useful idea for a small business is simpler: check the status of each consequential step instead of assuming the whole task either succeeded or failed.
A lightweight pre-launch recovery checklist
Before letting an agent act on real business data, walk through this checklist:
1. Map the actions. List every change or external action the workflow can make. 2. Classify recovery. Mark each one as restorable, compensatable, or not truly reversible. 3. Decide what evidence to keep. At minimum, make sure you can identify what was changed and which item was affected. Depending on the workflow, that may include the before-and-after values, time, service, action status, and a reference to the affected record. 4. Test the recovery path. Use a test environment or a low-risk example where possible. Check that the proposed restore or compensation works, and verify the resulting state rather than assuming it worked. 5. Set a human handoff. Name who should handle unclear, high-impact, or potentially irreversible cases, and how the workflow should alert them. 6. Review access and retention. Keep only the records needed to investigate and recover, and make sure they are available to the people responsible for recovery.
A product’s own rewind feature may help, but its boundaries matter. GitHub’s Copilot CLI documentation, for example, describes options for rewinding conversation history and, when available, files changed during a session. File restoration has prerequisites and exceptions, and GitHub advises checking the repository state after rollback. That is a product-specific capability—not evidence that an agent can rewind changes in a customer platform, email service, or payment system.
Treat recovery as part of the permission
A recovery plan does not make every action safe. Restoring an earlier value can overwrite legitimate work; canceling an order may not undo what a customer has already experienced; and a product’s rewind tool may cover only a narrow part of a workflow.
The decision to give an agent permission should therefore include a second question: if this action goes wrong, can the business detect it, correct it, and handle any consequences? If the answer is uncertain, narrow the agent’s permissions, add a review step, or keep the action manual until the recovery path is clear.
The goal is not to promise that every mistake can be undone. It is to know, before the agent acts, what can be restored, what needs a compensating action, and where a person must take over.



