@artem78983
Artem AlimpievDeveloper▲10
Python Backend Engineer |, Independent
30m ago · Agents, AI Engineering, Testing and Evals · Montevideo

An AI agent sends an email, then crashes. Would you retry?

I've been working on failure recovery in my open-source AI Agents Platform.
In one reproducible demo, I deliberately crashed a worker immediately after an external service saved a support ticket, but before the worker recorded completion.

After recovery:

  • The operation was attempted twice.
  • The receiving service returned the original receipt on retry.
  • Only one ticket was stored.

That works because the test service supports idempotent writes.
But here's a harder scenario:

An AI agent sends a customer an email. The provider accepts it, but the worker crashes before recording success.

When the workflow resumes, how can it safely decide whether to send the email again?

A durable outbox helps with recovery, but it doesn't eliminate uncertainty about whether the provider already accepted the message.

What would you use in production?
Provider-side idempotency, reconciliation, human review, or another approach?

I'd love to hear how other engineers handle this failure window.

Project: github.com/Artem7898/ai-agents-platform

AI EngineeringAgentsTesting and Evals

Comments1

  • @lyubomir-bozhinov
    Lyubomir Bozhinov
    Founder · Fractional CTO · Open-source Builder · Author & Speaker · AI-Native Engineering in Regulated Markets
    2m ago

    Ah, the classic. My rule: if the provider takes an idempotency key, the key comes from the outbox row, so the retry is free. If it doesn't, the agent doesn't get to guess. It checks the provider's sent log for that message ID, and if it still can't tell, a human gets a one-click "send again?". A duplicate email costs less than a silent miss, but only just 😄

Log in to join the thread.