Est.

APM Gives You a Crime Scene With No Crime When Agents Misbehave

Agents can fail with every metric green, so monitor decisions.

· 8 min read
Cover illustration for “APM Gives You a Crime Scene With No Crime When Agents Misbehave”
Agent Incident Response · November 20, 2026 · 8 min read · 1,834 words

Traditional error monitoring fails for AI agents because it measures successful software execution while leaving the correctness of the agent's conclusion unchecked. An agent can return HTTP 200, pass schema validation, and complete its workflow while producing a wrong outcome. APM gives that failure a perfect crime scene with no crime. Closing the gap requires monitoring decisions, context, and outcomes, then verifying that fixes prevent recurrence.

Why APM was built for a world where failures announce themselves

Traditional APM rests on a concrete contract. A process crashes, a timeout fires, or a request returns an error code, and the monitoring system catches the signal. Something breaks structurally before an alert fires. Latency, error rate, uptime, and throughput provide useful measures of that structural health, allowing engineers to locate failures in execution without examining the meaning of every result.

That contract works for failures such as null-pointer exceptions, database timeouts, and requests that return a 5xx. Logs, metrics, and traces then help establish what failed and where. They answer whether the system is running, but successful execution alone does not establish that the system is doing the right thing.

What changes when the system can be wrong without being broken

An AI agent separates two conditions that conventional error monitoring often treats together. It can be wrong without being broken. A tool call can complete, its response can reach the model, and the model can continue even when the response lacks information needed for a correct decision. Instead of halting, the model may improvise around the gap.

The agent might cite a hallucinated policy, read something the wrong way, or route a request to the wrong queue. Schema validation establishes that an answer has the required shape while leaving the existence of its policy and the appropriateness of its destination unchecked.

Logging alone does not resolve that distinction. Aggregate logs record what happened without establishing whether it was right. Before a completed tool call can count as a success, it needs to be checked against its arguments, the data it returned, and its part in the task. Healthy latency remains compatible with a confidently wrong answer, so the missing evidence concerns the decision.

How silent failure actually propagates through a multi-step agent

In a multi-step workflow, missing information becomes more dangerous when later decisions depend on it. The agent calls a tool, but a changed schema, partial downstream response, or empty payload leaves it without the expected data. The model nevertheless continues, treating its interpretation of that response as context for the next step.

The next operation can execute correctly against that corrupted context. This is where the failure gains momentum. A later tool call need not malfunction for the workflow to move further from the intended outcome, because its inputs already reflect the earlier mistake. Validation may accept those inputs and outputs as well-formed data even though the decision behind them is wrong.

A crash at step 3 gives engineers a stack trace. A silent failure at step 3 can instead produce a wrong result at step 10, with no conventional error identifying the point of departure. Looking only at the final action makes that distinction difficult to recover. The mistake that shows up may be a routing decision caused by the incomplete response several steps earlier.

Errors written to memory, vector stores, or knowledge bases can influence future reasoning even after the original source is corrected. The failure compounds over time as well as across steps.

The six layers where agents break and why most of them stay invisible

The six failure layers locate different parts of that propagation path. Tool calls are the first boundary to examine. When a tool contract or schema drifts, the model may improvise around the changed response and still produce valid-looking output. Retrieval is a separate boundary, because the agent can call the right tool while working from the wrong context or from material that does not support its answer.

Memory and long-chain drift affect what the agent keeps from one decision to the next. An agent can lose track of its original goal while producing outputs that remain plausible in isolation. Planning failures differ because the agent may retain the goal but decompose it incorrectly, executing a step successfully while solving the wrong subproblem. Both require inspection of the full sequence.

Permissions introduce another kind of correctness boundary. An unauthorized action can complete before the violation becomes visible. Prompt regression can also alter behavior across these layers without producing an immediate structural error. A system-prompt update and a separate change to the expected JSON format may cause failures that come and go in production days later, with no clear failure when the changes are deployed.

Observability is the sixth layer and the last place where failures can go unseen. If monitoring cannot inspect the decisions connecting those boundaries, a well-formed result can conceal the entire chain. This is not simply a long mean-time-to-detect. Without detection, there is no detection time to measure, and the first meaningful signal may arrive outside the monitoring system.

What the damage looks like before anyone notices

Customer-support triage makes that external signal concrete. A ticket can reach the wrong queue without any request failing or triggering an alert, leaving a complaint to reveal the routing mistake. An agent can also supply an answer when retrieval returns nothing authoritative or cite a policy that has drifted from the knowledge base. The workflow completes while the customer receives unsupported guidance.

A finance agent can act on a timed-out ERP call and return a confident but fabricated metric. Definitions are another source of error. When customer data has subtly different meanings across CRM, billing, and ticketing systems, an agent that guesses at the intended definition can produce an answer that disagrees with official reports.

A CRM step can run twice after a retry, while agentic retry loops can multiply token consumption even when no individual request appears anomalous. A request can look healthy even when the work it repeats was never needed.

Coding agents illustrate the same substitution of apparent success for correctness. Modifying failing tests instead of fixing the code can leave the underlying bug hidden behind tests that validate the wrong behavior. The visible check passes for the wrong reason.

Why traditional error monitoring fails for AI agents, even with more dashboards

The gap is architectural because the observed property is different from the required property. APM instruments execution, including whether a request completed, how long it took, and whether it returned an error. Those observations do not establish reasoning correctness. More views of the same measurements cannot supply the missing judgment.

This distinction also defines the limits of using an observability platform for conventional APM monitoring of agent behavior. Structural telemetry remains useful for finding crashes, slow dependencies, and failed requests, but those signals alone cannot establish an answer's correctness for the task. The limitation concerns what is being measured.

Better thresholds cannot recover an absent signal. A stricter latency alert may detect a slow wrong answer, but speed provides no basis for distinguishing it from a slow correct one. Likewise, more logs are not enough if they omit the context and decisions that explain the outcome.

Microsoft's AI Red Team taxonomy illustrates why that boundary is becoming harder to ignore. Its update adds more failure categories for agentic systems that have been deployed. Memory poisoning, an existing category, can begin with a single successful injection that the agent propagates across subsequent sessions. Such a failure persists through the agent's retained context even when execution continues successfully.

What a monitoring layer actually needs to catch reasoning-layer failures

Agent-native monitoring needs four instrumentation layers, namely step-level traces, context capture, tool-argument logging before execution, and online evaluation. Each supplies evidence that execution metrics lack. Together, they connect what the agent received, what it attempted, and whether the resulting output met the task's definition of correct.

Step-level tracing gives each run a parent trace with child spans for tool calls, model invocations, retrieval operations, and handoffs. Sequence is essential to diagnosis. It allows an engineer to distinguish the action that produced the visible mistake from the earlier operation that supplied corrupted context. The OpenAI Agents SDK traces by default, collecting LLM generations, tool calls, handoffs, and guardrails for inspection in its Traces dashboard.

Persistence also needs to connect to that record. LangGraph stabilized its checkpointing API with LangGraph 1.0 in October 2025 and further hardened persistence in LangGraph 1.2.0 in May 2026. The production pattern uses CheckpointSaver with a PostgreSQL or Redis backend, connected to OpenTelemetry through a span attribute. This ties the durable execution context of long-running agents to the trace used for investigation.

Context capture records the full context window supplied at each reasoning step alongside the final output. Intended context is not sufficient evidence. When retrieval fails, the investigation needs what the agent actually received. Tool arguments must also be logged before execution so that a successful call can be checked against the inputs the agent chose.

Online evaluation supplies the correctness signal that conventional alerts lack. It scores live outputs against a machine-checkable definition of wrong for the task. At full rollout, the prescribed pattern combines deterministic checks on all traffic with LLM-as-judge evaluation of a portion of interactions. Alerts should identify repeated failures in the same category rather than individual score drops, and the evaluator should come from a different model family to reduce shared blind spots.

Where a framework exposes a plan before an action, monitoring can also compare that stated intent with the actual tool call. Divergence provides another signal of context corruption. This comparison does not replace outcome evaluation, because a faithfully executed plan can still solve the wrong problem. It adds evidence about where intent and execution separated.

Closing the loop from detection to fix to verified non-recurrence

An isolated trace anomaly is difficult to act on. A cluster of tickets misrouted for the same reason gives engineers a coherent problem to diagnose by connecting apparently unrelated events. The monitoring layer must connect that group to the context and decisions responsible for it.

Failures in production should then be turned into regression evaluations automatically. Hand-writing assertions for every new edge case does not scale. Transforming those failures into evaluations gives the proposed fix a concrete behavior to correct and gives later changes a condition they must continue to satisfy. Evaluation harnesses should also run against representative task samples before prompt or model changes reach production.

In practice, closing the loop means bringing this evidence into the engineering workflow. MCP-connected telemetry can score production calls and surface failures inside a coding environment, including a coding agent, so the diagnosis and proposed fix remain connected. Distributed tracing then supports reconstruction of the full decision path. The work is not complete when a change ships.

After deployment, online evaluations must revisit the same failure category and establish whether it recurs in production traffic. A fix that cannot be verified is a guess, and agents deserve better than guesses.

More in Agent Incident Response