Est.

Declaring Degradation Before Anyone Pages You Requires a Different Telemetry Primitive

Agent failures hide behind green status codes, so trace intent and outcomes.

· 8 min read
Cover illustration for “Declaring Degradation Before Anyone Pages You Requires a Different Telemetry Primitive”
Agent Incident Response · November 19, 2026 · 8 min read · 1,880 words

To detect silent failures in AI agents in production, teams need step-level telemetry that records intent, instruction adherence, and outcome correctness as well as request completion. Status codes and latency can show that an agent ran successfully while missing that it solved the wrong problem. Detecting degradation before a user complaint requires semantic traces connected to outcome evaluations and a verified repair cycle.

Why transport-layer telemetry cannot see reasoning-layer failures

Conventional telemetry shows whether a request finished, how long it took, and whether the service stayed available. A successful HTTP response establishes neither that the evidence was current nor that the chosen action was appropriate. The distinction is structural. A status code has no concept of the task the agent was supposed to complete.

An agent can route a request to the wrong queue or cite a hallucinated policy without violating any transport contract. More spans of the same kind do not supply the missing judgment. Teams may already have more telemetry than they can read, yet still lack a record of what the agent intended, what informed its decision, and whether its action served that intent.

The six failure modes that live below the transport-success line

Tool-call and schema drift is the first mode. A call succeeds, but its payload no longer matches the schema the agent expects, so the model improvises. In the March 2026 logistics routing incident, a downstream API renamed incident_count to num_incidents, but the tool-schema was not updated to match. The agent produced incorrect routing decisions without an error log or alert until a human noticed the outcome drift.

Retrieval and context quality failures differ because the tool itself may be correct. Sherlocks’ analysis of 73 production incidents found that retrieval failures were the upstream cause in 61% of multi-layer failures. The agent called the right tool with the wrong context. Stale or malformed evidence can thus lead to a plan that looks sound and runs as though nothing is wrong.

Memory drift and long-chain goal loss are the third mode, where the agent loses sight of its original goal as it runs. Individual outputs can remain plausible throughout the chain. Planning and decomposition errors form the fourth mode, where a step solves the wrong subproblem even though it executes correctly. The distinction is where the departure begins. One loses the goal over time, while the other builds downstream work on a mistaken foundation.

Retry loops and cost spiral are the fifth mode. When tools fail over and over, context grows and the model makes more calls, even though each request can stay below its configured alert threshold. Silent quality degradation is the sixth mode, where output quality erodes until a customer complaint or finance reconciliation reveals the damage. These modes need not produce malformed final responses. Their defining evidence lies in contracts, context, goals, plans, budgets, and outcomes.

Why multi-step workflows break the single-call monitoring model

Single-call monitoring looks at one model request at a time. An agent workflow instead depends on planner-worker handoffs, tool inputs and outputs, state mutations, and decision rationale across the full run. Each step changes what later steps receive. Looking at calls on their own therefore leaves an action cut off from what made it wrong.

A failure at step 3 of an eight-step workflow can contaminate the input to step 4 and grow more consequential at step 5. By step 8, the problem visible in the workflow may look very different from the failure that started it. The later calls can all succeed technically. Their success does not correct the premise they inherited, and their individual logs do not establish where that premise entered the workflow.

The malformed CRM response illustrates this cascade. An API returns unexpected JSON structure, and the agent fabricates a plausible-looking output. The tool-call log says the call succeeded, while the final summary treats made-up revenue numbers as real data. Diagnosing that result requires the relationship between the returned payload, the agent’s interpretation, and the downstream summary. Additional latency measurements cannot reconstruct that relationship.

What a semantic-layer telemetry primitive actually is

A semantic-layer telemetry primitive is a step-level span enriched with intent, instruction adherence, and outcome correctness. It places every retrieval, tool call, and reasoning handoff within an inspectable decision chain.

The full context window records what the agent actually received, making retrieval failures and goal loss inspectable after execution. Tool arguments captured before execution expose the action the agent constructed. Where a framework exposes a plan or reasoning record, comparing it with the action reveals divergence between stated intent and tool choice. Step-level token and cost budgets set limits on retry loops at each step, where session-level measurements can hide them.

These fields support different kinds of diagnosis. Context distinguishes an evidence problem from an execution problem, while arguments distinguish an inappropriate action from an unexpected tool response. Budgets identify where repeated work consumes resources. Outcome judgments then connect those observations to whether the step was correct.

OpenTelemetry’s emerging GenAI semantic conventions provide part of this structure through invoke_agent, execute_tool, and chat/inference operations. These represent the full run, a tool call with arguments and results, and the model call respectively. The conventions were still marked Development in the supplied coverage, so attribute names may change. Extensions for MCP include mcp.method.name, mcp.session.id, and mcp.protocol.version, bringing protocol context into the same span structure without making the standard itself a correctness evaluator.

How the major agent frameworks expose — or withhold — the signals that matter

Framework coverage determines which parts of that structure are available directly and which require configuration. Microsoft Foundry’s documentation describes the Microsoft OpenTelemetry distro as a way to emit compliant spans for LangChain and LangGraph operations. Those traces are in the portal’s Observability > Traces view. This establishes an export path for those frameworks. It does not, by itself, establish that every semantic field needed for evaluation is captured.

Vercel AI SDK requires explicit telemetry registration through @ai-sdk/otel. The SDK’s migration guide states that OpenTelemetry span collection is no longer built into the ai package, and registration uses registerTelemetry(). MCP coverage also needs a qualification. Provider-executed tools do not produce an execute_tool span, so native-tool coverage cannot simply be assumed for every MCP or provider tool.

OpenAI Agents SDK includes tracing enabled by default, with spans for agents, model calls, tools, handoffs, and guardrails sent to its dashboard. The Traces dashboard exposes per-agent and per-tool-call detail. An official bridge, opentelemetry-instrumentation-openai-agents-v2 in opentelemetry-python-contrib, exports those spans over OTLP without an additional workaround. An alternative integration, openinference-instrumentation-openai-agents, emits AGENT or CHAIN, TOOL, and LLM spans classified through openinference.span.kind.

Mastra provides workflow observability through the separate @mastra/observability package. Step-level traces, input and output logging, and error-rate metrics require explicit configuration and a columnar storage backend, with OpenTelemetry integration for external export. Across these frameworks, the emerging convergence point is the gen_ai.* attribute namespace and OTLP export. Portability reduces dependence on a particular backend. It does not eliminate differences in what each framework exposes before an action or records afterward.

How do you know when an agent is giving wrong answers instead of crashing?

A trace records sequence, timing, arguments, and results, while evaluation judges correctness, adherence, and usefulness. An agent can complete every step and still choose the wrong tool, omit required work, use stale evidence, or return a fluent but useless answer.

Task completion coverage checks whether all requested artifacts and required fields were produced. Retrieval freshness checks evidence against the policy’s freshness window. Routing accuracy checks the full trace ID to see whether the request took the right specialist path. Reasoning-action agreement checks whether the tool call made was the one in the stated plan.

A refund agent illustrates the distinction between operational success and policy compliance. If it optimizes for customer satisfaction and issues refunds above policy limits, its calls can complete successfully while its decisions remain incorrect. A completion trace cannot settle that question. An evaluation tied to the refund policy can distinguish a resolved interaction from an unauthorized outcome.

The operational consequence is a change in alerting. Alerts for wrong answers must fire on evaluation scores. Production traffic is the relevant dataset for detecting current degradation, because an offline golden set does not reveal what changed in yesterday’s live requests. User ratings, corrections, retries, and human escalations add further evidence, including failures that both logs and evaluations miss.

The instrumentation layers that catch failures before users do

The engineering response is an ordered build of four instrumentation layers. The first layer captures the full context window at every reasoning step, preserving what the agent received. That record makes later comparisons meaningful. In the logistics incident, diagnosis depends on recovering the mismatch between the tool’s returned data and the expected schema, rather than inferring it from an incorrect routing decision alone.

The second layer records tool arguments before execution. With context already captured, those arguments allow the team to compare the evidence presented with the action constructed from it. A log of only the response leaves out that signal from before the call. This layer separates a bad decision made before the call from a problem introduced by the returned payload.

The third layer compares the exposed plan or reasoning record with the action taken. It builds on the argument record because intent cannot be compared with an action that was never preserved. When the plan and action keep diverging, that gives an early warning of context corruption. Where the framework does not expose a plan, a successful tool span leaves that comparison as a coverage gap.

The fourth layer applies token and cost budgets at the step level. These budgets make repeated work visible at the point where it accumulates, rather than only after the run consumes excessive resources. Together, the layers connect evidence, intent, action, and expenditure. Schema validation on tool contracts adds an explicit failure boundary. Sherlocks’ incident data found that tool-call failures with schema validation resolved in a fraction of the time required for observability failures detected only through downstream business signals.

Closing the loop from detection to verified fix without manual assertion writing

Detection becomes operationally useful when it supports diagnosis, a proposed fix, deployment, and verification. A semantic trace preserves the context needed to move through those stages without reconstructing the run from disconnected logs. Recurring failures also need a stable identity. Grouping them into named issues lets a team work on the pattern.

Prompt changes belong in that repair cycle because prompts are deployable infrastructure. A change that works in staging can regress a production behavior weeks later, making before-and-after production traces necessary evidence for the fix. An offline golden dataset alone cannot show that the failure seen in production has gone away. Verification must test the behavior that actually failed.

A grouped production issue already contains the input, reasoning record, tool calls, and output needed to generate a regression evaluation. That makes incident-derived evaluations more representative than assertions reconstructed manually from scratch. The trace, issue, and diagnosed root cause can also pass through MCP to a coding agent that proposes a fix in the engineer’s working environment. The evaluation then tests the proposed repair against the captured failure. Semantic telemetry becomes a reliability mechanism when its evidence survives all the way from the first wrong decision to a verified correction.

Sources

  1. Configure tracing for AI agent frameworks - Microsoft Foundry

More in Agent Incident Response