Attributing Post-Edit Regressions to the Specific Change That Caused Them
Replaying traces layer by layer shows which edit broke the agent.

To attribute a post-edit agent regression, replay production traces while isolating changes in the prompt, tool, workflow, and memory layers, then compare the earliest divergence points. Before shipping the fix, test it against both the historical conversations that failed and a broader set of production traces. The failure signal establishes that behavior worsened, but only a structured search can connect that outcome to the specific change responsible.
Why a regression after an edit is harder to attribute than it looks
A team ships a prompt edit, but the wrong answer appears many steps later in the trace. An early tool call may introduce an error that becomes visible only in the final answer, after routing decisions and memory changes have propagated its effects.
Scale AI’s Continual Search paper frames root-cause attribution around the first divergence from a correct execution, while noting that the relevant evidence is often sparse and distributed across distant actions. That distribution reflects how agents operate. Each decision depends on several layers working together, including prompts, tool schemas, workflow routing, memory state, and skill definitions. An edit can touch one layer while changing behavior in another, so the location of the edit does not establish the location of the fault.
How one-shot judgment against the diff fails as an attribution strategy
Reading a diff and choosing its most plausible explanation compresses evidence gathering and causal judgment into a single pass. The approach encourages premature closure, even for capable engineers. Once a changed instruction seems to explain the wrong answer, later inspection can become a search for supporting details that overlooks contradictory evidence. The Continual Search paper documents this pattern in automated judges that settle early and leave critical evidence in longer traces unexamined.
Lu et al.’s 2026 trajectory-level study demonstrates why finding the right component is not enough. An agent can reach the root-cause service, leave its metrics uninspected, and still report the wrong answer. Localization does not establish the propagation path. The study identifies omitted evidence, misinterpreted evidence, and unsupported reasoning across model families and frameworks, patterns that also threaten manual diff review. A fix based on that reasoning may leave the original cause in place and add another regression.
Why attribution must be treated as a structured search through layers, not a diagnosis
Attribution becomes more reliable when each plausible cause remains a hypothesis until the evidence distinguishes it from alternatives. The Continual Search paper describes a search through a large evidence space in which competing explanations are tested and rejected as contradictions emerge. For post-edit regressions, the harness layers provide the structure for that search.
Within that structure, assigning fault means finding both the layer at fault and the specific change that caused the divergence. “Something in the prompt” does not direct a precise intervention. The broader distinction between model, harness, environment, and grader also prevents an investigation from forcing every failure into the edited harness. Even a one-line edit needs these checks because its size says nothing about whether its effects crossed layer boundaries. The practical implication is that a defined search procedure must exist before the trace is opened.
What the four harness layers actually contain and how each one can produce a regression
The prompt layer encodes task scope, business rules, format requirements, safety constraints, persona, and escalation logic. Those instructions are interpreted together at inference time. A revision to one clause can therefore change output format, task interpretation, or escalation behavior without making the responsible clause obvious. Removing a constraint can also expose ambiguity that the earlier wording resolved. In that case, the trace may show varied behavior rather than a stable failure that repeats on every replay.
The tool schema layer sets out the parameter names, their types, and which fields are required. Its characteristic failure is an interface mismatch. Early runs may never use a changed parameter, so the regression can stay hidden until production traffic takes the affected path days or weeks later. The relevant trace evidence is a call whose arguments no longer match the schema, followed by an error or a silent wrong result. Attribution then has to follow that result forward to the visible failure.
The workflow and routing layer governs step ordering, branching conditions, and retry logic. Its regressions need not produce explicit errors. An edit can increase the number of steps required to reach a decision, degrading reliability through the step budget even when tool responses are correct. Changes to branching conditions or retry thresholds can also affect only particular input classes. Aggregate metrics may hide those failures, but the affected traces show where the route changed or work was repeated.
The memory and context layer determines what information is available when the model decides. Earlier evidence is not necessarily still available. Context compaction, retrieval changes, or state management edits can remove information needed several steps later. The trace may show a decision that conflicts with evidence that was there earlier, or behavior shaped by information that compaction removed. Because the loss and its consequence can be separated by many steps without a visible error, memory attribution requires reconstructing the state at the decision point.
How replay-based isolation narrows the search to a single responsible layer
Replay provides an intervention by running a candidate boundary live with the changed code while the boundaries outside the test reproduce their recorded behavior. “Held constant” has a precise meaning here. It means serving the recorded envelope. Re-execution would reintroduce the variation that isolation is intended to remove.
Chronicle, presented by Chawla & Koul at REALM 2026, formalizes this approach as cut-point replay. It records runs at non-deterministic boundaries as immutable envelopes, then serves a chosen subset from the record while the complementary subset runs live with new code. The resulting incident test can run in CI.
Chronicle’s evaluation found injected faults with cut-point tests that full-stub baselines missed because the tool never executed under full stubbing. Structural assertions make the comparison concrete. They check which tool was called, which arguments were passed, or whether a guarded action was refused, without requiring a model call. Applying the same assertions to the live subset tests whether the changed boundary introduces or removes the divergence. If failure appears only when that boundary runs live, the result supports attribution there.
That support is not unconditional proof of production causality. The research acknowledges that the claim about non-deterministic replay remains partially unvalidated. Real production boundaries can behave differently from deterministic simulated boundaries, and prompt ambiguity can make an isolated result unstable. Teams should therefore use cut-point replay to narrow the search, then check what they found against more traces before shipping.
Running the search in practice: a step-by-step procedure from failing trace to attributed layer
The practical procedure begins by anchoring the regression to a production trace or a small set of traces. The chosen case must show behavior that worked before the edit and fails after it on the same input class. This anchor gives the investigation a concrete post-edit outcome to explain and keeps it from treating every nearby defect as evidence about the change.
Next, compare the failing execution with a successful pre-edit execution, working backward from the symptom to find the earliest divergence. A step-by-step comparison should expose where the executions first differ and which evidence informed that difference. Lu et al.’s study examined 5,000 trajectories from ten framework–backbone configurations on RCABench and found that successful investigations retrieved evidence that guided deeper inquiry, while failures drifted toward unrelated components or repeated shallow queries.
Once the divergence is located, assign it to a candidate layer according to the behavior that changed. A model decision may point toward the prompt, a mismatched argument toward the tool schema, a changed branch toward workflow logic, or missing evidence toward memory. This hypothesis determines which boundary to expose in replay and which recorded evidence to preserve around it.
Then run complementary isolation tests to distinguish that hypothesis from the other edits. First, put the candidate layer back in its pre-edit state, keep the post-edit states in the other layers, and check whether the regression disappears. Next, run the candidate in its post-edit state against the pre-edit states of the other layers and observe whether the regression reappears. Fixed boundaries must still use recorded envelopes. For a single-layer cause, these tests establish both removal and reintroduction of the failure under controlled conditions.
Finally, replay the proposed fix against the attributed case and the broader historical trace set before shipping. Attribution alone does not validate the repair. OpsHarness, introduced by Huang et al., ByteDance/CUHK in 2026, demonstrates a dual-gate verification pattern designed to prevent overfitting and regression. Here, the first gate checks whether the source failure is fixed, and the second checks whether adjacent cases still work correctly. A fix that passes only the original incident has not passed the broader release test.
Where the procedure breaks down and how to handle attribution that spans multiple layers
When complementary single-layer tests do not isolate the regression, the investigation must reconsider both the divergence point and the assumption of a single cause. Interactions require a wider unit of intervention. A context compaction change can remove tool evidence while a prompt edit increases reliance on that evidence, producing a failure only when the changes operate together. The relevant signature is dependence on a combination of edited states rather than a clean effect attributable to one layer alone.
Mahale (2026) shows why an absent measured effect does not settle the question. Under the marginal estimand, a causally inert step can be numerically indistinguishable from the decisive one, and a zero total effect does not certify that a step did nothing. Single-layer replay can therefore give false negatives when interactions hide an effect. The practical response is to expand the tests to pairs of layers, holding both at their pre-edit states and checking whether the failure disappears. A resolving pair narrows the investigation to the interaction it contains.
The search must continue when a candidate is exonerated. The Continual Search framework reinforces this discipline by challenging the standing answer and looking beyond the evidence that supported it. If no single layer or pair yields a defensible attribution, the appropriate response is to revert the edit set and re-ship changes one at a time. That outcome indicates that the edit was too large to attribute safely and leaves a diagnosis unsupported.
How do you validate agent fixes against production traces before deploying?
A release decision requires evidence from the production trace distribution. Synthetic cases cannot replace the captured input distribution, tool state, memory contents, and workflow paths that were part of the regression. Replay-based evaluation preserves the connection between the attributed cause and the execution evidence that exposed it.
The two validation gates serve different purposes. OpsHarness checks for strict improvement on source cases and non-regression on a held-out testbed, with one check for fixing a known failure and another to guard against overfitting. For an attributed agent fix, the corresponding workflow is to replay the failing trace, replay the broader historical set, and ship only after both checks pass. The first test establishes that the repair addresses the incident. The second tests whether it introduces a new divergence elsewhere.
That workflow needs enough records from production. Without them, a team cannot reconstruct which state informed a decision or demonstrate that its repair rests on execution evidence. Structured attribution exposes a candidate cause, and production replay makes the proposed intervention testable before release.
Sources
- Beyond Fault Localization: A Trajectory-Level Study of LLM Agents for Microservice Root Cause Analysis
- Root-Cause Attribution Is a Search Problem: Continual Search for Long-Horizon Agent Failures
- Root-Cause Attribution Is a Search Problem:
- Causal Attribution for Agentic Decisions: Estimators, Coupling, and a Traceability Specification
- From General Agents to RCA Experts: A Self-Evolving Harness for Root Cause Analysis


