Why Weird Traces Stay Weird Without Automatic Failure Grouping

Non-deterministic agents hide identical failures behind different traces without semantic grouping.

· 8 min read
Cover illustration for “Why Weird Traces Stay Weird Without Automatic Failure Grouping”
Agent Failures · November 5, 2026 · 8 min read · 1,745 words

Automatic grouping of recurring AI agent failure patterns connects traces by what went wrong. Because agent behavior is non-deterministic, the same root cause can produce radically different traces. Without semantic grouping, investigation starts over with each anomaly instead of building a reusable record of failures, fixes, and regression tests.

Why non-determinism makes two traces of the same failure look nothing alike

An engineer looking at two anomalous traces may think they are related without seeing a shared signature. The conversations are different, the tools appear in different orders, and the final answers show no clear link. Both may reflect the same planning failure. Yet a planning failure in run #7 can share no surface similarity with one in run #412, leaving the investigator without the repetition that normally makes a recurring bug recognizable.

In traditional software, the same bug often reproduces the same stack trace, giving engineers a stable basis for comparison. An agent’s path instead depends on model temperature, retrieved context, prior memory state, and tool response timing. Those conditions change between runs, so the failure can unfold differently even when it has the same cause.

A single user prompt can trigger a dozen internal tool invocations, vector database queries, and self-reflection steps before producing an answer. An exception-free completion with HTTP 200 responses says little about whether those decisions were sound. Step-level tracing is therefore the minimum viable observability signal, while a pass/fail health check leaves the internal chain invisible.

What silent failures look like in production, and why they produce no alert

The most dangerous failures complete successfully by conventional measures while doing the wrong thing. Their defining property is silence. A 2026 analysis found that about 70% of silent failures were caught by people examining what the user sees. Detection depended on someone recognizing that a technically successful result was substantively wrong.

In their June 2026 arXiv work, Liu et al. reported silent failures they saw while watching 100,000+ agent interactions in production over the long term. They describe unexpected deviations under normal conditions as a structural property of LLM agent systems. Their Entropy Principle formalizes how disorder accumulates with interaction rounds. In their opening scenario, a multi-agent system runs reliably for weeks before Agent A fails to pass critical context to Agent B on day 47, without a code change. The task completes, but the operator notices the degraded output three cycles later.

An agent fabricates a non-existent SKU in its first step, after which four downstream API calls price, stock, and ship the phantom item. Every call succeeds even though the item does not exist. Monitoring that looks for failed requests has no reason to raise an alert, because the failure belongs to the meaning of the sequence. When failures give no conventional signal, finding related runs means grouping traces by what went wrong semantically.

Why failure taxonomies exist — naming a failure type is the prerequisite for grouping it

Semantic grouping needs a vocabulary that distinguishes causes from their visible effects. Without agreed names, a reasoning error that cascades into a bad action can be labeled differently depending on which span an investigator examines. That changes where the proposed fix lands. A taxonomy makes the distinction explicit, so that grouping does not attach an action-layer patch to a reasoning-layer problem.

The Microsoft AI Red Team built its v2.0 taxonomy from 12 months of red team engagements against deployed agentic systems and added seven failure mode categories to its April 2025 v1.0. The update distinguishes failures unique to agentic systems from existing failures amplified by agentic behavior. Its categories address agent compromise, injection, impersonation, and flow manipulation, as well as memory poisoning, cross-domain prompt injection, and human-in-the-loop bypass. The distinction connects a failure’s name to the mechanism that makes it possible.

The MAST taxonomy approaches the problem through Grounded Theory analysis of 150 traces across five multi-agent system frameworks. It has 14 failure modes in three categories, which are Specification Issues, Inter-Agent Misalignment, and Task Verification. These show whether failures happen when the task is set up, when agents coordinate during execution, or when they check intermediate or final results. They also correspond to natural layers of a trace’s span tree.

These independent efforts make naming more than an administrative exercise. Their convergence suggests that recurring failure families reflect real structure across architectures. Traces can belong together because they violate the same requirement, even when their visible paths diverge.

How ungrouped traces force teams to reinvestigate the same failure from scratch every time

The operational cost becomes clear in the recurring on-call scenario where six engineers examine the same failing conversation cluster and reach different diagnoses. One sees hallucination, another prompt regression, and others suspect retrieval drift, a vendor side effect, or a new tool. They are looking at symptoms without a shared classification. The incident closes with a one-off prompt tweak and a vague action item to “add a guardrail.”

No eval is written, so a later deploy can silently undo the fix. The guardrail action item does not identify whether it belongs in the planner, retriever, or output scanner, leaving ownership to whoever is least busy. The response consumes engineering time without producing a specific, testable account of the failure.

Two months later, the same failure recurs. The team cannot tell whether the earlier fix regressed or a different failure mode now shows the same symptom. Investigators must reconstruct intent, inspect the internal decisions, and debate the diagnosis again. A stored trace preserves evidence, but without a labeled relationship to other traces it does not preserve the diagnostic work needed to interpret that evidence.

Over longer periods, drift deepens this uncertainty. An agent can work at launch and degrade as the business changes, while missing input and output monitoring leaves that degradation invisible until a complaint or incident. In an ungrouped environment, the practical consequence is a growing set of failure variants that investigators have not connected to reusable categories.

Where tool-layer failures generate the most ungroupable traces

At the tool layer, this gets harder because tool failures interact with the agent’s non-deterministic decisions. A small set of root causes can produce many visible signatures depending on how the agent responds. The tool response is only the beginning. What follows may look like a reasoning error, a planning error, or a successful sequence with an invalid outcome.

MCP has become the de facto standard for connecting models to external tools, making this boundary important for both reliability and security. The Microsoft team documented 99 CVEs in MCP-related software in 2025, while its updated taxonomy includes MCP/Plugin Abuse among the new categories. Tool poisoning is no longer only a theoretical concern. For trace investigation, however, the central difficulty is how an agent transforms a bad tool interaction into a different-looking downstream failure.

For example, a tool invoked with wrong arguments may return a 500, after which the agent leaves the error unhandled and fabricates a plausible response. The visible symptom then resembles faulty reasoning. A brief upstream outage can instead trigger repeated calls that all succeed once the service recovers. The CreateLimitRequest example produced three duplicate requests, all HTTP 200, so successful status codes obscured the retry failure.

Complex MCP tool schemas fill the context window, degrading retrieval and leading the agent to hallucinate arguments or select the wrong tool. The trace looks like a planning failure even though tool schema overhead helped cause it. GitHub Copilot’s reduction from 40 tools to 13 and Block’s Linear MCP server’s reduction from 30+ tools to 2 suggest that this diagnostic difficulty is partly architectural. More tools create more failure surface and more varied signatures for investigators to distinguish.

How automatic grouping detects recurring failure patterns and makes investigation compound

Effective grouping compares intended behavior with actual behavior by auditing each trace against the agent’s instructions and grouping deviations into actionable issues. This lets teams build categories from what agents do in production without having to predict every failure mode before deployment.

Teams cannot know every failure their agent will exhibit in advance, and a fixed list can leave new deviations unnamed. But categories do not have to be exhaustive beforehand. Instructions supply the reference for detecting a deviation, while recurring deviations supply the basis for grouping.

Once a cluster has a name, it becomes a more useful unit of postmortem than an isolated symptom. A planner-side failure can be routed to the planner. The cluster also supplies labeled examples for regression evaluation, giving the next deploy a defined failure class to test against.

Category-level tracking also exposes regressions that aggregate charts can conceal as normal variance. A 2026 release-gate eval discipline uses a ~3% regression threshold to block deploys, illustrating how named, tracked failures can support an enforceable gate. A system that only retrieves similar-looking errors still leaves semantic classification to investigators, whereas automatic failure grouping connects detection, ownership, and regression testing across agent runs.

What teams can do before automatic grouping is in place

Every tool invocation, retrieval, and self-reflection step should be a named span with its inputs and outputs logged. This gives an investigator the raw material to reconstruct the causal chain. It does not connect related failures automatically, but without it, manual grouping depends on guesses about decisions that the final answer does not reveal.

Tool boundaries should also expose structured failure semantics alongside HTTP status codes. Error categories and retryable flags help distinguish conditions that require different handling, reducing the range of signatures one cause can produce. The retry-storm case illustrates why that distinction is necessary. A retryable flag distinguishing a transient upstream outage from a permanent failure would have prevented the duplicate-call pattern described in the CreateLimitRequest example.

Postmortems should then assign each incident to a named category before closing it. Microsoft, MAST, and WOWHOW provide starting vocabularies, so teams do not have to invent every label themselves. The purpose is to replace “AI agent hallucinated again” with a diagnosis tied to a specific failure surface. That diagnosis can support an eval and give the next investigator a relevant set of earlier cases.

These measures improve the signal on known failures. Their limitation is that a person still has to identify, inspect, and group each case, so the work scales with headcount. A silent failure that leads to neither a complaint nor an on-call page may never reach a postmortem. Automatic grouping fills that gap by checking every trace, including runs that look successful and give people handling incidents no reason to open them.

Sources

  1. Microsoft Updates Taxonomy of AI System Failure Modes
  2. Updating the taxonomy of failure modes in agentic AI systems: What a year of red teaming taught us
  3. Silent Failure in LLM Agent Systems: The Entropy Principle and the Inevitable Disorder of Autonomous Agents
  4. Diagnosing with Insights: Structured Analysis of Agent Failures via Behavioral Abstractions
Filed underAgent Failures

More in Agent Failures