Automatic Grouping of Recurring Agent Failures Into Actionable Issues
Grouping recurring agent failures by root cause turns trace alerts into fixable issues.

An agent can return success codes even as it repeats the same behavioral failure across hundreds of traces. Detecting those deviations is only the first step toward preventing them. Automatic grouping turns them into actionable issues by auditing behavior against the agent’s instructions, clustering failures by shared root cause, and giving engineers a defined problem to fix.
Why agent failures are hard to see even when you are looking
Traditional monitoring uses signals such as latency, error rate, and resource consumption to check whether software ran successfully. Those signals need not change when an agent fabricates an identifier that passes downstream validation or quotes policy terms that do not exist. The request completed, but the behavior was wrong. A better dashboard cannot resolve that mismatch if it displays only mechanical health. The missing comparison is between what the agent did and what it was supposed to do.
That comparison requires hierarchical, causally linked spans recording tool inputs, tool outputs, and intermediate decisions across the execution chain. Silent tool-call propagation shows why this detail is necessary. When a tool returns a broken response, the LLM can improvise around it and continue with corrupted context without raising an error. In a multi-step agent, an early planning mistake can likewise distort later actions while every subsequent operation completes. The final output is therefore not enough evidence to locate the origin of the failure.
Microsoft AI Red Team grew its catalog from 27 to 34 failure modes after twelve months of red-team engagements against agentic systems that had been deployed. Its v2.0 taxonomy covers failure patterns that open-source agentic frameworks, the MCP ecosystem, and computer-use agents brought to light but that the earlier, forward-looking framework had not foreseen. Capability expands the failure surface as well as the task range. These failures are not interchangeable, because an incorrect plan and a broken tool response require intervention at different layers. Observability must preserve those distinctions before engineers can diagnose either one.
What happens when failures go ungrouped — the alert flood problem
Once behavioral evaluation starts exposing these deviations, silence can give way to a different operational failure. An agent handling thousands of daily requests produces thousands of traces, and a trace-level evaluator returns individual flags. Engineers still cannot tell whether five hundred flagged traces come from one underlying defect or five hundred unrelated failures. The missing unit is an issue.
Different user requests, tool responses, and conversation positions can disguise a shared cause, leaving engineers to inspect examples, form a hypothesis, and patch the behavior they happened to see. A longitudinal production study of a personal-assistant agent runtime documented 22 incidents with full postmortems over eight weeks. Across those incidents, one meta-pattern recurred, namely a failure whose error signal never reached a human in actionable form. The operational process repeatedly failed to make recurrence recognizable.
Tool selection accuracy can fall while top-line task success barely moves, so a team watching only final outcomes may miss the regression. Grouping traces by what went wrong gives those sub-metric changes a diagnostic context. It connects a deteriorating behavior to a set of executions engineers can investigate together.
What automatic grouping actually does to a raw trace stream
Automatic grouping begins by auditing each trace against the agent’s intended task, permitted tools, and operating constraints. This produces a description of the deviation rather than a judgment based only on the final answer. Intent comes before similarity in this pipeline. Two outputs can look alike while violating different instructions, and two very different outputs can result from the same broken tool interaction. A trace viewer supplies execution evidence, but the audit supplies the task context needed to interpret it.
The next stage clusters deviations by structural fingerprints in that evidence. These can include the same tool failing at the same step, the same instruction being ignored, or the same reasoning branch producing the wrong output type. The purpose is to group executions an engineer would diagnose as the same bug after inspecting them individually. One implementation approach uses HDBSCAN clustering over trace embeddings, with UMAP visualizations and groups ordered by drift or divergence from a baseline. That ordering can surface degraded groups first, but it does not replace the need for a shared cause within each group.
A cluster becomes an actionable issue when it has a failure category, a defined set of affected traces, representative examples, and an affected trace count. The label determines where the investigation should lead. A planning error leads engineers to check the planner prompt and a plan-vs-execute evaluator, while a tool error leads them to check schema guards and retry policy. The fixes belong in different places, even if the answers users see look equally wrong. The resulting issue lets an engineer assess the failure and its recurrence without reconstructing the pattern from every trace.

Why auditing against the agent's own instructions is the non-negotiable part
The audit establishes what counts as a deviation, so every later grouping decision depends on its reference point. An agent’s instructions define the task it should complete, the tools it may use, the constraints it must respect, and the outputs that are out of policy. Generic quality scores cannot stand in for that specification. Fluency, coherence, and factual plausibility describe qualities of an answer. An audit can score all three favorably while missing the actual failure.
Consider a hypothetical fintech agent quoting a promotional rate that does not exist. Its response could be confident and well formed while violating the policy it was supposed to follow. Requiring engineers to enumerate every such failure in advance is not a workable substitute for auditing against intent, because agent behavior is non-deterministic and its failure space grows with capability. The MAST study maps failures to system design issues, inter-agent misalignment, and task verification. It attributes a large majority to specification and coordination problems, making the intended specification central to diagnosis.
The same dependence applies to adversarial behavior. The Microsoft taxonomy adds goal hijacking, in which the agent’s terminal goal is silently redirected, and inter-agent trust escalation, in which false identity or inflated permissions go unchecked by an orchestrator. Detecting these deviations requires a comparison with the agent’s authorized purpose and permissions.
Incomplete instructions are the strongest limitation of this approach. An audit cannot turn a vague specification into a precise statement of intended behavior, but repeated deviations around that ambiguity can expose the specification gap as an issue. Sometimes the instructions themselves need to be fixed.
What grouped issues look like in the workflows where engineers actually work
On Monday morning, an engineer needs an issue that supports triage. A Slack alert containing the failure category, affected trace count, and a representative example presents the recurring behavior where the team already communicates. The engineer can assess the pattern before opening the individual traces. By contrast, a cluster confined to a monitoring console still requires a context switch before the work can begin. Delivery is part of the operational design.
The category label also gives the issue an owner. A planner failure can reach the engineer responsible for the planner, while a tool integration failure can reach the team responsible for that integration. Structured delivery to a coding agent can go further by triggering a fix attempt within the engineer’s existing environment. The issue carries the same details about the failure through each of these channels. To be useful, it must keep the cause, scope, and supporting evidence that a generic notification would leave out.
That evidence requires an integration deep enough to capture it. Relevant frameworks include Vercel AI, OpenAI Agents, LangGraph, and Microsoft Agent Framework, because the observability layer must read the traces the agent framework produces. Coverage depends on what the audit can see. After a fix, the cluster’s traces can become regression cases in continuous evaluation. That moves the issue from the communication channel into the CI workflow, where a later deployment can be tested against the same failure pattern before it reaches users.
The three things that separate a grouping system that helps from one that adds noise
Teams weighing a grouping approach, including one they build themselves, should use three tests. The first is root-cause coherence. An engineer who inspects each trace on its own should find that the executions share a cause beyond similar wording in their outputs. Structural fingerprints provide the basis for that judgment. A mixed cluster can be worse than an ungrouped queue because it directs the investigation toward a false common explanation.
The second test is fix-routing accuracy. Planning, tool, retrieval, reasoning, and safety/policy failures require intervention at different layers, so the category must distinguish mechanisms. A planning error treated only at the output scanner layer can recur because the planner remains unchanged. The label must identify a repair surface. A system must distinguish a tool error from a reasoning error to provide diagnostic guidance.
The third test is regression-test stability. Traces from a grouped issue should be usable in an evaluation dataset, with the same root-cause pattern consistently recognized rather than drifting in and out as clustering runs again. This is a requirement that the boundary represent the failure engineers intend to prevent. Teams building a smoke tier, a regression tier, and a long-tail tier of production-incident-derived cases depend on that consistency to make the incident tier reliable.
These tests apply at different points in the repair process. Coherence establishes a shared problem to investigate, routing directs the proposed intervention to it, and stability makes the repaired behavior testable over time. A strong result on one cannot compensate for a weak result on another. A coherent cluster with a misleading label still sends the fix to the wrong layer, while a correctly diagnosed but unstable group is difficult to reuse as a regression case.

Building the production reliability loop that grouping makes possible
Once grouping meets those tests, production failures can enter a continuous reliability loop. Traces are audited against intent, deviations are clustered by root cause, and labeled issues route fixes to the appropriate layer. After the fix, the cluster provides regression cases for the next deployment. Each pass expands the evaluation suite with failures the agent actually produced.
CI checks known failure patterns, while production auditing exposes behavior that no curated test set predicted. Grouping links the two by turning raw executions into test material organized by root cause. Task success rate alone will not show whether that process is working. More sensitive signals include tool selection accuracy, plan-vs-execute divergence rate, and policy violation rate per failure category, which can move before aggregate success changes.
For teams building on MCP, the same process can expose protocol-level gaps as recurring, categorized issues. Missing identity propagation, absent adaptive tool budgeting, and unstructured error semantics then become specific diagnostic patterns. They enter the same repair and regression process as other failures.
The durable benefit is the growing record of failures the team has made testable. Without that record, a new incident can demand the same investigation as an earlier one because its relationship to past failures remains unclear. With stable grouped issues and regression cases, engineers have evidence for distinguishing recurrence from a newly exposed problem.
Sources
- New whitepaper outlines the taxonomy of failure modes in AI agents
- Silent Failure in LLM Agent Systems: The Entropy Principle and the Inevitable Disorder of Autonomous Agents
- Updating the taxonomy of failure modes in agentic AI systems: What a year of red teaming taught us
- Model or Harness? An Interaction-Centric Taxonomy for Localizing Agent Failures


