Compensating Transactions for Production LLM Agents in October 2026: Saga Patterns That Undo Side Effects When a Later Tool Call Fails
Multi-step LLM agents do not just answer questions. They book flights, create tickets, charge cards, send emails, and write to databases. When step three fails after steps one and two already succeeded, you cannot roll everything back with a single database transaction. The tools live in different systems, each with its own API and its own idea of "done." This post covers how to design compensating transactions—saga-style undo steps—so a failed mid-run does not leave half-applied side effects in production. Image: mikemacmarketing / photo on flickr via Wikimedia Commons (CC BY 2.0) Image: Tafol via Wikimedia Commons (CC BY-SA 4.0) Why ACID does not save you In a monolith you wrap related writes in one transaction and either commit or roll back. Agent tool calls break that model: A refund API and a CRM note are different services with different latency and failure modes. Some actions are irreversible by design (sending an email, posting a public me...