Safe retry and recovery for AI agents means making sure that when something fails partway through and the agent tries again, or resumes from where it left off, the retry can't accidentally duplicate an action, skip a check the original attempt would have gone through, or escalate its own privileges just to get past whatever caused the failure in the first place. Retry logic is a normal, necessary part of building reliable systems, but agents introduce a specific wrinkle: the "retry" isn't always a clean repeat of the exact same deterministic operation, because the model might reconstruct its plan differently the second time, sometimes taking a shortcut that bypasses a safeguard the original path included.

Idempotency matters more with agents, not less

A payment retried twice without idempotency protection charges the customer twice. That risk exists in any distributed system, but it's sharper with agents because the retry trigger itself might be the agent's own uncertainty about whether the first attempt succeeded, rather than a clean network-level timeout a conventional retry mechanism would handle predictably. Every action with real-world side effects needs an idempotency key or equivalent mechanism so a retry is provably a no-op if the original attempt already went through, regardless of why the agent decided to try again.

Don't let failure become an excuse to route around checks

An agent that hits a denial or a validation failure on one path can sometimes "recover" by trying a different tool, a different phrasing, or a different sequence of steps that happens to avoid the check that failed. This isn't malicious, it's the agent doing what agents do: finding another way to accomplish the goal. But if the check that failed was a security control, not a transient error, that alternate path is a bypass, not a recovery. Recovery logic needs to distinguish between "this failed because of a temporary issue, try again" and "this failed because it's not allowed, don't look for a workaround."

State reconciliation after a partial failure

When an agent's multi-step plan fails partway through, some actions may have already executed and others haven't. Recovery logic needs to reconcile actual system state before deciding what to do next, rather than assuming the plan needs to restart from step one, which risks repeating already-completed actions, or assuming everything failed, which risks skipping steps that still need to happen. This reconciliation step is exactly the kind of thing that's easy to skip under time pressure and expensive to get wrong.

Backoff and circuit breakers apply to agents too

Standard resilience patterns, exponential backoff, circuit breakers that stop retrying after repeated failures, apply directly to agent tool calls and deserve the same discipline as any other distributed system component. Without them, a failing tool or a persistently denied action can turn into a tight retry loop that burns cost and API quota for no benefit, compounding a minor failure into a resource problem.

Recovery decisions deserve the same authorization scrutiny as the original action

If recovering from a failure involves a different action than the one originally planned, a compensating transaction, an escalation to a different tool, that new action needs its own authorization check. It's not automatically covered by whatever approval or policy check the original, failed action went through.

Test the failure paths as deliberately as the happy path

Most testing effort for an agentic workflow goes into confirming the intended path works: the agent completes the task correctly when everything goes right. Failure and recovery paths get tested far less often, if at all, and that's precisely the part of the system most likely to contain a security gap, because it's the part built under time pressure after the main flow already works, often as an afterthought once something broke in a demo. Deliberately injecting failures, a tool timeout, a partial success, a denied action mid-sequence, and confirming the recovery logic behaves safely in each case deserves the same test coverage as the primary workflow, not a quick manual check before shipping.

Where TELEON fits

Because retries and recovery attempts still resolve into tool calls, TELEON's enforcement at the tool-call boundary applies the same policy checks to a retried or recovery action as it would to the original attempt, which specifically prevents a denied action from succeeding on a second try just because the agent phrased or sequenced it differently. The audit trail also distinguishes original attempts from retries, which is useful when reconciling what actually executed after a partial failure.

Designing idempotency keys, state reconciliation, and backoff logic is implementation work specific to each agent's own tools and workflow, and it has to happen at the application layer.

A short checklist

  1. Require idempotency keys for every action with real-world side effects.
  2. Reconcile actual system state after a partial failure before resuming a plan.
  3. Distinguish transient failures worth retrying from policy denials that aren't.
  4. Apply exponential backoff and circuit breakers to repeated tool call failures.
  5. Re-run authorization checks on any compensating or alternate recovery action.
  6. Cap total retry attempts and alert when a workflow hits that cap.
  7. Log retries distinctly from original attempts for accurate incident reconciliation.

Retry and recovery logic tends to get written for the happy path of "it usually just works the second time," which is true often enough that the edge cases get deprioritized. In an agentic system those edge cases are exactly where a security control can quietly get bypassed, which makes recovery logic worth the same scrutiny as the primary action path, not an afterthought bolted on once the main flow works.