Fault-Tolerant Agent Pipelines: Checkpoint, Retry, and Compensate Fault-tolerant agent pipelines using checkpointing, idempotent retries, exponential backoff with jitter, and the Saga pattern can reduce wasted API spend from $95/day to $5/day for a 20-step research agent with a 10% step-level failure rate. The patterns, derived from distributed systems engineering, prevent full workflow restarts on failure and enable clean rollback in multi-step workflows. Member-only story Fault-Tolerant Agent Pipelines: Checkpoint, Retry, and Compensate An autonomous agent that runs for 20 minutes without any fault-tolerance mechanism is a production incident waiting to happen. The agent calls an external API, the API returns a 503 at step 4 of 7, and the entire workflow restarts from scratch. You burn compute, you potentially duplicate side effects, and you have no visibility into what actually happened. The patterns that fix this aren’t new — they come straight out of distributed systems engineering: checkpointing for resumability, idempotency for safe retries, exponential backoff with jitter for rate-limit-friendly retries, and the Saga pattern Garcia-Molina & Salem, 1987 for multi-step workflows that need clean rollback. This article builds each one from scratch in Python and wires them into a SagaRunner that handles all five failure modes you'll hit in production. The motivation goes deeper than uptime. Without fault tolerance, every agent failure requires a full restart. For a 20-step research agent where each LLM call costs $0.05, a failure at step 19 without checkpointing costs you $0.95 in wasted compute. With checkpointing, the same failure costs a single retry of step 19 — roughly $0.05. At 1,000 agent runs per day with a 10% step-level failure rate, that’s the difference between $95/day and $5/day in wasted API spend, and the gap widens linearly with pipeline length.