To identify safety violations, auditors often search over large sets of agent traces. This search is difficult because failures are often rare, complex, and sometimes even adversarially hidden and only detectable when multiple traces are analyzed together. These challenges arise in diverse settings such as misuse campaigns, covert sabotage, reward hacking, and prompt injection. Existing approaches struggle here for several reasons. Per-trace judges miss failures that only become visible across traces, naive agentic auditing does not scale to large trace collections, and fixed monitors are brittle to unanticipated behaviors. We introduce Meerkat, which combines clustering with agentic search to uncover violations specified in natural language. Through structured search and adaptive investigation of promising regions, Meerkat finds sparse failures without relying on seed scenarios, fixed workflows, or exhaustive enumeration. Across misuse, misalignment, and task gaming settings, Meerkat significantly improves detection of safety violations over baseline monitors, discovers widespread developer cheating on a top agent benchmark, and finds nearly 4x more examples of reward hacking on CyBench than previous audits.
Figures & tables
Figure 1: A repository-level decomposition attack example for a ransomware attack workflow. The attacker attempts a ransomware attack, by asking a model in different contexts to (1) encrypt all of the users files and (2) ask for the user to pay money for them to decrypt the files. Most traces appear benign in isolation, but this small subset jointly forms a violating witness W within the much larger repository.
Data Source
Risk Focus
Labeled
Cases
Case size
Cyber Misuse ( Brown et al., 2025 )
Decomposition attacks
Yes
50
20–600
Bio Misuse ( Brown et al., 2025 )
Decomposition attacks
Yes
50
20–600
ImpossibleBench ( Zhong et al., 2026a )
Task gaming
Yes
200
10–100
TRACE ( Deshpande et al., 2026 )
Task gaming
Yes
200
10–100
CUA-SHADE-Arena ( Kale et al., 2025 )
Covert Sabotage
Yes
200
10–100
Terminal-Bench-2.0 ( Laude Institute, 2025 )
Developer cheating
No
10
61–364
Table 1: Evaluation corpora for repository-level safety auditing. “Labeled” indicates whether exhaustive ground-truth verdicts are available for all evaluated traces.
Figure 2: Distributed misuse detection precision-recall curves for Cyber and Bio domains. Meerkat (an agentic monitor) consistently improves AP over the baselines.
Figure 3: Task gaming detection precision-recall curves for ImpossibleBench. Meerkat (an agentic monitor) consistently improves AP over the baselines, although the performance of all methods decreases with more background traces.
Figure 4: Inference-compute scaling on a misuse case (cyber, bg=100x), using GPT-5.4 in Meerkat with n=10 runs per point. Left: pass@k curves by reasoning effort, where success is AUROC > 0.5. Higher compute increases the probability of detections. Right: pass@1 versus reasoning tokens. A 13x increase in reasoning yields a 5x increase in detection probability.
Figure 5: Evaluation cheating discovered by Meerkat. Left: On Terminal-Bench 2, the scaffold cheats with an AGENTS.md file with the correct answer; the agent adopted it verbatim and “verified” against the same source. Right: On BountyBench, the agent was missing necessary dependencies, so stood up a fake demo that does not use the vulnerable endpoint.
Figure 6: Distributed misuse detection (cyber, bg=100x) under a prompt injection (‘persona reframe’) and an adversarial-prefix attack, where the prefix reduces Meerkat’s AP by 10x.
Appendix figures & tables16 assets
Supplementary material from the paper’s appendix.
Appendix
Domain
BG
Model
Method
Δ
Meerkat
Naive Agent
Monitor
Bayesian
Buffer
DM-Cyber
20 ×
Qwen3.5
0.837 ± 0.052
0.632 ± 0.065
0.125 ± 0.028
0.243 ± 0.068
0.191 ± 0.056
+0.205
GPT-5.4m
0.445 ± 0.133
0.842 ± 0.000
0.199 ± 0.061
0.332 ± 0.066
0.229 ± 0.107
-0.397
100 ×
Qwen3.5
0.098 ± 0.034
0.456 ± 0.055
0.011 ± 0.000
0.081 ± 0.023
0.022 ± 0.003
-0.359
GPT-5.4m
0.297 ± 0.084
0.136 ± 0.072
—
0.053 ± 0.026
0.021 ± 0.002
+0.161
DM-Bio
20 ×
Qwen3.5
0.593 ± 0.087
0.572 ± 0.068
0.054 ± 0.003
0.176 ± 0.038
0.142 ± 0.044
+0.021
Appendix
Table 2: Results for distributed misuse using Trace-level AP. Higher is better. Δ is Meerkat minus the strongest baseline.
Domain
BG
Model
Method
Δ
Meerkat
Naive Agent
Monitor
Bayesian
Buffer
DM-Cyber
20 ×
Qwen3.5
0.970 ± 0.012
0.992 ± 0.005
0.568 ± 0.044
0.774 ± 0.044
0.633 ± 0.044
-0.022
GPT-5.4m
0.915 ± 0.049
1.000 ± 0.000
0.610 ± 0.040
0.931 ± 0.021
0.752 ± 0.113
-0.085
100 ×
Qwen3.5
0.539 ± 0.022
0.850 ± 0.033
0.439 ± 0.001
0.697 ± 0.031
0.576 ± 0.018
-0.311
GPT-5.4m
0.848 ± 0.049
0.645 ± 0.068
—
0.733 ± 0.058
0.744 ± 0.040
+0.104
DM-Bio
20 ×
Qwen3.5
0.838 ± 0.052
0.927 ± 0.033
0.457 ± 0.004
0.758 ± 0.053
0.600 ± 0.030
-0.088
Appendix
Table 3: Results for distributed misuse using Trace-level ROCAUC. Higher is better. Δ is Meerkat minus the strongest baseline.
Domain
TPC
Model
Method
Δ
Meerkat
Monitor
Bayesian
Buffer
Naive Agent
TRACE
10
Qwen3.5
0.760 ± 0.073
0.764 ± 0.077
—
—
0.640 ± 0.085
-0.004
GPT-5.4m
0.673 ± 0.069
0.719 ± 0.071
—
—
—
-0.047
GLM-5
0.721 ± 0.082
0.685 ± 0.085
—
—
—
+0.036
25
Qwen3.5
0.626 ± 0.088
0.673 ± 0.090
—
—
0.390 ± 0.094
-0.047
GPT-5.4m
0.604 ± 0.086
0.590 ± 0.084
—
—
—
+0.013
Appendix
Table 4: Trace-level average precision across safety corpora by traces per case. Higher is better. Δ is Meerkat minus the strongest baseline.
Domain
TPC
Model
Method
Δ
Meerkat
Monitor
Bayesian
Buffer
Naive Agent
TRACE
10
Qwen3.5
0.878 ± 0.043
0.876 ± 0.043
—
—
0.782 ± 0.052
+0.002
GPT-5.4m
0.853 ± 0.042
0.864 ± 0.042
—
—
—
-0.011
GLM-5
0.833 ± 0.051
0.827 ± 0.048
—
—
—
+0.007
25
Qwen3.5
0.828 ± 0.048
0.835 ± 0.048
—
—
0.681 ± 0.050
-0.007
GPT-5.4m
0.847 ± 0.047
0.848 ± 0.047
—
—
—
-0.001
Appendix
Table 5: Trace-level ROC-AUC across safety corpora by traces per case. Higher is better. Δ is Meerkat minus the strongest baseline.
Domain
TPC
Model
Method
Δ
Meerkat
Monitor
Bayesian
Buffer
Naive Agent
TRACE
10
Qwen3.5
0.882 ± 0.002
0.843 ± 0.002
—
—
0.751 ± 0.002
+0.039
GPT-5.4m
0.717 ± 0.003
0.822 ± 0.002
—
—
—
-0.105
GLM-5
0.714 ± 0.003
0.861 ± 0.002
—
—
—
-0.147
25
Qwen3.5
0.772 ± 0.003
0.808 ± 0.002
—
—
0.743 ± 0.002
-0.037
GPT-5.4m
0.539 ± 0.003
0.634 ± 0.003
—
—
—
-0.095
Appendix
Table 6: Case-level average precision across safety corpora by traces per case. Higher is better. Δ is Meerkat minus the strongest baseline.
Domain
TPC
Model
Method
Δ
Meerkat
Monitor
Bayesian
Buffer
Naive Agent
TRACE
10
Qwen3.5
0.852 ± 0.002
0.835 ± 0.002
—
—
0.729 ± 0.002
+0.017
GPT-5.4m
0.730 ± 0.002
0.782 ± 0.002
—
—
—
-0.051
GLM-5
0.755 ± 0.002
0.838 ± 0.002
—
—
—
-0.083
25
Qwen3.5
0.798 ± 0.002
0.790 ± 0.002
—
—
0.742 ± 0.002
+0.008
GPT-5.4m
0.570 ± 0.002
0.692 ± 0.002
—
—
—
-0.122
Appendix
Table 7: Case-level ROC-AUC across safety corpora by traces per case. Higher is better. Δ is Meerkat minus the strongest baseline.
Figure 7: Distributed misuse detection boost in trace-level AP from Meerkat over the per-trace monitor.
Figure 8: ImpossibleBench reward hacking detection boost in trace-level AP from Meerkat over the per-trace monitor.
Domain
TPC
Model
Method
Δ
Meerkat
Monitor
Naive Agent
TRACE
10
Qwen3.5
0.760 ± 0.073
0.764 ± 0.077
—
-0.004
GPT-5.4m
0.673 ± 0.069
0.719 ± 0.071
—
-0.047
25
Qwen3.5
0.626 ± 0.088
0.673 ± 0.090
—
-0.047
GPT-5.4m
0.604 ± 0.086
0.590 ± 0.084
—
+0.013
50
Qwen3.5
0.690 ± 0.074
0.672 ± 0.074
—
+0.018
Appendix
Table 8: TRACE trace-level average precision by traces per case (TPC). Higher is better. Δ is Meerkat minus the strongest baseline.
Figure 9: Sabotage detection on CUA-SHADE-Arena (n=403 transcripts, 17 tasks). Meerkat has slightly higher precision at high recall than the per-trace Monitor ( Kutasov et al., 2025 ; Kale et al., 2025 ) and EaE ( Arike et al., 2026 ) baselines.
Scaffold
Model
Pass Rate
Passing Traces
Cheating
ForgeCode (2026)
Claude Opus 4.6
81.8%
364
9 confirmed traces
opensage-agent (2026)
GPT-5.3-Codex
79%
67
None
Factory AI (2026)
GPT-5.3-Codex
79%
70
None
Terminal-Bench (2026)
GPT-5.3-Codex
75%
304
None
KRAFTON AI (2026)
Claude Opus 4.6
74%
331
None
Coder (2026)
GPT-5.3-Codex
74%
66
None
Appendix
Table 9: Terminal-Bench 2.0 scaffolds audited. All confirmed answer injection came from the top-ranked scaffold ( ForgeCode, 2026 ) . Across the other audited scaffolds, we found only one reward-hacking attempt, and it failed.
Task
ForgeCode (2026)
Baseline harness
Text suggesting cheating
compile-compcert
5/5
0/1
“following the project guidelines carefully”
configure-git-webserver
5/5
0/1
“follow the project guidelines exactly”
gpt2-codegolf
3/5
0/1
“following the detailed project guidelines”
headless-terminal
5/5
0/1
Reads AGENTS.md from /app/
mteb-leaderboard
4/5
0/1
Confirmed cheating
mteb-retrieve
5/5
0/1
“follow the project guidelines closely”
Appendix
Table 10: Performance on representative tasks where AGENTS.md may explain scaffold performance. Namely, each passing trace shown here references AGENTS.md or “project guidelines.”
Model
bn-fit-modify
mteb-leaderboard
Number of false positives
gpt-5.4-mini
No
No
4
gpt-5.4
Yes
No
3
Claude Opus 4.6
Yes
Yes
1
Appendix
Table 11: Detection results by Meerkat configuration on the confirmed Terminal-Bench patterns. We check the false positives manually.
Pattern
Traces
Tasks
Successful writeup/solution fetch
16
13/40
Failed cheating + legitimate solve
11
10/40
Legitimate (misclassified by pipeline and corrected manually)
9
8/40
Appendix
Table 12: Shortcut patterns in CyBench traces. Looking up external write-ups is the cleanest example of importing a pre-existing solution for the benchmark instance.
Source
Instances
Models
Setting
CyBench paper
0
—
Original evaluation
Transluce / Docent
1
—
Flag leakage case
NIST CAISI
4
2
Controlled evals
This work
16
4
Community traces
Appendix
Table 13: CyBench writeup-lookup findings compared with prior reports.
Raw scores
Bayesian (score-only)
Bayesian + clusters
Setting
n
AUROC
AP
AUROC
AP
AUROC
AP
Cyber, bg=100 ×
50
.574
.036
.541
.020
.745
.130
Cyber, bg=20 ×
20
.610
.173
.605
.150
.767
.383
Bio, bg=100 ×
15
.586
.030
.566
.026
.665
.166
Bio, bg=20 ×
20
.588
.131
.587
.119
.716
.377
Appendix
Table 14: Ablation of Bayesian baselines. Raw scores : per-trace monitor scores with no Bayesian processing. Bayesian (score-only) : the full Bayesian pipeline from Section J.2 without the cluster-boosting step. Bayesian + clusters : the complete pipeline including the cluster-boosted extension ( Section J.3 ). All metrics are macro-averaged over cases under leave-one-out cross-validation.
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 τ2-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.
Reshabh K Sharma, Shraddha Barke, Benjamin Zorn
University of Washington Seattle, Washington, USA · Microsoft Research Redmond, Washington, USA
Mobile agents powered by foundation models now automate complex, multi-step workflows on real devices, but their trajectories can violate app-specific security policies. Existing trajectory-level defenses rely on LLM prompting or rigid rules, and thus fail to support fine-grained, natural-language policies that generalize across apps and tasks. In this work, we introduce MATE, a lightweight, policy-conditioned auditor that encodes both agent trajectories and natural-language security policies to determine whether a trajectory violates a given policy and to explain why. Treating policies as editable text rather than fixed model parameters allows MATE to handle user-defined and evolving requirements without retraining. To construct MATE, we build a knowledge base by extracting app descriptions, workflows, and policies from hundreds of popular mobile apps worldwide, and synthesizing over 140K semantically realistic, policy-conditioned trajectories with a multi-stage pipeline. We further release MATEBench, a trajectory-level auditing benchmark with two synthetic subsets and one real-world subset of manually collected trajectories. Models trained with our synthesis-driven trajectory learning achieve over 95% accuracy on MATEBench, retain strong performance on external safety benchmarks, and audit trajectories from Zhipu's AutoGLM and Alibaba's Mobile-Agent on real devices with over 95% accuracy, outperforming prior methods by over 20%. MATE shows that practical, fine-grained security auditing for heterogeneous mobile agents is both feasible and effective.
Computer-use agents increasingly interact with browsers, terminals, file systems, and external services, introducing safety risks that emerge through runtime behavior rather than generated content alone. Existing guard models target static prompts and responses and are poorly suited to agent execution; existing executable safety platforms produce evaluation verdicts rather than the normalized supervision a guard model needs to learn across heterogeneous agent frameworks. We introduce HazardAuditor, an execution-grounded framework that closes both gaps. Its infrastructure runs heterogeneous agents (Claude Code, Codex, Hermes, and OpenClaw) in controlled environments and normalizes their interactions into a canonical event representation for cross-framework supervision. We further observe that token-level post-training objectives create a structural mismatch for generative guards, causing longer rationales to dominate gradient updates. Guard Policy Optimization (GuardPO) addresses this by converting deterministic safety outcomes into sequence-level advantages and normalizing rationale and verdict regions, making the safety decision the effective unit of optimization. Across multiple benchmarks and heterogeneous computer-use systems, HazardAuditor improves accuracy by up to 16.5 percentage points over the strongest prior guard. Code, models, and evaluation artifacts will be available at https://yunhao-feng.github.io/HazardAuditor/.
Yunhao Feng, Ruixiao Lin, Ming Wen +5
Ant Group · Hunan Institute of Advanced Technology · Zhejiang University +3