TL;DR
When an AI agent solves a coding ticket today, will it solve the exact same ticket tomorrow if you reword the prompt or shuffle a database column? Standard accuracy benchmarks can't tell you. This paper introduces a rigorous statistical framework to test AI agent reliability—looking not just at whether an agent gets the same final answer, but whether it takes a stable path to get there—revealing that high accuracy often masks fragile, erratic execution.
What Problem Does This Paper Address?
Traditional software is comfortingly deterministic: give it the same input, get the same output. LLM-powered agents are anything but. Paraphrase an instruction, inject a typo, or add a distractor tool to the environment, and an agent that looked brilliant a moment ago can completely unravel.
Right now, almost all agent benchmarks measure capability (like pass@1 accuracy on a fixed test set). Even when recent studies look at how agent paths vary, they report descriptive similarity scores without a statistical model—meaning we can't tell if a behavioral shift is a genuine failure mode or just normal run-to-run sampling noise. Furthermore, looking only at final outputs misses what happens under the hood: an agent might stumble into the right answer via wildly erratic strategies. If we want to deploy agents in high-stakes environments, we need a way to formally test execution robustness.
Methods
The authors treat agent evaluation like a controlled scientific experiment. They take a base task and apply semantically preserving perturbations—changes that alter the surface form without changing the underlying problem. These happen at the prompt level (paraphrasing, back-translation, adding irrelevant text) and the task level (shuffling database schemas, adding decoy functions, or moving an issue description behind an MCP server).
Instead of eyeballing the results, they introduce formal hypothesis tests across two dimensions:
- Output Consistency: Do perturbed runs arrive at the same final answer? Building on existing pairwise similarity metrics, the authors formalize output agreement as a U-statistic (an unbiased way to estimate population properties by averaging over all pairs of sample outputs), yielding an asymptotic hypothesis test with statistical power guarantees.
- Trajectory Consistency: Do agents take the same sequence of actions? Modelling variable-length action sequences as stochastic processes, they compare distributions using Maximum Mean Discrepancy (MMD)—a kernel-based test that checks if two sets of complex objects come from the same distribution.
Crucially, they decompose trajectory drift into two intuitive buckets:
- Composition drift (using Jensen–Shannon Distance): Did the agent use the same mix of tools?
- Ordering drift (using Levenshtein edit distance and a Global Alignment Kernel): Did it call those tools in the same sequence? They also weight edits by position, penalizing late-stage confusion more heavily than benign early-stage exploration.
Datasets
Rather than inventing a synthetic toy benchmark, the authors build perturbation suites on top of three established, real-world agent benchmarks executed via the Harbor framework:
- SWE-bench Verified: Real-world GitHub software engineering issues.
- Spider2-DBT: Enterprise text-to-SQL and data transformation workflows.
- BFCL (Berkeley Function Calling Leaderboard): Tool-use and API-calling tasks.
Key Insights and Ideas
- Consistency and accuracy are orthogonal—and high consistency can be a trap. Across 24 experimental setups, accuracy and output consistency are essentially uncorrelated ($r = -0.04$). Why? Because an agent can be consistently wrong. When a perturbation breaks an agent, it often pushes every run into the exact same narrow failure mode, artificially inflating consistency while tanking accuracy.
- Agents know what tools to use, even when they forget how to sequence them. Under environmental shifts, agents frequently maintain high composition stability (picking the right tools in the right proportions) while suffering massive ordering drift. Output-only evaluations completely miss this strategic thrashing.
- Failures live at the agent–environment seam. When perturbed runs fail despite the base run succeeding, it's rarely due to missing knowledge. Instead, agents get derailed by changed information channels (spending five steps debugging a fake issue tracker instead of reading the retrieved bug report) or scaffold incompatibilities.
Key Results
Evaluating two agent setups (Codex + GPT-5-mini and OpenHands + Kimi-K2), the authors uncover striking fragilities:
- Composition vs. Ordering: On SWE-bench, moving problem descriptions behind a simulated Linear MCP server causes Codex's action ordering score (Levenshtein) to drop to 0.584, even while its tool composition (JSD) stays near-perfect at 0.970.
- The "Consistently Wrong" Phenomenon: On Spider2-DBT (
header-shuffle), OpenHands achieves near-perfect output consistency alongside dismal accuracy—because 85.9% of output pairs agree by failing in the exact same way. - Scaffold Breakdowns: Changing BFCL's required output format from JSON to XML drops OpenHands + Kimi-K2 accuracy from over 60% to nearly 0%. In 54.6% of those perturbed runs, the agent gets stuck repeating a malformed tool call until it times out.
- When Divergence Happens: Position-weighted diagnostics show that on SWE-bench (averaging ~24 actions per run), trajectories typically split early—around action 5 or 6—whereas Spider2-DBT runs diverge further in, between actions 6 and 18.
Limitations and Future Work
- Ensuring true semantic equivalence: If a perturbation accidentally changes the actual task, any measured "inconsistency" is an illusion. Even with oracle checks, Claude Sonnet 5 filtering, and human validation, subtle shifts can slip through; better automated diagnostics for distributional invariance are needed.
- Coarse action granularity: The trajectory metrics currently look at which tools are called, not the exact arguments inside them (e.g., two bash calls look identical at a high level even if one passes a different flag),nor do they inspect intermediate reasoning traces.
- Looking inside the black box: Future work could model execution as a Partially Observable Markov Decision Process (POMDP) to test the stability of an agent's internal belief states and plan updates—once agent frameworks begin exposing internal model representations.
Summary updated