Rollback has a precise meaning only when the system can reverse the original change. Sending an email, notifying a client or submitting an external payment cannot be erased by restoring a database row. Agent workflows need an inventory of reversible changes and compensating actions before they are allowed to operate autonomously.
The contract to define first
Model each action with its commit point, observable outcome and compensation owner. A compensation is a new action with its own permission checks and possible failure, not proof the original never occurred. Persist a timeline so users and support can understand which steps completed. Avoid promises of atomic behavior across systems that do not share a transaction.
A worked scenario
In a proposed booking change, the database update succeeds and the notification fails. The system may retry the notification, compensate the booking, or leave an exception for an operator. The right choice depends on the business contract and must be decided before implementation.
An implementation and review sequence
- Mark the commit point of every side effect
- Define compensation and its accountable owner
- Test partial completion across dependency boundaries
Failure cases worth testing
| Condition or input | Expected behavior |
|---|---|
| Database write succeeds but notification fails | Expose the chosen recovery state |
| Compensation is denied | Escalate without hiding the original action |
| User repeats a recovery request | Do not compensate twice |
Download the illustrative acceptance checklist (JSON)
Tradeoffs and limits
Compensation can itself confuse users if the original action was visible. Sometimes the best recovery is an explicit correction and human follow-up rather than an automatic chain of reversals.
Use the result to make a decision
The practical output is straightforward: map committed external actions to explicit compensating operations. Keep the assumptions with the artifact so a product owner, implementer or prospective partner can review the same decision. A useful handoff states the supported scope, the evidence collected and the remaining dependency instead of treating a successful demonstration as proof of every operating condition.
Continue with related implementation detail
Related guide: Human approval for AI agents: approve the action that will run
LLM structured output validation
References and current platform requirements
MCP specification and tool contracts
Google Cloud: AI security and safety for MCP
Platform capabilities, programme terms and access conditions can change. Check the linked primary references against the version and account you actually use; the patterns above do not establish a provider approval, certification or universal compatibility guarantee.
Discuss the workflow
Bring one workflow, its systems, and the actions requiring human approval.
Explore the relevant AptixLabs service
Can every agent action be rolled back?
Rollback has a precise meaning only when the system can reverse the original change. Compensation can itself confuse users if the original action was visible.
Which failure cases should be included in the review?
Include these explicit cases: Database write succeeds but notification fails: expose the chosen recovery state; Compensation is denied: escalate without hiding the original action; User repeats a recovery request: do not compensate twice.
