Glossary · Agents & tools
Compensating Action
A deliberate operation that semantically counteracts a completed side effect when the original operation cannot be rolled back atomically.
Why it matters
Multi-step agent workflows cross databases and external services where a later failure cannot undo earlier writes through one transaction.
In practice
If a booking workflow charges a card but the reservation fails, issue a tracked refund and preserve both events rather than deleting history.
Common confusion
Compensation is a new business action, not time travel. It can fail and therefore needs idempotency, monitoring, and escalation.
Related terms
Sources
Browse the learning paths to see this term in context — every lesson is free to read.