Why Recurring Agent Failures Get Misfiled as Model Problems and How Per-Layer Attribution Corrects the Postmortem Record
Tracing failures upstream to the harness layer can stop teams blaming models.

AI agent failure attribution by harness layer identifies whether a production failure began in the prompt, tool interface, workflow, memory, or model, rather than treating a wrong answer as evidence of a model defect. Recurring failures get misfiled because outcome signals hide those distinctions. Correcting the postmortem requires tracing the decisive error upstream, assigning responsibility to a component, and replaying the incident against a targeted fix.
Why outcome-level failure signals hide the originating layer
An engineer sees a failure flag, opens the trace, and finds no label identifying where to look. An incorrect answer produces a signal that names only the outcome. Single-error-event observability is useful for detecting that a run needs attention. It does not, by itself, distinguish a reasoning error from a broken tool contract, stale memory, or faulty recovery logic.
Raj et al.’s interaction-centric taxonomy identifies this as a repair-assignment problem. Agent behavior emerges from interactions among the model, harness, users, tools, memory, and environment, so the same visible symptom can have different origins. Those origins demand different repairs. A failed run might need model post-training, harness engineering, environment redesign, or benchmark repair. An outcome label cannot tell the team which intervention would improve the next run.
Why teams default to blaming the model when anything else could be responsible
Model-focused postmortems have a legitimate role when model behavior is the defect. If a more capable model could have prevented or recovered from a failure, teams treat that failure as model-side. This confuses recovery capacity with responsibility for the original error. A model might compensate for an ambiguous prompt without making that prompt well designed.
The taxonomy identifies the asymmetry in this rule. Model failures receive a dedicated category, while defects in tools, workflows, and memory can fall into it by default. When traces are long, that shortcut is harder to question. Under those conditions, a plausible model diagnosis can precede a complete account of what happened, routing work toward an upgrade before anyone examines the defective harness component.
What a layered taxonomy actually maps — the four component families and 41 failure modes

The interaction-centric taxonomy organizes 41 failure modes around interactions between components, assigning each failure to an interaction edge and a fault side. Its component vocabulary includes the model, task owner, grader, third party, context, memory, tool, and local and external environments. These distinctions locate the repair, not merely the symptom. Its four fault sides show where to make a repair: post-training for model failures, scaffolding and integration fixes for harness failures, execution-context redesign for environment failures, and benchmark repair for grader failures.
Within that structure, the harness has four tiers. Prompts can misdirect tool selection or argument construction, while tool interfaces can break contracts or obscure external effects. Workflow orchestration governs sequencing and recovery, and memory state can supply stale or incorrectly scoped context. These are distinct attribution targets. Across four frontier models used as independent judges, the taxonomy’s categories were recovered above chance, with the strongest judge reaching Cohen’s κ = 0.76 against human labels.
The three harness failure categories most often mislabeled as model failures in production
Tool schema drift appears externally as a wrong answer without an obvious execution error. That makes it resemble a reasoning failure. The originating defect is a tool interface built against an outdated database table, column, or API response structure. If nothing signals that the schema changed, the agent keeps building calls against the old contract. Outputs can be silently corrupted, leaving no exception to direct the investigation toward the interface.
With prompt ambiguity, the agent uses a valid tool for the wrong job. The call itself can execute without any error. A feedback generator updates user profile state, or a report reader rewrites reports, which makes it look as though the agent has poor judgment. Yet the defect is a prompt that does not enforce the tool’s intended scope. A model upgrade leaves that ambiguity in place.
Workflow loops appear as repeated action without completion. Retry loops repeat attempts without progress, tool loops continue calls without a decision, and clarification loops keep asking questions, leaving safe defaults and escalation unused. They look like failures of model judgment. However, an agent that cannot recognize completion and a harness with a broken exit condition produce the same symptom. The distinction is costly because a loop consumes compute continuously while an exit condition or retry cap can be a small harness change.
Why the step where a failure appears is rarely the step that caused it, and what that means for attribution

Nguyen-Thanh et al.’s SOAP framework describes downstream contamination in agent trajectories. Each step depends on preceding observations, so later actions inherit an earlier error and may amplify it. The strongest signal can therefore appear much later. In the paper’s browser example, a wrong click at step 12 opens an irrelevant page, while recovery attempts across steps 16–28 derail again. An independent scorer can favor step 24 or 28 even though the decisive error occurred at step 12.
CoLFA identifies the same displacement across agents, where a defect becomes visible only after a handoff and further processing. Continual Search also finds that one-shot judges can settle on a plausible diagnosis before examining critical evidence in longer traces. Reading forward until an obviously wrong action appears can therefore identify a downstream consequence whose source lies earlier in the trace. Attribution needs a method that propagates evidence upstream.
How do you pinpoint which layer of an AI agent stack caused a production failure?
“From Failed Trajectories to Reliable LLM Agents” introduces the Harness-aware Trace Intermediate Representation, or HTIR, to connect actions that isolated step reviews separate. It represents trajectories as TraceSteps and reconstructs TraceLinks covering data flow and control flow. Those links support step-level attribution with layer assignments. The diagnostic target becomes the responsible harness component at a particular step within a failed run.
Continual Search addresses a different weakness in attribution. It prompts a judge over successive turns to keep searching for unresolved evidence instead of stopping at an early plausible explanation. Within the same model family, lower-tier models using this approach can surpass higher-tier models making one-shot judgments. Search quality can outweigh model scale for this task. SOAP addresses contamination by deriving soft dependencies from attention patterns and propagating downstream evidence toward likely upstream sources, without requiring step-level training labels or a verified success-only reference set.
CoLFA organizes evidence around collaboration cues, including handoffs and cross-referenced content, rather than treating interleaved multi-agent activity as an undifferentiated log. HPFA instead compares a failed reasoning path with a successful reference path and concentrates on their divergence. Its hypergraph representation accounts for conclusions that depend jointly on several earlier derivations. These methods address different evidence problems and supply scores specific to those problems. Their common purpose is to preserve the dependencies needed to distinguish the originating error from its consequences.
How the harness becomes the intervention layer once attribution names the right component
Once attribution identifies a harness defect, the repair can target the mechanism that failed. For schema drift, a strict parser or validator can reject the tool call before the model sees the raw payload, avoiding wasted replanning. For ambiguous tools, narrow meanings can be enforced structurally, such as preventing a feedback generator from updating profile state. The repair changes what the interface permits. It does not depend on a more capable model consistently inferring an unstated boundary.
For retry loops, the recommended architecture keeps transient-error retries in the harness, using backoff and jitter and exposing only the final result or a typed failure to the model. Exit conditions and retry caps address the corresponding workflow defects. This makes the intervention specific and reviewable. Model weights set the range of reachable solutions, while the harness governs their reliability across repeated execution. When the harness is responsible, its policy and control layers offer the highest-leverage repair because they can be changed and deployed without retraining the model.
Why production traces are the only honest input for attribution and how to capture them reliably
Synthetic benchmarks can test defined cases, but they cannot supply the evidence of a particular production failure. Log summaries also omit the cross-step detail that attribution needs. To diagnose the failure, the team needs the incident trace. LLM calls, retriever queries, and tool invocations can be captured as parent-child OpenTelemetry spans, preserving the execution hierarchy for inspection. Layer-level attribution depends on preserving those distinctions.
OpenTelemetry GenAI semantic conventions remain at Development status as of 2026, providing a portable export path whose conventions have not yet stabilized. Beyond capture, an actionable trace needs labels for the responsible agent and the exact mistake step. Typed diagnoses should state the root cause, the evidence, the confidence, and a proposed fix. Practical observability also calls for low-friction capture, local-first storage with explicit scrubbing, and cost-aware analysis that separates free deterministic triage from opt-in LLM-depth analysis. A lightweight starting point is a filter for sessions where the same user retries a request within a short window, surfacing likely failures that users notice but never report.
How replay validation closes the loop from attributed failure to verified fix
Attribution produces a causal account whose proposed repair still needs testing. Replay supplies the missing test against the incident. It reruns the case against a candidate version using the same inputs and tool observations, checking whether a changed prompt, schema, skill, or harness configuration improves the failed case. That test needs tool-call logs, the decisions made by sub-agents, and the intermediate state. Without them, the team lacks the original failure as a replay target.
The loop starts when a user report, a rejection from internal validation, or a post-hoc audit flags a failure. A webhook sends the case to a triage queue, a reviewer labels what should have happened, and the case goes into the regression layer of the evaluation set. The candidate fix then faces that case before shipping. Live-traffic replay serves a different purpose from golden-set evaluation, which repeated prompt iteration can overfit while production behavior worsens. Langfuse supports converting a production trace into a dataset case and running an experiment against a revised agent, providing a concrete route from an observed wrong-tool choice to a tested revision.
How Moda operationalizes per-layer attribution and replay validation as a single production workflow
Moda is an agent harness engineering platform that ingests production traces and produces typed diagnoses assigning failures to the prompt, tool, workflow, memory, model, or product logic. It generates reviewable improvements and validates them against historical traces before recommending what to ship, connecting attribution to replay without requiring engineers to build that replay harness manually.
A prompt edit, schema fix, or workflow change can be inspected before deployment. The changes are made at the harness layer with no need for model retraining or fine-tuning.
Other options cover useful parts of this workflow. Langfuse combines production capture with trace-to-dataset conversion and replay experiments, while engineering work connects attribution to fix validation. OpenTelemetry GenAI, with traceAI agent and tool decorators, supplies portable capture infrastructure, leaving attribution to separate methods. Evaluate whether a tool closes the loop from attributed failure to verified fix or stops after handing the engineer a trace.
Sources
- Root-Cause Attribution Is a Search Problem: Continual Search for Long-Horizon Agent Failures
- Model or Harness? An Interaction-Centric Taxonomy forLocalizing Agent Failures
- Can Failed Trajectories Reveal Where Agents Go Wrong? Agentic Failure Attribution Without Step-Level Labels
- CoLFA: Collaboration-Guided Lightweight Failure Attribution for LLM-Based Multi-Agent Systems
- HPFA: Hypergraph-Based Paired Failure Attribution for LLM Reasoning
- AgentDebugX: An Open-Source Toolkit for Failure Observability, Attribution, and Recovery in LLM Agents


