← Soren Nguia

SEAM

Systematic Evaluation of Agent-handoff Malfunctions

agent Aholds the goal,the context, the authorityagent Breceives whateveractually made it acrossthe seamone handoff = one measured unitBenchmarks that score end-to-end task success collapse all five into one bucket: failed.five modes, objective ground truthcontext_lossa fact the receiver needed did not crossgoal_driftthe task that arrives is not the task that leftinfo_leakagesomething private crossed that should not haveunsafe_escalationthe receiver claims more authority than it was givendropped_taskcontrol crosses and the work is never doneGround truth is objective because the failure was injected on purpose — the generator knows what it broke.
Figure 1: Multi-agent systems break where control changes hands. SEAM makes that boundary the unit of measurement instead of scoring the run end to end.

A detector a product can afford to run on every production trace has to be both calibrated and cheap.

5 modesobjective ground truth0 / 59false alarms on clean units47 / 47precision on the test split~$0.0005per trace, list price

Author

  • Soren Nguia1

Affiliation

  1. Independent Researcher (Seoul)

Built

Jul. 2026 · self-directed · MIT

TL;DR

Multi-agent systems break at the seams — the handoff where one agent passes control to another and context is dropped, the goal drifts, private information crosses a boundary, an action over-reaches, or a task silently disappears. Existing agent benchmarks score single-agent task success and collapse the handoff into one bucket, or attribute failures only after the fact. SEAM makes the handoff the unit of measurement.

It generates self-labeling multi-agent traces with injected failures across five modes with objective ground truth, runs a cheap-heuristic-then-LLM-judge cascade over them, and reports FNR, FPR and precision per mode with bootstrap CIs and a cost per trace. On the real-judge confirmation run it observed zero false alarms (0 of 59 clean units, 95% Wilson upper bound 6.1%) at precision 47/47 (95% lower bound 92.4%) and recall 0.580 (FNR 0.420, bootstrap CI [0.333, 0.531]), for about $0.0005 per trace.

The design target was zero false alarms rather than maximum recall, because a handoff detector that cries wolf gets switched off. What that buys and what it costs are both reported: the cascade eliminates 42% of judge calls, and the per-mode profile is deliberately uneven — leakage is caught at FNR 0.143 while goal drift sits at 0.667.

Scope, stated up front

This is a two-evening design-and-implementation exercise on multi-agent reliability, not a completed research program. The repo says so, and so does this page. It is here because the measurement design is worth reading, not because the numbers settle anything.

The seam is the unit

Ask most agent benchmarks how a multi-agent run went and you get one number: did the task succeed. That number is real, and it is nearly useless for debugging, because every distinct way the system can fail arrives compressed into the same word. A sub-agent that never received the customer's account ID and a sub-agent that received it and quietly solved a different problem both come back as failed.

The alternative most work reaches for is post-hoc attribution: run the system, look at the failures, and have a model or a human decide which agent was to blame. That produces a story rather than a measurement, and the story is generated by the same class of system whose reliability is in question.

SEAM changes what gets counted. The unit is the handoff itself, and a handoff either preserved what it was supposed to preserve or it did not. That reframing is what makes objective ground truth possible at all.

Five modes with objective ground truth

Five things go wrong at a boundary, and each is defined so that whether it happened is a fact rather than a judgment call:

The ground truth is objective because it is injected. The generator does not observe a failure and label it; it breaks a specific thing on purpose and records what it broke. There is no annotator to disagree with, which is the property that makes per-mode error rates meaningful.

Traces that label themselves

The generator produces multi-agent traces and injects failures into them under seed control, so every trace ships with its own answer key. The confirmation run used 200 generated traces on a seeded 60-dev / 140-test split, with the detector tuned on dev and reported on test.

Self-labeling is what makes the whole thing affordable. Hand-annotating handoff failures at the granularity of five distinct modes is expensive enough that nobody does it at a useful n, and the annotations you get back are exactly the judgment calls the design was trying to avoid.

The per-mode profile, reported rather than averaged away
0.000.250.500.751.00false-negative rate — the share of real failures the detector missesinfo_leakage0.143a secret has a surface formunsafe_escalation0.316authority claims are overtcontext_loss0.400absence is harder than presencedropped_task0.556nothing looks like nothing wronggoal_drift0.667no lexical signature at all
Figure 2: False-negative rate by mode on the 140-trace test split. The gradient is the interesting part: the detector is strongest where a failure leaves a surface form to match, and weakest on goal drift, which leaves none. A single headline recall of 0.580 would have hidden that entirely.

The cascade, and where the money comes off

A detector meant to run on every production trace has a hard cost ceiling, so cheap lexical heuristics run first and only uncertain traces escalate to the LLM judge. On the confirmation run that eliminated 42% of judge calls — 81 of 140 traces escalated — at about $0.0005 per trace at list price.

The rail that makes this safe is asymmetric on purpose: the cascade never auto-accepts a positive on a cheap signal. Savings come off the negative side, where a mistake is recoverable, and every claimed failure still costs a judge call. Getting that asymmetry backwards is how cost optimization quietly becomes a worse detector. It is the same construction as the production judge cascade in ROGUE, restated here as a standalone measured artifact.

Error rates that survive noisy labels

A detector with known error rates can recover the true prevalence of a failure from its own noisy observed rate. SEAM does this with a Rogan-Gladen correction, inverting measured TPR and FPR, with a delta-method interval (Feng / Lee) propagating the binomial uncertainty, plus threshold selection to a target false-positive rate and a cost-versus-FNR frontier.

The load-bearing piece is not the correction. It is the certification gate in front of it: the corrected number is reported only when TPR exceeds FPR by a statistically distinguishable margin. The Rogan-Gladen denominator is (TPR − FPR), so a detector carrying no real signal divides by something near zero and returns a confident, enormous, meaningless prevalence. The gate makes that case return nothing instead.

What the demo proves, and what it does not

The repo's flip-injection demo feeds the realized noise rates back into the estimator, which then recovers prevalence as an algebraic identity. That verifies the arithmetic; it does not establish robustness. A genuine robustness test estimates TPR and FPR on a held-out split — that is the version worth citing, and it is not what the demo does. The repo says this in the same words.

Where it fails: the real-data axis

Scenario seeds are grounded in real material — AgentDojo, multi-party privacy scenarios, and Who&When (MIT), a dataset of real orchestrator-to-sub-agent handoffs annotated with a gold failing agent and step. Who&When asks a different question from the synthetic metrics: not "can the detector find an injected failure" but "does it flag the boundary a human annotator marked as the failure?"

On the real-judge run it localized 0 of 6. That is reported as its own line rather than folded into the headline, and it is reported without spin in either direction: a 6-trace smoke test cannot support a claim that the detector works on real traces, and it cannot support a claim that it does not. It is a null observation on a sample too small to carry weight, and the honest move is to say so and leave it visible.

Reproducible without a key

A deterministic seeded mock backend runs generate → detect → calibrate → report end to end with no API key:

uv run seam evaluate --backend mock

So the pipeline is verifiable by anyone, and the paid Fireworks run (gpt-oss-120b) is a confirmation layer on top rather than the only path to a number. That ordering matters for a small project: if the only way to check the work is to spend money, most people will take the numbers on trust instead, which is exactly what a measurement project should not be asking for.

3,630
LOC source
1,291
LOC tests
94
tests green in 0.73 s
MIT
public, artifacts committed

Limitations and scope

Conclusion

The contribution is the framing: make the handoff the unit, define failure modes whose ground truth can be injected rather than annotated, and then report the per-mode profile instead of one averaged recall — because the profile is where the useful information lives. A detector that catches leakage six times in seven and drift one time in three is a genuinely different tool from one with the same headline recall spread evenly.

The rest is discipline the numbers only survive because of: a cascade that saves money on the side where mistakes are recoverable, a certification gate that returns nothing rather than a confident quotient of near-zero, and a real-data axis left visibly unpassed.