Harness Engineering After Launch: Fix the Agent Around the Model

Published Sources reviewed November 24, 20266 min read

When an agent fails after launch, changing models is rarely the first useful move. The failure may live in the harness around the model: an instruction has the wrong priority, retrieval supplies stale context, a tool description does not state a precondition, or routing sends the request to the wrong specialist. Treating all four as a model problem produces broad changes that are hard to test and harder to explain.

Start with one observable failure. Preserve the request, material context, tool sequence and result, route, agent version, and outcome. Then make one change at the layer that could plausibly produce that failure, compare it with the current agent on shared cases, and measure the same behavior after an approved release. A passing comparison supports the release decision. It does not establish the production result.

The short version

A production agent harness is a set of changeable behavior controls. Diagnose the failing control before changing it, then keep the candidate, release boundary, and post-release evidence separate.

1. Locate the failing control before editing the harness

A model response is the end of a path, not always the cause. A support agent that quotes a stale refund policy may have received an outdated retrieval result. An agent that invents an account status may have skipped a lookup because the tool description did not say that lookup is required. A request sent to the wrong workflow may be a routing failure even when the selected model answers fluently.

Write the failure as a rule a reviewer can apply again. For example: among refund requests with a matching order record, the agent answers the policy question without calling the order lookup. Keep cases with missing records, unavailable tools, and uncertain outcomes visible. Those are not passes, and they may point to a different control than the prompt.

Observed symptom
The agent skips a required action
Control to inspect first
Tool description, required-call rule, and tool availability
Do not assume
That a longer prompt will fix the decision
Observed symptom
The answer cites an obsolete policy
Control to inspect first
Retrieved source, retrieval version, and source selection
Do not assume
That the model ignored current context
Observed symptom
The request reaches the wrong specialist
Control to inspect first
Intent rule, router prompt, and handoff contract
Do not assume
That the receiving agent caused the routing error
Observed symptom
The answer changes after a deployment
Control to inspect first
Prompt, context, tool, route, and model version boundaries
Do not assume
That the model change was the only change

2. Keep evidence and the candidate small enough to review

LangSmith describes production monitoring as a source of issues and edge cases that can inform future offline testing. That division is useful: production evidence identifies a failure family, while an offline comparison evaluates a specific candidate on controlled inputs. Do not turn an alert, trace, or score directly into a rewrite of the whole harness.

Name the exact candidate and what remains fixed. A tool-call repair might move one required instruction beside the tool definition while keeping the model, retrieval source, route, and tool implementation unchanged. A retrieval repair might update one source version while keeping the prompt and router unchanged. If multiple controls change together, record that the later result cannot isolate one cause.

3. Test the candidate against shared failure and working cases

Run the current agent and the candidate with the same failure-family cases, nearby working cases, and edge cases that expose the control you changed. Preserve controlled tool and account state so a different external response cannot look like a harness improvement. Compare the named failure as well as required safety, tool use, and task-completion behavior.

LangSmith's evaluation guidance distinguishes offline regression testing from online evaluation. Use that distinction to avoid an easy mistake: a candidate can pass a focused test while the production signal remains unresolved. A test result gives the team evidence to approve or reject a bounded release. It does not tell the team what later users experienced.

4. Measure the same behavior after the approved release

Record the current version, candidate version, failure rule, eligible denominator, approval, release time, and overlapping changes. On later eligible production conversations, apply the original rule and compare a comparable window. If the pattern persists, the result is not fixed. If another prompt, model, policy, or tool change overlaps the comparison, the result is confounded. If the evidence is too sparse or incomplete, retain insufficient evidence.

This is the boundary Converra keeps explicit: it connects diagnosed production evidence, a bounded prompt or configuration candidate, a head-to-head comparison, approval, and post-release evidence. Through Converra MCP, a coding agent can retrieve authorized diagnosis and comparison records, but state-changing actions remain subject to the connected account's scopes and the team's approval.

Frequently asked questions

What is an AI agent harness?

An AI agent harness is the prompt, context, retrieval, tool contracts, routing, and control logic around a model. It determines how the model receives a task and what it may do with the result.

Should I change the model when my agent starts failing?

Not before locating the changed behavior and its likely control. Inspect model, prompt, context, tool, retrieval, and routing boundaries, then compare one bounded candidate against the current agent on shared cases.

Does a passing harness test prove the production failure is fixed?

No. It supports a release decision for the selected cases. A production result requires measuring the same defined failure after the approved release with overlapping changes and incomplete evidence visible.

Oren Cohen, founder of Converra

Written by

Founder of Converra. Previously founded Buildup (acquired by Stanley Black & Decker) and, as VP Product Growth at Totango, owned AI end-to-end from design through production.

Turn a harness failure into a bounded behavior change

Converra keeps the diagnosed failure, candidate comparison, approval boundary, and post-release evidence connected so a team can determine what changed after a release.