When an AI agent breaks something – say, wipes a production database – its own log is the last place you'll find the truth. Picture an agent with access to the staging database, a shell and an outbound email tool. It reports a clean run. The next morning a production table is empty, and the agent's log calmly describes a routine cleanup of test data.
Whether you can explain and undo that kind of incident comes down to three things: an independent record, a reviewer that actually blocks things, and checkpoints of the whole machine.
All three have to exist before launch. So the last section is a pre-deployment checklist you can run against your own agent before it touches anything important.
Why an AI agent's own logs can't explain the incident
The first move after an incident is to open the logs. With an agent, that move has a hidden flaw: the process that decided, acted and then wrote the report is a single system. In other words, the record of what went wrong was produced by the thing that went wrong.
Think of it as asking the suspect to write the police report. An agent that is confused, or has been hijacked, doesn't leave a broken, suspicious trail. It leaves a tidy one.
A well-formatted description of a bad decision is more dangerous than having no logs at all, because a gap in the record makes you dig. A neat one makes you stop.
The usual instinct is to add a verification step. But a second check only helps if it looks at the real system. If your CI pipeline (the automated checks that run on every change) re-runs a check that simply reads what the agent reported, you have the same trust problem with an extra box in the diagram.
Verification has to reach ground truth on its own: query the table, count the rows, confirm the record exists.
A green dashboard is not evidence
“Success” only means the agent believes it succeeded. Treat the agent's self-report as a claim to be checked, never as the source of truth for an investigation.
So assume the agent will eventually be wrong, and ask three practical questions. How will you find out what really happened? What stops a bad action before it runs? And how fast can you put things back?

Build a tamper-evident audit log outside the agent
You can't build a log that proves the truth. Any checker can itself be wrong, and stacking verifiers on verifiers never reaches solid ground. The achievable goal is more modest and more useful: a record that proves who claimed what, and when, in a form nobody can quietly rewrite later.
That changes how tampering looks. In a record you can't silently edit, a lie doesn't produce a clean result – it produces a hole. Instead of asking “is this true?”, you ask “is the sequence intact?” That question has a structural answer.
Here's what goes into such a record:
Separate writers. Log the proposal, the approval and the execution as three distinct events from three different parties, linked by the action in question. Whoever proposes an action should never sign off on it.
Sealed entries. Chain each entry to the ones before it with hashes and sign it at write time. Editing or reordering past entries then leaves visible evidence.
Storage the agent can't touch. The record lives in the infrastructure or supervisor layer around the agent, not in its own output.
The agent's beliefs. Before the action runs, record which environment the agent thinks it's in and which target it thinks it's acting on. When an agent wipes the wrong database, its action often made sense given what it believed. The belief is what explains the incident.
With separate writers, a skipped review becomes obvious. You see a sign-off that has no proposal to match it, or a gap in the chain where a step was removed.
But be clear about the limits. A sealed, multi-party record doesn't stop a bad action and doesn't prove the action was a good idea. Its guarantee is legibility, not prevention: things can still go wrong, just not silently.

A reviewer you have watched say no
For consequential actions, a second check before execution adds real protection. It can be a validation step, a separate judge agent that reviews the proposed action, or a human. Having to get past an independent check makes an agent far harder to steer into a bad outcome.
The catch: a reviewer that approves everything isn't a control. It produces a reassuring log entry and stops nothing.
You only know a reviewer works once you've seen it refuse. Before relying on it, hand it an action you know must be rejected and make sure it actually stops it.
Then make that test permanent. Run a deliberately failing probe on a schedule and have it emit a receipt like any other health check. “The reviewer can say no” becomes a property you re-prove every day, not a memory of one afternoon of testing.
Human approval has its own failure mode. If you gate every action, people learn to click approve without reading, and the approval step turns into “theater.”
So reserve human approval for actions that are irreversible or expensive – sending, spending, deleting, exporting, deploying. And make each request reviewable: show what the action affects, what it costs and what it will change, so the approver has something concrete enough to reject.
When did your reviewer last refuse?
If you can't point to a recent, recorded refusal of a known-bad action, you don't yet know whether your reviewer protects anything.

AI agent rollback: checkpoints for the whole machine
The record tells you what happened. Rollback lets you undo it. Managed agent sandboxes now make this possible for an entire machine, files and running processes alike.
DigitalOcean's Managed Agents, for example, runs each agent session in its own microVM, a small isolated virtual machine. You can checkpoint the whole machine, fork it into independent copies and roll it back (as of October 2026). A fork here is not a disk snapshot you boot later. It's a copy of a running machine, live processes included.
Managed Agents Architecture – DigitalOcean Docs – per-session microVM sandboxes with checkpoint, fork and rollback
In one hands-on test, the web server was killed and the app directory deleted to simulate an agent having a bad afternoon. After rolling back to the checkpoint, the files were back – and so was the killed process, restored from the checkpoint's memory rather than restarted.
The timings from that test (October 2026, public preview) give a sense of what to plan around:
| Operation | Time in one test |
|---|---|
| Create a checkpoint of a running session | about 25 seconds |
| Fork a checkpoint into three copies | 15.3 seconds |
| Roll back to a checkpoint | 5.6 seconds |
These numbers come from a single experiment on a preview service and will change. The shape is still worth noting: undoing is fast, while checkpointing is the slow step you schedule deliberately.
Re-running the prompt when something breaks won't help, because a rerun doesn't recover the state you had. The same prompt can produce a different result at an unpredictable cost. A fork or rollback gives you back exactly the state you were working with.
There are two traps to know about. First, a checkpoint is owned by the session where it was made: a fork inherits its parent's state but not its checkpoint history. So checkpoint the fork itself before risky work inside it. Second, after cleanup scripts, list your running sessions to confirm they actually ended instead of assuming the script got that far.
Checkpoint before the risky step
Take a checkpoint immediately before any destructive or uncertain action. A bad step then costs seconds of rollback instead of the whole session.
Keep in mind what a machine rollback can and can't reach. It restores the sandbox, so it's safest to assume it won't reach anything outside it, like an email that already went out or a call already made to an external API. Those actions still need the approval gate.

Make mistakes small before you need to undo them
Rollback is the last line. The good news is that a few defaults make it rarely needed.
Least privilege first. Many catastrophic agent stories, traced back, start with a permissions decision someone made without noticing. An agent with no route to production has no way to destroy production, however confused it gets. Ask what the minimum is that the agent needs for this task, and grant only that.
Prefer reversible actions. Soft deletes instead of hard ones, staged rollouts instead of all-at-once changes, drafts instead of sends. A mistake you can revert with a click is a very different event from losing an entire database.
Monitor effects, not reports. A dashboard that asks “did the agent report success?” is a dashboard that trusts the witness. Look at the world instead: do the invariants hold, do the totals still add up, does the record you expect really exist? These checks are more work than watching for a 200 status. But they're the only ones that catch a perfect-looking report with the wrong result behind it.
Key terms
- Tamper-evident log – A record built so that any later edit, deletion or reordering leaves a visible gap rather than a silent change.
- Hash chain – A sequence of log entries where each entry is cryptographically bound to the ones before it, so altering one breaks the chain.
- microVM – A lightweight virtual machine that isolates a single agent session and can be checkpointed as a whole.
- Checkpoint – A saved snapshot of a running machine, including its files and live processes, that a session can roll back to.
- Fork (of an agent session) – An independent copy of a running machine created from a checkpoint, continuing from that exact moment.
- Blast radius – The scope of what an action can affect or damage if it goes wrong.
Pre-deployment checklist for AI agent guardrails
Run through this before your agent gets access to anything that matters:
Permissions are the minimum for the task.
The agent has no route to production unless the task truly requires it.
Proposal, approval and execution are logged by separate parties, outside the agent, in sealed, hash-chained entries that nobody can quietly edit.
The record captures what the agent believed before acting: environment, identity and target.
Irreversible actions pause for approval, with impact shown clearly enough to reject.
The reviewer has refused a known-bad action, and a scheduled probe keeps proving it.
Monitoring checks real system state, and CI verifies ground truth on its own instead of trusting whatever the agent reported.
Every risky step gets a checkpoint first.
After cleanup, you check which sessions are still running, because a script can stop before it gets that far.
Summary
An agent with real access will eventually do the wrong thing. Its own log will call that a success. Recovery depends on what you build beforehand: a tamper-evident record outside the agent, a reviewer you've seen refuse, and checkpoints of the whole machine. So start with least privilege and a checkpoint before risky steps, then add the independent record and a scheduled refusal test.
Check yourself
1. After an incident, the agent's own log shows a clean, successful run against the expected target. What is the right conclusion?
- A. The log proves nothing on its own, because it was written by the system under suspicion; check the real system state and an independent record.
- B. Re-run the agent's verification step in CI using the agent's reported output.
- C. The incident probably came from somewhere else, since the log is clean.
Show answer
Answer: A. A confused or compromised agent produces a clean log of a bad decision, so its self-report cannot clear it.
2. Your team adds a judge agent that reviews every consequential action. Which step turns it into a real control?
- A. Using a larger model for the judge than for the agent.
- B. Logging every approval the judge gives.
- C. Feeding it a deliberately bad action and confirming it blocks it, then running that probe on a schedule.
Show answer
Answer: C. A reviewer that has never been seen refusing may approve everything; a recurring failing probe proves it can say no.
3. What does a hash-chained, multi-party audit log guarantee? (Select all that apply.)
- A. That edits, deletions or bypasses leave a visible gap or mismatch.
- B. That every recorded action was correct.
- C. That bad actions cannot be executed.
- D. That an approval without a matching proposal becomes visible.
Show answer
Answer: A, D. A – Sealing makes tampering evident; it shows who claimed what and when, not whether the claim was true. D – Separate writers for proposal, approval and execution make a missing link a structural fact.
4. An agent got a repository into a good state after an hour of work, and you want to try two risky changes. What is the best approach?
- A. Save the prompt and re-run it later if something breaks.
- B. Checkpoint the session, then fork it and try each change in its own fork.
- C. Make both changes in sequence and rely on git for the code files.
Show answer
Answer: B. A fork restores exactly the state you had; a rerun produces a different result at unpredictable cost.
5. You forked a session and now want to roll the fork back to the checkpoint it was created from. What happens?
- A. It rolls back the parent session instead.
- B. It fails, because checkpoints belong to the session that created them; checkpoint the fork first if you want undo inside it.
- C. It works, because the fork inherits the parent's checkpoints.
Show answer
Answer: B. A fork inherits the parent's state but not its checkpoint history.






