Model or Harness? How to Localize AI Agent Failures
task_failed is an outcome, not a diagnosis.
An agent can produce the wrong result because the model reasoned badly, the context lost a constraint, memory preserved stale state, a tool returned ambiguous evidence, or the grader checked a contract the owner never stated. The terminal symptom may look identical. The repair is not.
This is why I found the new paper Model or Harness? An Interaction-Centric Taxonomy for Localizing Agent Failures useful. It asks a more operational question than most evaluations: where did the first unrecovered failure occur, and which component should change?
The paper gives that question a shared vocabulary. I think the next step is to make the answer executable. Failure localization should not stop at assigning fault to a component. It should identify the contract that broke and emit a verifiable repair receipt.
The same failure can require opposite repairs
Suppose an agent calls a payment tool, times out, retries, and charges twice.
“Tool-use failure” says almost nothing. At least four diagnoses fit:
- the model ignored an explicit
unknownoutcome; - the harness translated a timeout into
failed; - the tool omitted an idempotency contract;
- the external service accepted a duplicate key incorrectly.
Post-training the model helps only the first case. A prompt patch may hide the second for a while. Neither repairs the protocol in the third or the service in the fourth.
A useful evaluation must therefore solve what the paper calls the repair-assignment problem. The visible behavior is evidence, but the engineering target lies at the interaction boundary that produced it.
Put the failure on an edge
The paper models an agent system as interacting components: model, owner, grader, third party, context, memory, tool, peer or subagent, and local or external environment. A failure label has two parts:
interaction edge + fault side
For example:
model — tool · fault: model
model — context · fault: context
owner — model · fault: owner
model — environment · fault: environment
This is a better unit than a flat list of symptoms. A malformed argument and a deceptive tool response both surface during tool use, but they point to opposite sides of the edge. An agent that violates an instruction and an agent that follows an instruction rejected by a mismatched grader may both fail the benchmark, but only one is an instruction-following failure.
The taxonomy organizes 41 failure modes this way. It also gives cascades a fixed attribution rule: start from the observed system failure, trace backward, and label the earliest failure from which execution did not recover. Later mistakes remain consequences rather than competing root causes.
That rule matters. A context summary can drop “review only; do not edit.” The model then writes files, runs tests, and reports completion. Blaming the final report or the write call misses the event that changed the trajectory: the control constraint disappeared from active context.
Reproducible does not mean causally proven
The authors test whether independent reasoning agents can recover their human-assigned labels from original evidence. Across 40 worked examples, the strongest judge reaches Cohen’s κ of 0.76 for the broader category—the interaction edge plus fault side. Agreement on the exact named failure mode is lower.
The ensemble result is more useful than the single-model score. When at least three of four judges agree, category precision is 0.83 at 90% coverage. Requiring unanimity raises precision to 0.96 but reduces coverage to 68%.
That trade-off contains an important production lesson: a diagnostic system needs permission to abstain. If the trace cannot distinguish a model error from a lossy context transform, returning unknown is more honest than manufacturing a repair owner.
The numbers also need restraint. The study uses 40 curated examples, not a representative census of production incidents. The taxonomy is descriptive; it does not estimate failure frequencies. Its gold labels come from the same research process that developed the categories. A κ of 0.76 shows that the framework can be applied with substantial consistency. It does not prove that every assigned root cause is objectively correct.
Fault is not blame
The paper assigns 36 of its 41 role-specific failure modes to the model side and five to surrounding components. Part of that distribution follows its attribution rule: if a more capable model could have avoided or recovered from a failure under the same conditions, the failure may be model-attributable.
I would not use that rule as the final production boundary.
A stronger model may survive a broken protocol. That does not make the protocol sound. If context compaction removes an authorization constraint, a capable model might infer caution from the remaining text. The harness still failed to preserve a load-bearing invariant. If a tool returns 200 OK while the external effect remains unknown, a careful model might reconcile state before continuing. The tool contract is still ambiguous.
Resilience and responsibility are different axes:
Could the model recover? -> resilience question
Which contract was violated? -> responsibility question
Where should the repair land? -> intervention question
Calling all recoverable defects “model failures” encourages an expensive anti-pattern: compensate for weak interfaces with ever stronger models. The system appears better while its hidden contracts remain undefined.
Localize the broken contract
I would extend the paper’s label into a diagnostic chain:
observed outcome
-> causal trace
-> first unrecovered event
-> interaction edge
-> expected contract
-> violated invariant
-> repair owner
The edge narrows the search. The contract justifies the assignment.
For a context failure, the contract might require protected instructions to survive compaction with their rationale and authority. For a tool interaction, it might require effect identity, explicit confirmed | rejected | unknown outcomes, and reconciliation before retry. For memory, it might require provenance, validity scope, and an expiry condition. For a grader, it might require that acceptance criteria be derivable from the owner’s stated task.
This connects failure analysis to the two-contract architecture I use in FACET. A behavior contract states what the trajectory must preserve. An execution contract states what the runtime may authorize and commit. Failure localization determines which obligation broke first.
The connection is concrete:
| Evidence | Contract question |
|---|---|
| model trajectory | Which behavioral invariant stopped holding? |
| context transform | Which protected constraint or rationale was lost? |
| tool receipt | Was the external effect confirmed, rejected, or unknown? |
| memory record | Was the value current, scoped, and traceable to a source? |
| execution trace | Which action crossed a boundary without valid authority? |
| grader result | Did the acceptance contract match the task given? |
Without that contract layer, fault: harness is still an expert opinion. With it, the diagnosis becomes reviewable.
A repair receipt
I want every serious agent incident to produce a structured artifact like this:
{
"incident_id": "inc_01J...",
"observed_failure": "duplicate_payment",
"first_unrecovered_event": "evt_184",
"interaction": {
"edge": ["model", "tool"],
"fault_side": "harness"
},
"expected_contract": "unknown outcomes block retry until reconciliation",
"violated_invariant": "retry_requires_confirmed_non_effect",
"evidence": [
"trace:evt_181..evt_187",
"tool_receipt:pay_91",
"provider_query:txn_552"
],
"alternatives": [
{
"fault_side": "tool",
"condition": "adapter preserved the provider response verbatim"
}
],
"repair_owner": "tool-adapter-team",
"repair": "preserve unknown state and require effect reconciliation",
"confidence": 0.82,
"status": "proposed"
}
The exact schema is less important than its invariants:
- The diagnosis names an event, not only a terminal outcome.
- The interaction edge and fault side are explicit.
- A violated contract explains why the assignment belongs there.
- Evidence references can be inspected independently.
- Plausible alternative diagnoses remain visible.
- Confidence does not silently become authority.
- The receipt is proposed until a human or policy-controlled process accepts the repair.
This is not another log line. It is the handoff between evaluation and engineering.
Evaluation should measure repairability
Most agent benchmarks reward task completion. Some add failure categories. The interaction-centric taxonomy suggests a stronger evaluation stack:
outcome score
+ causal localization
+ contract violation
+ repair assignment
+ abstention quality
A benchmark should ask not only whether the agent failed, but whether the recorded evidence is sufficient to distinguish:
- model limitation from context corruption;
- bad tool selection from a bad tool contract;
- memory misuse from stale memory infrastructure;
- goal drift from an instruction–grader mismatch;
- subagent failure from orchestration failure.
That changes what a useful trajectory must retain. If compaction deletes the rationale behind a constraint, if tool receipts omit effect identity, or if memory writes lose provenance, later diagnosis becomes guesswork. Observability is not a dashboard added after deployment. It is the evidence model required for assigning repairs.
The runtime owns the evidence boundary
A model can help reconstruct a failure, but it should not control the evidence from which its own responsibility is inferred. The runtime must preserve immutable event identities, context transformations, memory mutations, tool requests and receipts, authorization decisions, and grader inputs.
Then models can act as competing analysts over a stable record. Their agreement becomes a signal. Their disagreement becomes another artifact. Unanimity may justify automatic routing of a repair ticket; partial agreement may require review; insufficient evidence should produce an explicit diagnostic gap.
This is where the paper’s interaction taxonomy and a contract-oriented runtime meet. The taxonomy supplies a shared map. Contracts define what each edge owes the system. Traces show what happened. Repair receipts bind the three into an actionable claim.
An agent failure is not useful because it has a name. It becomes useful when the system can show which boundary broke, what evidence proves it, and who owns the next change.
Sources
- Harsh Raj et al., Model or Harness? An Interaction-Centric Taxonomy for Localizing Agent Failures, arXiv:2607.28802v1, 2026.
- Emil Rokossovsky, AI Agents Need Two Contracts: Behavior and Execution.
- Emil Rokossovsky, AI Agents Need an Unknown Tool Outcome State.
- Emil Rokossovsky, AI Tool Calls Need Argument-Level Provenance.