Meta Harness: Who Tests Your Test Harness?
Your agent scores 60% on the benchmark. You ship the fix, the score drops to 40%. Did the agent get worse - or did your harness break?
Most teams never ask the second question. They should. The harness is software too, and it has bugs: a scorer that marks correct answers wrong, a tool mock that returns stale data, a prompt that leaks the answer, a flaky retry that sometimes counts a timeout as a failure. Every one of those looks exactly like the agent failing.
A meta harness is a harness for your harness. It does not evaluate the agent. It evaluates the thing that evaluates the agent. If your eval drives shipping decisions, you need one.
The three checks that matter
A meta harness needs exactly three checks. Everything else is decoration.
- Golden traces: known-good runs must pass
Take a handful of runs where you already know the right answer - a human verified them, or the task is trivial. Feed them through the harness. The harness must score them 100%.
If it doesn't, your scorer is wrong, not the agent. This is the most common harness bug and the easiest to catch. A scorer that can't pass its own golden traces is measuring itself, not the model.
- Fault injection: a deliberately broken agent must fail
Take a good agent and break it on purpose: make it return empty answers, make it call the wrong tool, make it ignore the task and output the prompt. Run it through the harness. The harness must score it near zero.
If the broken agent still scores well, your harness cannot detect failure. This is worse than a wrong scorer - it is a harness that rubber-stamps everything. Reward hacking lives here: agents learn to exploit the harness instead of doing the task, and nobody notices because the number keeps going up.
- Replay determinism: same trace, same score, every time
Record a run - every tool call, every model output, every score - as a trace file. Replay that trace through the harness a week later. The score must be identical.
If it isn't, something in your harness is non-deterministic: a live API that changed, a timestamp in the prompt, a random seed nobody set. Non-deterministic evals are un-debuggable. You cannot tell whether a 5-point swing came from your change or from the harness drifting.
What it looks like in practice
The shape is simple. You already have most of the parts:
agent run → trace file (JSONL) → replay runner → score
meta harness: compare score vs. expected score
The trace file is the key. Once every run is a recorded file, the meta harness is just a second program that replays traces and checks the scores against expected values. No new infrastructure, no new service - a script and a folder of traces.
In my own agent-eval work, the numbers that made this concrete were small and honest: the same system scored 16.7% on the benchmark and 0% under stress, and the replay check was 2 out of 2 traces producing identical reward agreement. The replay check is the meta harness doing its job - it says the measurement itself is stable, so the 16.7-to-0 gap is real signal about the agent, not noise from the harness.
What it costs, and what it catches
Building the three checks takes an afternoon. The golden traces are a few hours of hand-checking. The fault injection is a script that deliberately breaks the agent. The replay runner is the trace format plus a loop.
What it catches is worth far more than an afternoon: the week you would have spent "fixing" an agent that was never broken, and the release you would have shipped because the harness said 90% while the agent was failing in production.
When you need one
The rule is simple: if a number from your harness decides anything - a ship/no-ship call, a model choice, a promotion of one agent over another - the harness needs its own tests. Untested measurement is not measurement. It is a random number generator with good branding.
Start with the replay check. It is the cheapest of the three and it catches the most embarrassing failure: the harness that cannot even agree with itself.
I built a small version of this idea as AgentEval-Lite - a minimal agent-eval harness with trace replay built in. The point of the repo is the same as the point of this post: measure the measurement first.
Comments
No comments yet. Start the discussion.