Agentic failure modes: how systems fail when the answer is a judgement
Agents rarely crash. They get a little worse at deciding, and nothing in a normal dashboard shows it. This page covers the main failure modes, how to observe them, and how to keep autonomy inside limits.
Agentic failure modes in 60 seconds
- Main idea: a service fails with an error code. An agent fails by deciding a little worse, and the system keeps returning answers.
- Five modes: cascading decision degradation, retry amplification, silent quality loss, coordination overhead, and state drift.
- Observe decisions: trace tool choices, reasoning steps and evaluations, and watch retry, fallback and strategy rates as early warnings.
- Contain autonomy: latency budgets, retry caps, depth limits, deterministic fallbacks, gradual rollout and graceful degradation.
- Rule of thumb: if you cannot say how you would notice a quality drop within a day, the system is not ready for production.
The problem it solves
Reliability engineering grew up around services that either work or visibly do not. A timeout, a 500 response, a full queue: each is a clear event that alerts can catch. Years of practice with circuit breakers, retries and observability rest on that assumption.
An agent breaks the assumption. It chooses its own next step from context, so its output is a judgement, and a judgement can be poor without being an error. The call succeeds, the latency is normal, the response has the right shape, and the content is slightly worse than last week. No monitor fires, because nothing technically failed.
Cascading decision degradation
Early decisions in a run shape everything after them. If the first step narrows a large set of options to a short list, every later step only sees that list. A poor narrowing choice cannot be repaired downstream, because the better options are no longer in view. Worse, later steps polish and justify the weak list, so the final answer reads well.
Search and recommendation flows are typical. A candidate-selection step picks which items go forward to ranking. If that step misreads the request, the ranker can only rank the wrong set, and an evaluator can only score the wrong set. In a classic service, a bad filter shows up as an obviously wrong result. Here the ranking is internally consistent, so nobody sees the loss.
Retry amplification
Retries in a service are triggered by errors, and an error is a crisp signal. In an agent loop, retries are often triggered by a quality judgement: the evaluator thinks the answer is not good enough, so the planner tries again. That signal is subjective and noisy. A slightly strict evaluator, or a harder-than-usual batch of requests, can push the retry rate up across the whole fleet.
Each retry is a fresh set of model and tool calls, and retries can nest: an agent retries a sub-agent that itself retries. Cost and load grow multiplicatively. A drift from 1.2 attempts per request to 2.5 can double spend and halve headroom while every request still succeeds.
Silent quality degradation
This is the most dangerous mode, and the diagram below shows why. Standard dashboards track latency, error rate and throughput. All three can stay flat while answer quality falls, for example after a model update, a changed prompt, a stale index or a shift in the kind of questions users ask.
Users rarely report subtle drops, so the first sign is often a business metric weeks later, such as lower conversion. Treat decision quality as a first-class signal from the start.
Coordination overhead and accumulated latency
Splitting work across specialised agents helps focus, but every hand-off has a price: a model call, a message, a wait. Latency adds up across the chain, and it varies from run to run because the number of steps varies. A flow that takes two seconds on a simple request may take twenty on an unusual one.
State drift and context inconsistency
An agent run builds up a working context: the request, the plan so far, retrieved documents and tool outputs. As it grows, two things go wrong. Different parts of the context can disagree, for example a tool output that contradicts an earlier assumption that is still in the prompt. And the run can drift away from the original goal, because recent, detailed material crowds out the short instruction at the top.
When several agents share state, the risk rises. One agent may act on a version of the facts another has already corrected. The result is behaviour that is locally reasonable and globally wrong. Keeping context small, scoped to one run and clearly structured reduces the problem, and the pages on context engineering and context lifecycle cover how.
A worked example
Acme Travel runs a hotel search agent. A selection step picks up to five hotels from about 400 matches, a ranking step orders them, and an evaluator rates the final list from 0 to 1 and asks for another try below 0.7.
- Trigger: a prompt change makes the selection step read "under 150" as a price for the whole stay, not per night. Hotels that fit a nightly budget are dropped early.
- Cascade: the ranker sees five mid-price hotels and ranks them sensibly. The evaluator checks internal consistency and gives most lists 0.68 to 0.72.
- Amplification: about half the lists now fall just under 0.7 and are retried. Attempts per request rise from 1.1 to 2.3, and model spend rises by about 110 percent.
- Silent loss: latency rises only from 3.1 to 3.4 seconds. The error rate stays at 0.2 percent. Dashboards stay green.
- Detection: a weekly view of retry rate by step shows the jump. A sampled review of 50 traces finds the selection step dropping valid hotels. Booking conversion had already fallen 6 percent.
- Containment: the team rolls back the prompt, caps attempts at two, and adds a check that compares the selected set with simple price-filter results.
Observing decisions, not just calls
Observation has to move up a level. Request-level traces say how long a call took. Decision-level traces say what the agent chose and why. Record tool choices, reasoning summaries, intermediate outputs and evaluation results for each step, tied together by a run id. Mask sensitive fields before storing them.
Some of the best early warnings are shifts in behaviour, not outcomes. Watch how often each tool is used, how often each strategy is picked, and how often fallbacks and retries fire. A change in any of these, with no code change on your side, usually means the inputs or the model changed.
Runtime evaluation can score a share of live traffic, using rules, a second model, or a sampled human review. Keep it bounded: it costs tokens and adds latency, so score a sample or run it off the request path, and give the scorer its own budget. See evaluation and observability for methods.
Building it
import time
MAX_ATTEMPTS = 2 # retry cap for quality-triggered retries
MAX_DEPTH = 4 # reasoning steps per attempt
DEADLINE_S = 8.0 # latency budget for the whole request
MAX_TOKENS = 20_000 # spend budget for the whole request
MIN_SCORE = 0.7 # confidence threshold from the evaluator
def handle(request, trace):
start, tokens = time.monotonic(), 0
best = None
for attempt in range(1, MAX_ATTEMPTS + 1):
# Placeholder: agent.run returns an answer, its token use and its steps.
result = agent.run(request, max_steps=MAX_DEPTH)
tokens += result.tokens
score = evaluator.score(request, result.answer) # bounded, small model
# Decision-level trace: what was chosen, not only how long it took.
trace.record(attempt=attempt, steps=result.steps, score=score,
tools=[s.tool for s in result.steps])
if best is None or score > best.score:
best = Scored(result.answer, score)
if score >= MIN_SCORE:
return best.answer
out_of_time = time.monotonic() - start > DEADLINE_S
out_of_budget = tokens > MAX_TOKENS
if out_of_time or out_of_budget:
trace.record(stopped="budget")
break
# Limits reached or quality still low: use the plain path.
trace.record(fallback="deterministic")
return deterministic_search(request) # rules-based, no model
agent, evaluator, Scored and deterministic_search are placeholders. The point is the shape: every loop has a numeric limit, every attempt leaves a decision-level trace, and there is always a path that does not depend on the model.
Keeping autonomy inside limits
Bounded autonomy means the agent chooses freely, but only inside walls set by code: latency budgets, retry caps and limits on reasoning depth. At a wall, the system degrades on purpose.
Hybrid designs add a second layer of safety. A deterministic fallback pipeline, such as plain filters and a fixed sort, handles requests when the agent times out, scores low or is switched off. It is less clever and fully predictable, which is exactly what you want at the edge. Rollouts should be gradual: run experiments on a small share of traffic, run new versions in shadow mode where their output is logged but not shown, and deploy in controlled steps with a quick way back.
Design decisions
- Budgets: set a latency, token and attempt budget for every request, and choose what happens at the limit. Return the best answer so far, fall back, or ask the user.
- Retry triggers: retry on clear signals such as a failed tool call or an invalid format. Treat quality-score retries as costly, and allow at most one or two.
- Evaluator placement: score at the decision points that matter most, such as candidate selection, not only at the end. Early scoring catches cascades sooner.
- Fallback design: keep a rules-based path for each critical flow and test it regularly, since an untested fallback often fails when first needed.
- Trace schema: define one decision record format across agents: step, tool, inputs summary, output summary, score and run id. Consistent records make cross-agent analysis possible.
- Rollout gates: require shadow runs and a quality comparison against the current version before any change to a prompt, model or tool reaches users.
- Isolation: use circuit breakers around tools and sub-agents.
Measuring it
- Decision quality score: the mean and distribution of evaluator or human scores on a daily sample, split by flow and by step.
- Attempts per request: the mean and 95th percentile. A slow rise is an early sign of retry amplification.
- Fallback rate: the share of requests served by the deterministic path, and the quality gap between the two paths.
- Behaviour shift: week-on-week change in tool usage and strategy frequency, with an alert on large moves.
- Early-step accuracy: on a labelled set, how often the first narrowing step keeps the correct items. This measures cascade risk directly.
- Cost and latency tails: the 95th and 99th percentile of spend and time per request, not the averages.
- Evaluator agreement: how often the automated scorer agrees with human review.
When to use it, and when not to
| Situation | Apply these controls? | Why |
|---|---|---|
| Any agent serving real users | Yes | Silent quality loss affects every deployment, so budgets and decision traces are a baseline. |
| Agent output feeds money, health or legal outcomes | Yes, strictly | Add human checkpoints and deterministic fallbacks for each risky step. |
| Internal prototype with a few testers | Light version | Keep budgets and basic traces. Skip full runtime evaluation until usage grows. |
| Fixed, rule-based flow with one model call | Mostly no | A simple pipeline with ordinary monitoring is enough. |
| Many agents with shared state | Yes | Drift and coordination cost grow with the number of agents, so scope state and trace every hand-off. |
Trade-offs
| Dimension | Effect | What to do about it |
|---|---|---|
| Quality | Runtime scoring and fallbacks catch weak answers, but low thresholds let them through and high ones trigger retries. | Tune thresholds on labelled data and review them each quarter. |
| Latency | Budgets and caps bound the worst case, but the agent may stop before finding the best answer. | Set budgets from user tolerance and accept a slightly worse tail result. |
| Cost | Evaluation and tracing add token and storage cost, while retry caps remove the largest spikes. | Score a sample, store summaries, and compare to the cost of one bad release. |
| Complexity | A fallback path means two implementations to maintain and test. | Keep the fallback deliberately simple and run it in tests on every release. |
| Speed of change | Shadow runs and gradual rollout slow each release. | Automate the comparison so the gate takes hours, not weeks. |
Compared with classic reliability
Most classic tools still apply. Timeouts, rate limiting, circuit breakers and idempotency all protect agent tool calls just as they protect service calls. What changes is the signal. Services are watched for errors, and agents must also be watched for judgement quality. Retries in services are cheap and safe when calls are idempotent, while agent retries cost real money and can change the outcome.
What this means for your role
Common mistakes
Further reading
- Agentic AI architecture: an overview: the hub page for this section.
- From microservices to agents: how control flow, state and failure change when decisions are made at run time.
- Harness evolution: how chains, graphs and code harnesses add structure and validation.
- Evaluation and observability: methods for scoring and tracing model behaviour.
- Guardrails and safety: controls that limit what an agent may do.
Agents fail by drifting, not by crashing. Measure decisions, cap every loop, keep a plain fallback ready, and roll changes out slowly enough to see what they do.