Skip to content
Mastering Claude

Home / Several agents and adversarial checking

Several agents and adversarial checking8 minApplication

Three failure states, and accepting a risk properly

An automation that processes a queue should distinguish success, recoverable failure that will be retried, and definitive failure that is abandoned, and only the third should reach a person, otherwise every recoverable failure wears out the value of the alert on the day it is right; accepting a risk with a compensating control differs from ignoring it, a snapshot taken before execution allowing the result to be sorted into three paths, silent normal variation, a significant change that only alerts, catastrophic loss that restores automatically.

A queue of automated tasks produces three possible outcomes for each item processed: a success, a recoverable failure that will be retried later, and a definitive failure that will stay failed whatever the system does afterwards. Lumping the last two together into a single failure category breaks the value of any alert built on top of it.

Why confusing the two failures wears out the alert

If every recoverable failure triggers the same alert as a definitive failure, a team receives a notification for an incident that will probably resolve itself on the next attempt. Repeated often enough, this alert loses its value: the people receiving it learn to dismiss it without reading it, because most of the time it signals nothing that demands immediate action. On the day it finally carries a definitive failure, the expected reaction no longer comes, precisely because the alert has been right too often for the wrong reasons. A one-off network timeout illustrates a typical recoverable failure, it often disappears on the next attempt; missing data at the source, which will not reappear on its own, illustrates a typical definitive failure.

result = process(task)

if result == success:
    report nothing

elif result == recoverable_failure:
    requeue the task, do not alert

elif result == definitive_failure:
    alert a person

Accepting a risk is not the same as ignoring it

A compensating control accepts the risk of an action rather than preventing it in advance: it lets the action happen, then checks afterwards whether it had the expected effect. A snapshot taken before execution makes this check possible by giving a point of comparison, the result obtained is then sorted into three paths, a normal variation that stays silent, a significant change that alerts without acting on its own, and a catastrophic loss that triggers an automatic restore. A compensating control that has never been triggered on test data does not yet deserve the trust placed in it. A previous lesson shows that multiplying agents does not make a result more reliable; cleanly distinguishing these three failure states is another way of keeping control over what actually gets escalated, rather than letting every alert fire at the same level.

Figure 1

Automatic retry or human escalation, depending on the type of failure

Temporary failure, a new attempt may succeed
Definitive failure, no further attempt will change the result
The system retries automatically

Silent retry

The task is put back in the queue without alerting anyone, this is the normal case for a temporary failure.

Premature alert

A person is disturbed for an incident that would probably have resolved itself on the next attempt, which wears out the value of the alert.

The system stops and escalates to a person

Masked failure

The system keeps retrying a failure that will never resolve, without anyone knowing.

Legitimate escalation

Only this case deserves to disturb a person, the action will not succeed without human intervention.

The matrix crosses the temporary or definitive nature of a failure with the system's reaction, automatic retry or escalation to a person: only one combination out of four deserves to disturb someone.
Calibrate it yourself

A manager sets up an automation that sends a notification to their team every time one of the hundred files processed overnight fails, whether the cause is a one-off network timeout or missing data in the source file.

Write in one sentence what this situation establishes, and in one sentence what it does not establish.

What to remember
  • A queue of automated tasks benefits from distinguishing three outcomes, success, recoverable failure that will be retried, and definitive failure, only the latter should trigger an alert sent to a person.
  • Escalating every recoverable failure as though it were a definitive failure wears out the value of the alert, to the point that no one reacts any more on the day it signals a real problem.
  • A snapshot taken before execution allows the result obtained to be sorted into three distinct paths, a normal variation handled silently, a significant change that only alerts, and a catastrophic loss that triggers an automatic restore.
  • A compensating control accepts the risk of an action rather than preventing it, provided it has actually been triggered on test data before it is trusted.
Do this now

Choose an automation you already use that processes several items in a row. For a recoverable failure and for a definitive failure, write on one line what happens today, nothing is escalated, a silent retry, or a person is disturbed, and check whether the two types of failure produce the same reaction.