Why Generic Tracing Attribution Collapses Under Multi-Hop Agent Architectures and What Harness-Aware Systems Do Instead
Flat traces hide where multi-hop agents fail; harness-aware attribution finds the layer.

AI agent failure attribution by harness layer identifies the agent–step pair that introduced an error, then maps it to the prompt, tool, memory, or workflow component responsible. Generic flat traces obscure that origin because failures can propagate across many hops before becoming visible. Harness-aware systems reconstruct those dependencies and use replay to test whether correcting the suspected layer recovers the execution without degrading other traces.
Why flat traces fail multi-hop agents: the structural mechanism
Deterministic software debugging benefits from predictable execution paths, so stack traces can connect an error to the code that produced it. Multi-hop agents break that proximity. The step that introduces an error and the step that exposes it may be separated by several agents, each acting correctly on the input it receives. More chronological text does not supply the missing dependency relationships.
Standard APM tools capture latency, throughput, and error rates, but treating agents as microservices does not explain how their outputs influence later reasoning. When Agent B sends a payload to Agent C, timing alone cannot reveal that Agent A already corrupted its contents. The error crosses a trust boundary. A small parsing mistake becomes input that looks valid, and a later agent draws wrong conclusions from premises it had no reason to reject. The final answer therefore implicates the last agent while concealing the earlier fault.
Error-Propagation Modeling for Failure Attribution in LLM-Based Multi-Agent Systems, or EMFA, names two compounding patterns in its 2026 work. Cascading error propagation spreads an early deviation through subsequent decisions, while persistent interaction loops keep agents acting without substantive progress. Both require a view beyond individual outputs.
What off-the-shelf models actually achieve on failure attribution
AgenTracer (2025) reports generally sub-10% accuracy for state-of-the-art reasoning LLMs on failure attribution tasks. Without structured representations, even strong models struggle to find the step that caused the failure in multi-agent traces. Their reasoning capability does not compensate for an input format that obscures the execution’s dependencies.
VerifyMAS identifies two reasons for that gap. Direct prediction of faulty agent–error pairs creates a large combinatorial search space, while agent-first approaches bias diagnosis toward local interaction context. Each agent’s logs reveal only part of the trajectory. Cross-step inconsistencies and coordination errors may thus stay hidden even when one agent’s record makes sense on its own. A plausible explanation of one agent’s behavior is not necessarily an explanation of the system’s failure.
TraceElephant reports that full execution traces improve attribution accuracy by up to 76.5% over partial-observation counterparts. Inputs and context change what the diagnosing model can infer. Output-only traces omit evidence needed to distinguish an introduced error from an inherited one. The performance gap thus supports changing how traces are presented for diagnosis before asking a smarter model to make sense of the same flat logs.
What failure attribution actually requires: the decisive agent–step pair
The Who&When problem formulation defines the decisive error as the agent–step pair whose correction would recover the failed execution. This is a precise counterfactual target. “Something went wrong in Agent B” does not meet it, because Agent B may only have propagated a fault created elsewhere. Useful attribution tells apart the step that caused the error and the steps that worked correctly with the damaged inputs they received.
EMFA makes that distinction through two typed dependency relationships. An error_shift relationship identifies a candidate step that may introduce or transform an error, while a follow_up relationship marks propagation from an earlier step. EMFA models propagation and persistent loops before applying counterfactual verification to separate recoverable errors from downstream symptoms.
The practical target is therefore not simply the earliest suspicious event. It is the consequential divergence whose correction changes the outcome. For a cascade, that requires following dependencies backward through inherited errors. For a persistent loop, attribution must also explain the absence of substantive progress across repeated interactions, which cannot always be localized by inspecting one action in isolation.
How structured trace representations make attribution tractable
Adaptive Influence Graphs for Failure Attribution in Multi-Agent Systems shows that attribution depends on both the diagnosing model and how a trace is represented and explored. Its fact-checking example illustrates the consequence. A raw log directs attention toward the visible symptom, while the structured graph supports attribution to the actual origin of the same failure. The execution has not changed, but the evidence available for reasoning has.
The representation ladder begins with grouping consecutive steps from the same agent into segments. That reduces noise without yet explaining dependencies. An Influence Graph adds summaries of what each segment received and produced, with edges showing how earlier outputs were inherited downstream. An Adaptive Influence Graph builds that structure separately for each failed trace, and a critic–refiner audits its structural and semantic consistency.
CHIEF (Wang et al., 2026) takes a similar approach by turning flat logs into hierarchical causal graphs. Evaluated on 184 failure logs, it distinguishes a planner that repeats a bad plan despite error feedback from an executor that fails to carry out a valid instruction. Roles become part of the diagnosis. AIG research also finds that agent-directed traversal outperforms a single-call reader over the same graph, because the reader can inspect underlying steps, follow influence links, and verify graph claims before selecting the decisive step.
Which harness layer caused the production failure?
The harness is the code that coordinates prompts, tool calls, subagents, control flow, memory, and workflow logic. Its seven components are system prompt, tool description, tool implementation, middleware, skill, sub-agent configuration, and long-term memory. Each is a distinct failure surface. An ambiguous instruction, outdated definition, or misconfiguration can introduce the decisive error, yet a flat trace collapses these components into one stream. Attribution becomes actionable when it names the component that needs changing.
LangChain reported in February 2026 that its coding agent did much better on Terminal-Bench 2.0 after changes to the harness, while GPT-5.2-Codex stayed unchanged. The model was not the variable that changed. How the harness is set up can decide whether the same model succeeds or fails.
A practical incident taxonomy separates tool schema drift, prompt ambiguity and drift, and workflow loops. Tool schema drift occurs when an external API changes but the agent continues using an old signature. Prompt drift can silently degrade quality as prompt edits, model updates, and schema changes compound. Workflow loops have a different signal. Tool call counts above the P99 of their historical distribution can indicate an agent stuck in repetition or confusion, giving investigators a measurable starting point for diagnosing a “bad answer”.
How OpenTelemetry GenAI conventions give harness layers their own spans
The OpenTelemetry GenAI semantic conventions provide a standard vocabulary for typed, attributed, hierarchical units of work. Traditional text logs list events in timestamp order, while agent tracing shows how the run unfolded as a span tree. That hierarchy supplies an investigative path. It can connect a failed tool invocation to its surrounding agent and workflow context.
The conventions define execute_tool child spans for tool invocations, including latency, error state, and inputs when collection is enabled. They also define invoke_workflow spans for coordinated multi-agent processes. These spans support different diagnostic questions. Tool-level evidence helps distinguish schema drift from incorrect arguments, while workflow invocations can be counted against historical baselines to detect loops. Parent-child relationships reconstruct execution dependencies that flat text erases.
Instrumentation provides the structure and evidence on which attribution depends, and input collection remains an explicit consideration for each trace. The conventions remained at Development, or pre-stable, status throughout 2026, with growing but fragmented adoption across vendors and frameworks. They are therefore a practical infrastructure foundation with implementation-specific coverage and fidelity across harness layers.
Why replay-based validation is required before shipping any harness change
Once attribution points to a harness layer, the natural next step is to edit that layer. Diagnosis alone does not validate the edit. Non-deterministic behavior means the same input can produce different outputs, so a passing unit test cannot establish that a change generalizes. A prompt correction that repairs one failed trajectory may also degrade adjacent trajectories where the original harness worked.
The Chronicle framework (2026) formalizes trace-level replay as regression testing at cut-points. Replay preserves prompts, agent state, and tool arguments so that investigation can isolate the sub-trajectory that broke. The lead-up can remain stubbed while the relevant subset executes forward. This tests the change together with its consequences without requiring the entire trajectory to run again. It also exposes intermediate failures that a final-output check cannot explain.
The recommended release gate is replay against a curated golden set of traces with expected outputs or rubric scores. A shifted pass rate supplies evidence before users encounter the change, while scheduled replay through the current production pipeline detects drift over time. The surrounding evaluation infrastructure serves three different cadences. Fast pull-request checks examine behavior such as tool selection, nightly regression suites use an LLM judge for output quality, and continuous production monitoring alerts on performance drift. Replay is necessary evidence for a fix, rather than a claim that non-deterministic behavior has become risk-free.
How production traffic becomes a continuous improvement signal for the harness
Production traces show the actual distribution of inputs an agent gets, including edge cases, adversarial inputs, and usage patterns that synthetic benchmarks do not cover. That makes live traffic more than incident evidence. Evaluators can score each trace against criteria set by the team, and new failure patterns can become criteria too. The evaluation system then changes with the behavior it is meant to assess, rather than remaining fixed around a benchmark’s assumptions.
AgenTracer-v2 (NeurIPS 2026) demonstrates that corrective feedback from failure attribution measurably improves downstream agentic systems. Its Tracer-Flywheel synthesis engine uses deterministic system rollback to generate precisely annotated failure trajectories at scale. Attribution thus supplies reusable improvement evidence. The relevant output is not merely a diagnosis attached to one failed run, but feedback that can inform subsequent system changes.
Production trace review should be scheduled and recurring, including outside incident response. A newly observed failure can enter the evaluation corpus, receive a harness-layer attribution, and become a candidate for replay-validated correction. In this sense, a self-improving agent is not necessarily a smarter model, but an agent whose harness is repeatedly revised against evidence from its own operation.
Why harness iteration outperforms retraining as the primary improvement lever
Retraining remains a serious option when the model lacks the reasoning capability a task requires. Some failures cannot be repaired through configuration. Better prompts, tool definitions, or workflow logic can only do so much when capability is missing, so harness engineering should leave room to address model-origin failures. The decision depends on attribution specificity rather than a blanket preference for either intervention.
Even so, the evidence supports trying harness iteration first. A 2026 paper found that reflecting on execution trajectories in natural language and then mutating prompts outperformed reinforcement learning with GRPO by 6% while using far fewer rollouts. Improvements can come from changing how an existing model is directed, without changing its weights.
The cadence also favors the harness. Teams update prompts, tool schemas, and workflow logic weekly, while monthly or quarterly retraining cannot keep pace with those changes. Treating every environment edit as a reason to retrain adds cost without establishing that the weights caused the failure. Only attribution that points specifically to the model justifies retraining as the corrective response.
Harness engineering should therefore have the same standing as code review, schema versioning, and regression testing. Its unit of progress is a failure attributed to a specific layer, a correction tested against its consequences, and a validated change returned to production. Each such correction reduces recurrence on similar traces.
Sources
- Adaptive Influence Graphs for Failure Attribution in Multi-Agent Systems
- VerifyMAS: Hypothesis Verification for Failure Attribution in LLM Multi-Agent Systems
- NeurIPS Poster AgenTracer-v2: Agentic Failure Tracer for LLM Agentic Systems
- Error-Propagation Modeling for Failure Attributionin LLM-Based Multi-Agent Systems
- Seeing the Whole Elephant: A Benchmark for Failure Attribution in LLM-based Multi-Agent Systems


