$ fssg build --deterministic --validate |

How to Classify AI Agent Actions by Reversibility

Logs

I do not begin an agent design by asking how autonomous the agent should be.

I begin with a less exciting question: which actions can actually be undone?

The answer changes everything. It changes whether a retry is safe, whether approval can be delayed, which evidence must exist before execution, and whether “rollback” is an honest word at all.

AI systems often describe tools as read or write, safe or dangerous. That division is too coarse. Deleting a generated cache and sending a customer message are both writes. One is replaceable. The other enters somebody else’s history. Restoring a database snapshot can restore rows; it cannot make a recipient unread an email.

My rule is simple:

Authority should shrink as reversibility decreases.

This is not a measured benchmark. It is an engineering position and a review artifact: a reversibility map that must exist before an agent receives a capability.

“We can roll it back” is often fiction

Rollback is precise only when the system can restore the relevant state.

A Git revert creates a new change that counteracts an earlier change. It does not erase the old commit from history. A compensating transaction may restore a business invariant, but it does not rewind every service, notification, cache, or human decision touched by the original operation. A refund compensates for a charge; it does not make the charge never happen.

That difference matters because agents are good at converting a vague recovery instruction into a confident sequence of actions. If the system labels every recovery path rollback, the agent may treat compensation as restoration and restoration as erasure.

I want three verbs to remain separate:

  • replay — execute again under the same operation identity;
  • restore — return controlled state to a known version;
  • compensate — perform a new action that reduces or offsets the consequence.

Only the second is rollback in the strict sense. The third creates more history and can fail independently.

This extends my preference for recoverable agents over merely autonomous ones, but it asks a narrower question. Recoverability says execution must survive interruption. A reversibility map says which consequences recovery can and cannot remove.

Four classes of action

I use four practical classes. They are not a universal standard; they are a design-review vocabulary.

Class Meaning Examples Default authority
R0 — replayable no durable external mutation search, read, deterministic analysis automatic within scope
R1 — replaceable state can be restored from a named version generated file, versioned configuration, draft artifact automatic with checkpoint and validation
R2 — compensatable consequence cannot be erased, but a defined counter-action exists ticket creation, reversible deployment, reservation gated; compensation must be prepared
R3 — irreversible no reliable technical action can restore the prior reality public message, credential disclosure, destructive external command fresh explicit approval or prohibition

The class belongs to the effect, not the tool name.

An HTTP client can perform R0 reads and R3 disclosures. A shell can run a harmless formatter or destroy an unversioned directory. A database tool can query, update a versioned row, or trigger an external workflow. Tool-level labels are useful, but authority must attach to the concrete operation, target, and payload.

Classification is also contextual. Publishing a draft to an internal preview may be R1. Publishing the same text to a public feed is R3 because copies, notifications, and search indexes can outlive deletion. Changing a feature flag may be R1 when both code paths are healthy and R2 when the old path has already been removed.

The map must therefore be evaluated against current system state, not copied forever from a tool registry.

The point-of-no-return record

Before an agent crosses from proposal into effect, I want a small record:

operation: publish-article
target: public-site
artifact_hash: sha256:...
reversibility: R3
point_of_no_return: external_publish
preconditions:
  - localized_pages_built
  - links_validated
  - approval_matches_artifact_hash
recovery:
  restore: source-and-site-version
  compensate: publish-correction
  cannot_restore:
    - notifications_already_delivered
    - third_party_copies
required_evidence:
  - build_receipt
  - rendered_preview
  - approval_receipt

The most important field is cannot_restore.

Engineering artifacts usually describe the happy path and the available recovery commands. I also want the permanent residue named before execution. That one field prevents “reversible” from becoming a mood.

This record complements change sets. A change set makes intended mutation finite. The reversibility record describes the consequence if that exact mutation succeeds. One answers what will change? The other answers what cannot be made untrue afterward?

Approval belongs at the last reversible boundary

Human approval is often placed at the beginning of a workflow. The operator approves a goal, then the agent performs research, transformation, selection, and execution under one broad consent.

I prefer approval at the last reversible boundary.

Let the agent do R0 research. Let it prepare an R1 draft, run checks, and render a preview. Let deterministic policy reject forbidden paths or missing evidence. Then, immediately before the R2 or R3 effect, present the exact artifact, destination, residual consequence, and recovery limits.

This produces a different approval question.

Not:

May the agent complete the release?

But:

May artifact sha256:... be published to production,
knowing that delivered notifications cannot be recalled?

That approval is narrower and more useful. It also expires if the artifact changes. The same principle appears in executable authorization: permission must bind to the thing that will execute, not to conversational intent.

For R2 operations, approval should also bind to the compensation plan. A plan that says “undo if needed” is not enough. The compensating command, required credentials, timeout, owner, and validation signal should already exist. Temporal’s documentation treats Saga compensation as a sequence of explicit counter-actions because distributed work cannot generally be rolled back as one database transaction. That is the honest model: compensation is engineered forward, not wished backward.

Retries must not cross classes silently

A retry can change the reversibility class.

Repeating a read remains R0. Rebuilding a file from the same source may remain R1. Repeating a timeout-prone external write can create a second ticket, payment, or message and therefore enlarge an R2 or R3 consequence.

That is why stable effect identity matters. An attempt needs its own identity for diagnosis, but the intended external effect needs one stable identity across attempts. When delivery is ambiguous, the runtime should reconcile the existing effect instead of creating a new one.

My default matrix is intentionally conservative:

R0 -> retry within budget
R1 -> restore checkpoint, then recompute and validate
R2 -> reconcile receipt; compensate only through declared path
R3 -> never retry from ambiguity; require evidence or escalation

The model should not choose a more permissive cell because the deadline is close. This belongs in the execution layer.

Reversibility has a half-life

An action can become harder to reverse with time.

A deployment may be easy to revert before a database migration, harder after new-format writes begin, and compensatable only after external consumers observe the new data. A draft may be replaceable before publication and effectively permanent after syndication. A temporary permission may be safe before credentials spread into downstream systems and unsafe afterward.

So a reversibility map needs a transition trigger:

R1 until migration starts
R2 after first new-format write
R3 after external export

This is the part I find most useful. Risk is not only a property of an action; it is a property of an action at a particular point in its lifecycle. A runtime that knows the transition can move approval and checkpoint creation to the correct boundary.

It can also refuse a stale plan. If the workflow believed an operation was R1 but current state has moved it to R2, the original authority is no longer valid.

The limitation is classification itself

A reversibility map can be wrong.

A backup may be corrupt. A compensation API may be unavailable. A “private” output may be copied. A supposedly idempotent endpoint may implement its key incorrectly. Human consequences are especially difficult to encode.

The map therefore does not prove safety. It makes a claim that can be reviewed and tested. R1 needs restore drills, not merely backup existence. R2 needs compensation tests and explicit residual effects. R3 needs prevention, minimal capability, and precise approval—not confidence in cleanup.

I would rather preserve that uncertainty than hide it behind a green rollback_available flag.

I want agents that know when history begins

AI agents are strongest before the point of no return. They can explore, compare, draft, test, simulate, and compress a large decision surface. I want to use that strength fully.

But the moment a proposal enters shared reality, the engineering problem changes. The question is no longer only whether the action is correct. It is how much history the action creates and whether that history can be repaired.

So I do not grant autonomy as one setting. I grant it by reversibility class.

The agent may move quickly through replayable work. It may transform replaceable artifacts under checkpoints. It may approach compensatable effects only with a prepared counter-action. It may cross an irreversible boundary only with authority bound to the exact consequence.

A capable agent should know many ways forward.

A trustworthy runtime must know which ways back are real.

Sources and scope

This article proposes a review model; it does not report measured reliability or production performance. The four classes are contextual, and every claimed restore or compensation path still requires testing against the actual system.

For the complementary part of this workflow, see Compensation Receipts for AI Agent Recovery.

FACET AI CLI Terminal
facet@ai:~$