Production failure diagnosis

Why AI Agents Fail in Production

Locate agent failures across task, evidence, decision, authority and confirmation boundaries before choosing a repair.

AI agents can fail in production even when their model calls succeed and their infrastructure remains available. The failure may lie in the task definition, evidence, decision, action boundary, destination state or operating response. Treating every problem as a weak model sends teams towards expensive changes that may leave the actual cause untouched.

This diagnostic guide is for service owners investigating a recurring production failure. It provides a way to locate the first unsupported step and distinguish contributing conditions from symptoms. Within AgentOps, the objective is to restore a controlled business process and prevent the same failure mechanism from recurring.

Define the failed promise before choosing a fix

Write what the service was expected to achieve for the affected task, under which policy and with what evidence. Then state what actually happened and what remains unknown. “The agent failed” is not a useful problem statement; “the proof-review memo cited a withdrawn brand source as current” identifies something that can be investigated.

Separate outcome failure from process interruption. A request held for clarification may be the correct disposition. A polished response delivered on time may still be unacceptable if it relies on evidence the service was not permitted to use. The outcome evaluation framework makes these distinctions explicit.

Google's SRE monitoring guidance distinguishes uses such as alerting, diagnosis, trend analysis and comparison. For an agent, diagnosis needs evidence of the task and its decisions as well as component health. A healthy endpoint alone cannot show whether the promised business behaviour occurred.

Worked case: a proof-review memo with withdrawn evidence

Consider an illustrative production-artwork proofing service. The agent prepares an internal review memo for a human brand reviewer. It can point out differences between a submitted proof and the approved brand material; it cannot authorise printing or replace the final reviewer.

A memo for artwork AW-71 cites brand pack BP-12. That pack was withdrawn before the request arrived, and BP-13 is the applicable source. The memo is fluent, contains the expected fields and reaches the correct review queue. The reviewer discovers that one recommendation comes from the withdrawn pack.

Changing the model may not fix this case. The investigation must establish why BP-12 remained eligible, whether the retrieval or cache path preserved its status, what source version the task actually received and whether the review interface made the withdrawal visible. Do not assume every component shares the same current-state view.

Locate the first unsupported boundary

Diagnostic chain for artwork AW-71
BoundaryEvidence to inspectQuestion
Task intake.Request time, artwork identity, intended review scope.Was the correct task accepted into this service?
Source eligibility.BP-12 withdrawal record and BP-13 effective record.Which source was permitted when the task ran?
Evidence supplied.Retrieved passages, source identifiers and relevant cache metadata.What did the agent actually receive?
Decision.Memo statements and the evidence supporting each material recommendation.Did the recommendation follow the available permitted evidence?
Human review.Displayed source status, reviewer action and timing.Could the reviewer identify and challenge the stale basis?
Final disposition.Held, corrected, rejected or accepted memo and remaining affected work.What was contained, and what still needs review?

The table is an investigation sequence, not a claim that the first visible error is the only cause. A stale source can combine with an interface that hides source status and a queue that pressures reviewers to accept quickly. Preserve those contributing conditions rather than forcing a single convenient explanation.

Failure pattern 1: an undefined or changing outcome

If teams disagree about success, the agent may optimise the wrong proxy. A service can report complete when a document is generated, while the business expects a correctly reviewed and accepted result. Determine which event the metric measures and which event the user needs.

Inspect changes in the operating promise. Perhaps the pilot produced suggestions, but production users now treat them as instructions. That is a scope change with different evidence and authority requirements. Correct the outcome contract and user workflow before assuming that more detailed model instructions will solve the mismatch.

Failure pattern 2: evidence that is available but unsuitable

Relevant-looking content can be stale, unauthorised for the user, incomplete or applicable to another context. Retrieval success establishes that something was found; it does not establish that the evidence is suitable for this task. Check source authority, effective status, identity and the task's actual access scope.

In AW-71, confirm whether BP-12 was removed from the eligible source set, merely labelled withdrawn or left in a cache without status. Each path implies a different correction. Keep the withdrawn material available only where the organisation's history and access requirements justify it, without treating historical availability as current applicability.

Failure pattern 3: a decision unsupported by the evidence

The agent may receive suitable evidence but make an incorrect inference, ignore a condition or express uncertainty as fact. Compare the material recommendation with its source and the task's acceptance rule. A syntactically valid output or a high self-reported confidence does not resolve that comparison.

Use controlled tests that vary the relevant evidence while holding other conditions reasonably stable. If the recommendation does not change when an important condition changes, investigate the decision behaviour. If the original input is missing, record that limitation instead of claiming a successful reproduction from a reconstructed prompt.

Failure pattern 4: authority and execution diverge

A good recommendation can still lead to an unauthorised action if the deployment has excessive permissions or approval is not bound to the actual target and parameters. Inspect the identity and enforced policy at the tool boundary, not only the conversational instruction telling the agent to be careful.

Conversely, a correctly denied action is not necessarily an agent failure. It may show that the control worked and that the requested workflow needs a legitimate alternative. The action-authorisation guide separates permission enforcement from the model's proposed decision.

Failure pattern 5: requested work is mistaken for completed work

A tool request can be accepted, time out or return an uncertain result without establishing the final destination state. When the service reports success too early, the failure may appear later as missing records, duplicate effects or unresolved commitments.

Trace the task through request, acceptance, execution and confirmation using available evidence. Preserve unknown states instead of converting them to either success or failure for a cleaner dashboard. The retry guide explains why replaying an uncertain action without reconciliation can increase the problem.

Failure pattern 6: nobody can sustain the intended control

The design may be sound while the operating arrangement is not. A review queue may lack capacity, alerts may reach an unavailable person, or the runbook may require access held only by the developer. These are production failure mechanisms even when the model behaves as designed.

Inspect actual interventions and waiting times. Ask who noticed the issue, who could act and what prevented timely containment. The pilot-to-production operating-gap guide explains how hidden support can mask these conditions before launch. Do not fix a capacity problem by quietly removing the review boundary it was supposed to support.

Choose a repair that matches the evidence

For AW-71, a verified source-eligibility defect calls for a source-status and invalidation correction, followed by tests that withdrawn material cannot support a current recommendation. If the interface hid a status that was available, repair that presentation and test whether reviewers can challenge the result.

Assess the affected cohort before resuming normal work. Identify tasks that used the same source path and determine which need review; do not assume every task is wrong or that only the reported memo is affected. Assign the remaining uncertainty to an owner with an explicit next decision.

Record evidence for the repair and a test that the known defect does not return. Include a negative case where the correct result is to hold the memo. Use the incident post-mortem template to capture contributing conditions and actions whose closure can be demonstrated.

Compare affected and unaffected work carefully

A useful comparison controls the conditions relevant to the hypothesis. Compare tasks that used the same source path and deployment, then examine the source status and review outcome. A successful task on a different version may show that the service can work, but it does not explain why AW-71 failed.

Look for counterexamples. If some tasks using BP-12 were correctly held, inspect what differed: the wording, the retrieved section, the displayed status or the human intervention. This can expose a conditional failure that a single replay misses. Do not infer a population failure rate from a deliberately selected investigation sample. Its purpose is to test the mechanism and bound the affected scope; measuring prevalence requires a suitable sampling method and a clearly defined population.

Keep the investigation honest when evidence is incomplete

Label findings as confirmed, supported hypotheses or unresolved. If a trace is missing, state what cannot be concluded and what alternative evidence exists. Avoid a definitive “root cause” based only on the last error message or the team's preferred explanation.

Discuss a recurring production-agent failure with a masked task, its intended outcome, relevant versions and the first observed discrepancy. A useful diagnosis narrows uncertainty and identifies the next test, instead of starting with a predetermined tool or model replacement.

FAQ

Your questions, answered.

Why can an AI agent fail while its APIs are healthy?

Component availability does not establish that the business task was understood, supported by suitable evidence, authorised or completed correctly. Inspect the task outcome and the boundaries between intake, evidence, decision, action and confirmation. An available service can consistently produce an unacceptable result, while a safely held task may be an appropriate outcome rather than a failure.

Should we replace the model when a production agent makes mistakes?

First locate the failed boundary. A model change may help a verified decision-quality problem, but it will not necessarily correct stale sources, excessive permissions, missing confirmation or unavailable reviewers. Preserve a representative failed task, compare it with the acceptance rule and test the relevant hypothesis before choosing a repair. Re-evaluate the full workflow after any change.

How do you diagnose stale-source failures in an agent?

Compare the task time, source eligibility, effective version, retrieved evidence and relevant cache metadata. Establish what the agent actually received and whether the source was permitted for that task. Then inspect whether the review interface exposed the status. Historical availability does not establish current applicability, and deleting evidence indiscriminately can undermine the investigation.

Is an agent refusal or review hold always a failure?

No. Refusal, clarification or a review hold may be the correct disposition for an unsupported or unauthorised request. Define success using the approved outcome contract, including acceptable abstention. If the workflow cannot complete because the required authority is unavailable, investigate the operating arrangement without weakening the boundary merely to improve a completion percentage.

What should we do when production traces are missing?

State what cannot be concluded, preserve alternative evidence and distinguish confirmed findings from hypotheses. Do not present a reconstructed prompt as an exact reproduction of the original task. Identify the additional evidence needed and improve future traceability within appropriate access and data limits. Missing telemetry is itself an operating gap, but it does not prove a particular model failure.

How do we know a production-agent repair addresses the cause?

Demonstrate the failure mechanism, change the relevant control and test that the known defect does not return. Include realistic negative cases and inspect the affected cohort, not just the reported example. If several conditions contributed, assign actions to each material gap. Keep unresolved uncertainty visible and avoid declaring success solely because a component error stopped appearing.

LET’S WORK TOGETHER

Ready to build what’s next?

Tell us about your project or the platform you want to explore, and we’ll come back to confirm a suitable time.