An agent creates an invoice in the accounting system. The call takes thirty seconds and then times out. The agent does not know whether the invoice exists, so it does what most software does and tries again. The first call had in fact succeeded. The customer now has two invoices for the same order, and the second one reaches them before anybody notices.

Nothing was wrong with the model. The agent reasoned correctly, chose the right action and carried it out. The failure was in what happened when a call to a business system did not come back cleanly. That kind of failure is routine, and what an agent does next decides whether your records stay trustworthy.

The failure that matters is the unknown one.

Most discussion of AI errors is about the model: wrong answers, invented facts. Those matter, and they are handled with checks and review. This piece is about a different class of error, which belongs to the connection between the agent and the systems it works on.

When an agent calls a system there are three outcomes, not two. The call succeeds. The call fails and nothing changed. Or the call fails in a way that leaves you not knowing whether anything changed: a timeout, a dropped connection, a response that never arrives. The third outcome is the dangerous one, because the obvious reaction to it, trying again, is correct if nothing was written and harmful if something was.

Sort every failure into three answers.

An agent that meets a failure needs a rule for what to do, and the rule needs to be written before the failure happens. There are only three useful answers.

  1. Retry. The failure was temporary and the action is safe to repeat: a brief outage, a rate limit, a busy server. Wait, then try again.

  2. Stop. The failure is permanent or the action is not safe to repeat: a rejected value, missing permission, a record that no longer exists. Trying again will not help, so stop and report.

  3. Ask. The outcome is unknown, or the cost of a wrong guess is high. Hand the case to a person with everything known about it.

Give the agent a short table: for each action and each kind of error, which of the three applies. Build the table with the integration owner, because the owner knows which errors from each system mean what. Our piece on how an agent reaches your systems explains the layer where those errors appear.

Give every write a key.

The guard against the double write is an idempotency key: a unique identifier created once for each intended action and sent with every attempt to perform it. If the system has already processed that key, it returns the original result instead of doing the work again. A second try with the same key is harmless.

Where the target system supports such keys, use them. Where it does not, build the same protection into the agent's own steps: before creating anything, look for it. Search for an invoice with this order number before creating one. A check before the write is slower than a key, and it works with systems that offer nothing better. The principle is the same either way: the agent must be able to ask whether the action already happened, and must ask before trying again.

Use something stable as the key, such as the order identifier plus the action name, not a random number generated on each attempt. A new random key on every retry defeats the purpose.

Bound the retries.

A retry rule with no limit is a loop waiting to cause trouble. Set three limits.

  • A maximum number of attempts, usually a handful.

  • A growing wait between attempts, so a struggling system gets time to recover instead of being hammered.

  • A total time budget, after which the case goes to a person whatever the attempt count says.

When the limits are reached, the agent moves the case to the ask path. It does not drop it, and it does not keep trying. A task that quietly disappears after three failures is worse than a task that was never started, because nobody knows it is missing.

Partial success is its own problem.

Many agent tasks have several steps: create the customer, create the order, send the confirmation. A failure in the third step leaves the first two done. If the agent retries the whole task, it repeats the first two. If it abandons the task, it leaves half a transaction in the system.

Design each multi-step task so that every step can be checked and, where possible, reversed. Record which steps completed. On retry, resume from the first step that did not. If a step cannot be completed, decide in advance whether to undo the earlier ones or to leave them and flag the case. Neither answer is right everywhere. The error is leaving it undecided, so the agent invents an answer under pressure.

Give the exceptions an owner.

Everything that goes to the ask path lands in a queue, and the queue needs a named owner and a time limit. An exception queue that nobody reads is a silent failure with a log attached.

Each item should arrive with what a person needs to decide: the task, the step that failed, the error, what is known about whether anything was written and the two or three actions available. A person who has to reconstruct the story from logs will take an hour. A person who gets it in one screen takes a minute. Count the queue weekly: how many items arrived, how old the oldest is and which error produced the most. The most frequent error is usually a design fix waiting to be made.

Why this belongs in the design, not the code review.

The reason to treat this as design is that agents act on records that people and other systems also act on, as we describe in what changes when the system acts on the record. A human who sees an error will usually look before repeating. An agent repeats at machine speed unless told otherwise. The same discipline applies to any connection where two systems try to write the same fact, which is why bidirectional sync is usually a design failure too.

A short build list.

  1. List the actions the agent can take and the system each one calls.

  2. For each action and error type, record whether the answer is retry, stop or ask.

  3. Add an idempotency key or a check-before-write to every action that creates or changes a record.

  4. Set the maximum attempts, the waits and the time budget.

  5. Record the completed steps of multi-step tasks, and resume from the first incomplete step.

  6. Name the owner of the exception queue and report its age weekly.

Where we come in.

We start with a no-risk discovery. We list the actions of an agent you run or plan to run, find the writes that a retry could duplicate and sketch the key, the limits and the queue for each. You pay for the discovery only if you go on to a build. A build comes with a guaranteed estimate, so if we estimate low, we absorb the difference. After go-live, Managed Technical Operations keeps the error table, the keys and the exception queue current as the connected systems change their behaviour.

An error you can see is an inconvenience. A retry you cannot see is a duplicate in your books.

Find out what one connected Zoho system would change in the way you run.

In a no-risk discovery we look at your CRM, finance and operations systems and who owns each part, and show what a connected system would do differently. You pay only if you proceed. Or see how we approach it.

Book the no-risk discovery

More on the same problem:

Where we're not the right answer

We'll tell you if we're a fit. If we're not, we'll tell you that too.

  • Your current stack works and nobody wants to change it
  • You want licences resold at a discount and nothing else
  • Your internal team owns the operating model and is not handing it over
  • You want hours of configuration work and nothing run for you: that is on our services pages, and it is not a managed solution
How we start

Most of our best clients come to us with a feeling, not a plan.

"Something isn't working." "We're outgrowing our tools." "We're afraid to make the wrong move." No-Risk Discovery is a short, practical conversation that gets you clarity before you commit to anything big. We'll tell you if we're a fit. If we're not, we'll tell you that too.

Talk to us

Have a question about this?

Say who you are and ask. A person replies within one business day.

About you
What are you looking for?
An agentic solution (AI OS) is licensed and sold with managed services. An integrated solution is built for a professional services fee. A Service is professional work, done by the hour, the month or the project. Not sure yet is a fine answer.

Agentic solutions (AI OS)

Integrated solutions

Services

Platforms You Use or Are Considering

Your details are never shared or sold.