Behavioral Signal Extraction as the Foundation of Agent Health Monitoring

Recording what agents decide at each step catches failures that green dashboards miss.

· 8 min read
Cover illustration for “Behavioral Signal Extraction as the Foundation of Agent Health Monitoring”
Agent Hallucination · November 20, 2026 · 8 min read · 1,909 words

Silent failure detection for AI agents in production needs behavioral signal extraction as well as infrastructure monitoring. Behavioral signals record the context, stated intent, tool arguments, and actions at each execution step, allowing monitoring to detect wrong decisions even when requests complete successfully. These signals form the foundation of agent health monitoring when they feed recurring-issue detection, operational alerts, and regression evaluations.

Why HTTP 200 cannot tell whether an AI agent is giving wrong answers

For nine days in May 2026, a support-triage agent was wrong about one ticket in fourteen. Its p95 latency held steady, its error rate read clean, and its uptime stayed green. The failure was entirely in the reasoning layer. Conventional monitoring could establish that requests completed, but it could not distinguish correct routing from a successfully executed mistake.

A logistics routing agent had the same blind spot in March 2026. A downstream API renamed incident_count to num_incidents, but the tool schema was never updated. The agent produced incorrect routing decisions for weeks while responses remained well-formed and monitoring reported all-green. A human eventually noticed drift in outcomes.

Microsoft Research defines a gray failure by differential observability, where at least one application observes an unhealthy system while the monitoring observer sees a healthy one. That distinction describes these incidents precisely. Exposing the wrong decisions required evidence about their meaning beyond latency measurements. The observability gap is not a shortage of telemetry but the absence of evidence about whether the agent acted correctly.

What behavioral signals are and how they differ from infrastructure telemetry

Behavioral signals are records of what an agent decided at each reasoning step, extracted from execution traces. Infrastructure telemetry describes whether a step ran, how long it took, and whether it threw an error. Behavioral signals describe the context it received, the tool arguments it constructed, any exposed plan, and the action it took. The distinction is between execution and decision quality.

That distinction gives monitoring a different question to answer. Did the agent make the right decision, given what it was told? Tool-appropriateness signals assess whether the selected tool fits the stated intent, while routing accuracy assesses whether the request reached the correct specialist. Retrieval freshness concerns the evidence used, task-coverage completeness concerns required artifacts, and reasoning-action divergence concerns whether the action matched the stated plan.

These signals also differ from customer-outcome signals. User ratings, repeat contacts, and churn come after the agent’s behavior has affected the user, but behavioral signals can be drawn from execution as it happens. An agent can route a billing request incorrectly, summarize before retrieval, or reuse stale evidence without producing an exception. Catching that decision mid-flight gives the team a chance to step in before the failure becomes an outcome signal.

Where agents actually break: the six-layer failure stack behavioral signals must cover

Tool-call and schema drift is the first layer. An agent may select the right tool but use an outdated or mismatched schema, leaving a well-formed response that no longer means what the agent expects. The logistics incident illustrates this structural mismatch. Signals at this layer must distinguish a successful tool invocation from a response that satisfies the expected contract.

Retrieval and context quality is a separate class of failure. Here, the tool may be correct while the evidence is stale, malformed, or drawn from the wrong context window. In multi-layer incidents, retrieval failure is often the upstream cause. Memory and long-chain drift differs because the agent loses its original goal over time, producing outputs that look plausible individually but fail when assessed against the full sequence. Memory poisoning compounds this risk when one injected instruction persists across subsequent sessions without another triggering event.

Planning and decomposition failures concern the subproblem itself. A step can execute correctly while advancing the wrong plan, and its output can corrupt the state used by later steps. Permission boundary violations arise when an authorized action does not fit the stated goal. Technical authority does not establish task-level legitimacy, so behavioral logging must expose the relationship between purpose and action.

Observability failures complete the six-layer stack. In this class, the failure has no monitoring detection time because discovery comes through a support ticket, billing discrepancy, or customer complaint. It takes longer to recover than it does from tool failures caught through schema validation.

Diagram: The Six-Layer Agent Failure Stack. Visualizes: Visualize the six distinct failure layers an AI agent can exhibit, ordered from most structurally detectable to least: (1) Tool-call & schema drift, (2) Retrieval & context quality, (3) Memory…

Why the failure surface is worse in multi-step and multi-agent workflows

Multi-step workflows pass decisions forward as state. A slightly incorrect parameter can become valid input to the next step, allowing each later operation to complete while moving further from the original goal. By step 15, the output may be completely wrong even though no individual step raised an error. Input-and-output monitoring exposes the result but does not necessarily locate the upstream decision that caused it.

Cases on the LangChain forum show custom state updates being silently dropped when control returns from a sub-agent to its parent. The parent then reasons from incomplete state without an execution error. Cross-agent traces are also needed when two agents each meet their own goals but together cause harm, because looking at either agent alone does not reveal the failure of the system.

The damage can persist beyond the original run. Errors written to memory, vector stores, or knowledge bases continue influencing decisions after the original source has been corrected. Operational costs can compound too, as the fintech fraud-detection agent’s retry loops demonstrated through multiplied token consumption. Behavioral monitoring therefore covers both decision quality and resource use, rather than treating cost escalation as unrelated to agent behavior.

How to structure a behavioral signal extraction pipeline

For teams implementing this approach, the pipeline needs four instrumentation layers, progressing from context to structural checks, intent comparison, and resource budgets. The first layer captures the full context window passed to the agent at every reasoning step. Final-output logging cannot provide this evidence. When retrieval fails, diagnosis depends on what the agent actually received.

The second layer validates tool contracts and outputs. Tool arguments should be captured before execution, and schema validation should flag empty payloads, null values, and unexpected JSON structures as exceptions at every output boundary. This catches structural failures that context capture alone only records. Validation belongs before a returned payload becomes trusted input to the next reasoning step and contaminates the chain.

The third layer compares intent with action. Where a framework exposes a plan or chain-of-thought before an action, the pipeline can capture that stated intent and compare it with the proposed tool call. Systematic divergence is an early signal of context corruption or planning failure. This comparison must happen before execution to flag a harmful action in time, since a check afterward can only explain what happened.

The fourth layer sets token and cost budgets for each step. A retry loop that doubles consumption on one step is easier to isolate at step resolution than in aggregate session logs. Task-coverage fields, retrieval freshness scores, duplicate tool-call rates, and router-to-specialist accuracy help show whether the work that was completed was useful.

OpenTelemetry has a wire format that lets these fields work with the tracing infrastructure already in place. Framework support is not uniform. LangGraph requires external instrumentation, while the OpenAI Agents SDK has a built-in tracer whose output requires an adapter or instrumentor for OpenTelemetry compatibility. Behavioral fields can enrich those traces without requiring replacement of the surrounding monitoring system.

Diagram: Four-Layer Behavioral Signal Pipeline. Visualizes: Visualize the four instrumentation layers of a behavioral signal extraction pipeline, in sequence: Layer 1 — Capture full context window at every reasoning step; Layer 2 — Validate tool…

Turning raw behavioral signals into actionable issues rather than trace noise

A separate alert for every anomalous trace reproduces the overload that already makes infrastructure telemetry difficult to use. The useful unit of triage is a recurring failure class, such as routing errors, stale retrieval, or schema drift. Grouping turns repeated observations into a problem that can receive a fix.

An actionable issue identifies the affected traces, the shared failure pattern, and the step where the behavior diverged. That context connects an alert to diagnosis. It also gives the team a way to assess whether a correction holds across the whole class. Alerting on grouped issues can expose repeated mistakes before complaints or churn become the first visible sign.

The contrast with observability failures is operationally significant. When no grouping or alerting exists, downstream business signals become the discovery mechanism, and recovery includes reconstructing what happened. Schema validation shortens that path for structural tool failures by exposing the fault at its boundary. Behavioral grouping does the same for failures that come to light when decisions are compared and that a single payload check would miss.

Using production failures as the input to evaluation, not the end of the story

A grouped production failure supplies an evaluation case drawn from traffic the agent actually encounters. This gives it a different role from a hand-written assertion about expected behavior. The context and action from the failure show the exact condition the fix must address. Once that condition becomes a regression case, monitoring contributes to preventing recurrence.

Online evaluation applies this process to arriving traffic. Deterministic checks run on every interaction, while LLM-as-judge scoring runs on a sampled share. People must curate static offline test sets by hand, while online evaluations built from production failures can change as new failure modes appear. The two approaches differ in how they acquire cases and when a score is calculated.

A well-intentioned prompt change can break a class of requests without causing an infrastructure error. The recommended controls are an evaluation on every prompt change and an alert on task success rate after deployment. When regression appears, the runbook is to revert the change and triage outside production, with a runtime flag making reversal faster.

MCP can provide a channel from detection to a proposed fix. A monitoring agent can retrieve failing traces through an MCP-exposed experiment API and dispatch a coding sub-agent to draft and test a prompt correction. This removes the need for a human to assemble the diagnostic context manually. It does not make the proposed correction equivalent to a verified production improvement.

Decagon’s Duet Autopilot, introduced in June 2026, provides a production example of the broader feedback loop. The product analyzes conversations, traces failures to agent operating procedures, and proposes changes. Each proposed change is tested against the original failing conversation, regression tests, and a curated golden set that covers customer personas before a person reviews it. The production failure becomes both the reason for the change and part of its test.

What a mature behavioral monitoring setup looks like across different agent workflows

Customer support monitoring must distinguish genuine resolution from apparent containment. A flat containment dashboard can conceal a queue filling with repeat callers, so routing accuracy needs to be tracked with ratings and escalation rates. Swiss Life’s routing agent has 96% routing accuracy.

Finance and CRM workflows require greater emphasis on actions. Agents can send emails, update records, trigger refunds, and open tickets, so prompt injection can produce an irreversible business event. The recommended controls include write-ahead logging for sensitive fields, dual approval for actions with a greater impact, and reasoning-action comparison before execution. Quality targets also differ, because customer-service tier-1 workflows may tolerate a lower task success rate than financial compliance workflows.

The AWS Cost Explorer deletion and Replit database wipe cases share a structural cause, with authority to act but no runtime comparison between the intended goal and proposed action. Here, the decisive signal is the mismatch before execution. Across these workflows, the trace structure remains consistent, recording context, intent, action, and outcome at each step. What varies is the weight assigned to each signal.

More in Agent Hallucination