Willful Disobedience: Automatically Detecting Failures in Agentic Traces
Organizations: University of Washington Seattle, Washington, USA · Microsoft Research Redmond, Washington, USA
Abstract
AI agents are increasingly embedded in real software systems, where they execute multi-step workflows through multi-turn dialogue, tool invocations, and intermediate decisions. These long execution histories, called agentic traces, make validation difficult. Outcome-only benchmarks can miss critical procedural failures, such as incorrect workflow routing, unsafe tool usage, or violations of prompt-specified rules. This paper presents AgentPex, an AI-powered tool designed to systematically evaluate agentic traces. AgentPex extracts behavioral rules from agent prompts and system instructions, then uses these specifications to automatically evaluate traces for compliance. We evaluate AgentPex on 424 traces from -bench across models in telecom, retail, and airline customer service. Our results show that AgentPex distinguishes agent behavior across models and surfaces specification violations that are not captured by outcome-only scoring. It also provides fine-grained analysis by domain and metric, enabling developers to understand agent strengths and weaknesses at scale. The source code of AgentPex is available at https://github.com/microsoft/agentpex.
Figures & tables
| Metric | Claude 3.5 Sonnet | GPT-4.1 | o4-mini |
|---|---|---|---|
| Overall Aggregate | 57.6 | 62.6 | 62.9 |
| Output Spec | 63.6 | 65.0 | 66.9 |
| Transition Spec | 59.2 | 63.7 | 80.6 |
| Predicted Plan Spec | 81.0 | 80.1 | 77.0 |
| Argument Groundedness | 98.7 | 99.1 | 98.1 |
| Reward | 41.4 | 37.5 | 38.6 |
| Computational Cost Metric | Cost |
|---|---|
| API calls | 9 LLM API calls |
| Total tokens | 77,621 ( 69k in / 8.5k out) |
| Wall-clock time | 139 sec |
| Estimated cost | $0.019 |