What the Eval Tool Stack Gets Wrong About Production Trace Fidelity
Scoring traces isn't enough; fixing agents means attributing causes.

Changes to production agents should be tested by replaying historical production traces, scoring the candidate on cases that failed and cases the agent had already solved, and rejecting edits that cause regressions. High trace fidelity makes that testing possible, but it cannot identify the responsible harness layer on its own. The missing discipline is a continuous path from observed failure to attributed cause to validated fix.
Why high trace fidelity still leaves engineers without an answer
A production trace can look complete and still leave the engineer without an explanation. It records spans, token counts, latency, and tool call order, allowing a failed request to be followed step by step. Nothing obvious is missing from the transcript. Yet the transcript does not establish which harness decision caused the result, or which change would prevent it from recurring.
Confident AI’s agent eval guide distinguishes tracing, which tells engineers what happened, from evaluation, which tells them whether it was correct. Causal attribution requires a further step beyond either function. A token chart identifies an expensive request, but cannot distinguish retrieval of the wrong document from an agent ignoring the correct one. Those failures need different fixes even when their answers look alike.
How the eval category fragmented in a way that makes attribution harder
The observability category has divided into traditional APM platforms, AI gateways, and evaluation-native tools. Each camp supports part of the engineering work, but their boundaries separate execution evidence from judgments about agent behavior. DeepEval’s 2026 framework comparison explicitly distinguishes observability, which captures production traces and operational measurements, from evaluation, which compares application versions before shipment. Neither function necessarily connects a production failure to a repairable cause.
Evaluation frameworks also carry over assumptions from single-turn prompt-response pairs and simple chains. The agent eval guide states that most LLM evaluation tools applied to agents log which tools ran and in what order without scoring whether those decisions were appropriate. Standard faithfulness and relevance metrics come from RAG pipelines. Agents also need checks of their tool selection, planning quality, step-level faithfulness, and reasoning coherence. Without those distinctions, a system can be well instrumented in production and evaluated in CI while the connection between the two remains a manual investigation.
What actually breaks in production agents, and where in the stack it originates
Failures in production occur across three nested loops. In the inner tool-call cycle, failures include schema mismatches, wrong tool selection, and invalid arguments. The task loop includes drift from the goal and context exhaustion, while the orchestration loop includes trust violations and runaway execution. An error can originate in one loop and become visible in another, so the last failed step is not necessarily the causal one.
The documented tool failures make that distinction concrete. In a wrong-args failure, an agent submits arguments that violate the tool schema and retries with the same shape. The retry is visible, but its cause can remain unflagged. In a no-error-handling failure, a tool returns a 500 and the agent fabricates a reasonable-sounding response that passes surface checks. API drift creates another mismatch when a third-party endpoint changes its schema or error codes while the CI mock retains the old payload.
Its research-agent example shows how a feature misattributed to the wrong company can contaminate later analysis while the summary passes a surface check. The error propagates through otherwise plausible work. MorphLLM’s 2026 agent evaluation guide therefore separates final-answer, trajectory, and per-turn evaluation, with the latter catching jailbreaks, policy violations, and user frustration that operational measurements do not reveal. The guide states the danger plainly. “The trap is treating layer one as the whole job”.
Why the step-failure-to-root-cause gap is not a tooling accident but a design choice
The eval stack was built to score outputs against expected results. That objective supports comparison and regression detection, but it does not require the system to identify the harness decision responsible for an error. Attribution is outside that original contract. A tool can execute its scoring function correctly while leaving the engineer’s central question unanswered, revealing a mismatch between design goals and operational needs.
The mismatch reinforces itself as production changes. With every release, an offline evaluation set gets older, and passing CI says less about live behavior unless a pipeline adds newly found failures to that set. Sampling introduces a separate blind spot. LLM-as-judge scoring over a fraction of production traces can detect drift while underrepresenting rare, severe failures. Even when per-step scores are right, they can hide how errors build up over a long sequence and lead to poor end-to-end performance.
MorphLLM’s guide describes agents whose loops hide behind a correct final answer, or whose final text claims a flight was booked when no booking occurred. Neither defect is resolved by reading the final response more carefully. Attribution requires searching the evidence and testing competing explanations. As logs grow and spread across components, a single-pass reading can settle on a plausible failure before contradictory evidence has been explored. A scored step narrows that search but does not finish it.
Trace integrity introduces a further limit because agents can tamper with their own traces. The fidelity assumption is therefore not guaranteed by instrumentation alone, although tamper-proof execution environments and tamper-evident interception offer mitigation approaches. Evidence itself needs protection against interference. Separately, the agent eval guide identifies CI/CD regression detection as a distinct capability for catching wrong tools, degraded planning, and broken reasoning chains. Development-only evaluation and post-release spot checks leave production trajectories outside that discipline.
What span-level scoring adds and where it still falls short
Span-level scoring makes a substantial improvement over final-output evaluation. It judges individual tool calls, reasoning steps, and retrieval decisions rather than allowing a plausible answer to conceal everything that preceded it. The agent eval guide places span scoring with agent-specific metrics, execution-tree visualization, multi-turn simulation, and CI/CD regression detection. Together, these capabilities make agent behavior more legible than an endpoint score can.
Execution-tree visualization is especially useful because agent paths are not necessarily linear. Tools call other tools, model calls branch into parallel paths, and retries form execution trees that are hard to follow in a flat transcript. A graph exposes where a path diverged. A score can then identify a decision on that path as incorrect, reducing the evidence an engineer must inspect. This is real progress at the observation layer.
The remaining distinction is between identifying the failed call and explaining its cause. A wrong tool call might follow from an ambiguous prompt, an incompatible schema, or a workflow that routed the request incorrectly. The score alone cannot tell which of those causes led to the failure. Actionable attribution must connect the scored span to the responsible layer and support a reviewable repair. Without that connection, the engineer still performs the causal search manually.
The five harness layers where attribution must land to be actionable
The five harness layers are prompts, tools, workflows, memory, and skills. They provide a diagnostic framework rather than a product taxonomy, locating the part of the system that must change. Each layer needs its own evidence and a way to fix what went wrong. A single quality score compresses those distinctions precisely when an engineer needs to recover them. The purpose of attribution is to turn an observed defect into a specific engineering responsibility.
At the prompt layer, failures include ambiguous instructions, missing context, and instructions that conflict with tool schemas. Diagnosis requires comparing the prompt with the call it produced and the result that followed. The final answer comes too far downstream. At the tool layer, the evidence instead concerns schemas, arguments, tool selection, error handling, and differences between production APIs and CI mocks. Schema drift is particularly deceptive because the agent can appear to function while troubleshooting concentrates on downstream symptoms.
The workflow layer governs routing and progress across steps. Incorrect routes, repeated calls, task drift, and context exhaustion belong in that investigation. Repetition is a warning. Similar tool calls recurring without progress, or verbose reasoning that does not advance the task, warrant examination of the execution path. Memory failures require a different distinction, because stale or contradictory retrieved content is not the same defect as a retrieval that silently returns nothing.
The skills layer concerns capability gaps that lead an agent to attempt work it cannot complete. Output that looks right but is wrong can hide that boundary. Such failures are easy to label as model-quality problems even when the harness should handle the missing skill in a different way. Diagnosis requires asking whether the agent had the capability required for the attempted task. That question points toward a different repair from rewriting an instruction or correcting a schema.
How to test agent changes against production traces before deploying
Replay validation tests a proposed harness change on historical production traces before it reaches users. The candidate may be a prompt edit, a tool schema correction, or a workflow reroute. The failed case is only the starting point. Scoring the candidate against the full historical set tests whether it fixes the targeted defect while still solving tasks the agent had solved before. A regression-aware optimizer rejects a candidate that improves newly targeted tasks at the expense of those earlier successes.
This is different from inspecting a trace or approving an edit that looks reasonable. Inspection evaluates the explanation and the proposed change, while replay tests the changed behavior on known inputs. A plausible repair can still be wrong. If it passes manual review but fails on previously solved conversations, shipping it creates false confidence as well as another production defect.
A/B testing answers a different question from replay. Replay establishes whether the agent still works on known inputs, while A/B testing compares versions on live traffic to learn which users prefer. Neither substitutes for the other’s purpose. Conflating them can expose users to changes that have not passed historical regression checks, or consume live experimentation effort on questions already answerable from production traces. The distinction separates regression protection from product experimentation.
For that protection to remain relevant, the same rubric must operate in CI and production. Live span scoring can run server-side after export, without adding inline latency, while CI applies the rubric to the historical set. Production failures then expand the test set. Grouping those failures into clusters and using the expanded set in optimization links live evidence to the next proposed edit.
What a trace-to-fix workflow looks like when it treats attribution as a first-class step
AgentDebugX, by Zhu et al., July 2026, formalizes a closed loop of Detect, Attribute, Recover, and Rerun. Within Attribute, its DeepDebug agent reads the whole trajectory, uses its structure to guide the investigation, and cross-examines the steps that might be the root cause. The research reports that the strongest single-pass baseline reaches only 21.7% exact agent-and-step accuracy.
For deployed-agent teams, this implies a workflow beginning with production traces as the primary signal. Failures must then be attributed to the prompt, tool, workflow, memory, or skill responsible, with competing explanations examined. Repairs must remain concrete and reviewable by engineers. The resulting edit remains a candidate until replay tests it against the failed cases and previously solved historical conversations. Shipment follows that validation rather than serving as the experiment that discovers whether the repair worked.
The operational responsibility belongs to developers who must explain a failure and correct it without breaking something else. They need evidence that supports both decisions. Code review can check whether an edit is clear and justified, while historical replay tests how it affects known work. Treating harness engineering with that rigor changes what an eval stack is expected to deliver. Its endpoint becomes a reviewable, regression-tested change.


