StepShield: When, Not Whether to Intervene on Rogue Agents
Gloria Felicia, Michael Eniolade, Jinfeng He, Zitha Sasindran, Hemant Kumar, Milan Hussain Angati, Sandeep Bandarupalli
TL;DR
StepShield introduces a temporal evaluation framework for rogue-agent safety, shifting focus from whether an agent goes rogue to when a detector flags the violation. It provides a step-level benchmark built from real-world incidents, with three temporal metrics—Early Intervention Rate, Intervention Gap, and Tokens Saved—to quantify intervention timeliness. Empirical results show a 2.3x gap in early detection between an LLM-based judge and a fast pattern-based detector, with substantial economic benefits from early intervention, including a 75% reduction in monitoring costs and up to $108M in five-year enterprise savings for HybridGuard. The work establishes StepShield as a foundation for proactive, economically viable AI safety, releasing code and data under Apache 2.0 to enable broad adoption and extension.
Abstract
Existing agent safety benchmarks report binary accuracy, conflating early intervention with post-mortem analysis. A detector that flags a violation at step 8 enables intervention; one that reports it at step 48 provides only forensic value. This distinction is critical, yet current benchmarks cannot measure it. We introduce StepShield, the first benchmark to evaluate when violations are detected, not just whether. StepShield contains 9,213 code agent trajectories, including 1,278 meticulously annotated training pairs and a 7,935-trajectory test set with a realistic 8.1% rogue rate. Rogue behaviors are grounded in real-world security incidents across six categories. We propose three novel temporal metrics: Early Intervention Rate (EIR), Intervention Gap, and Tokens Saved. Surprisingly, our evaluation reveals that an LLM-based judge achieves 59% EIR while a static analyzer achieves only 26%, a 2.3x performance gap that is entirely invisible to standard accuracy metrics. We further show that early detection has direct economic benefits: our cascaded HybridGuard detector reduces monitoring costs by 75% and projects to $108M in cumulative savings over five years at enterprise scale. By shifting the focus of evaluation from whether to when, StepShield provides a new foundation for building safer and more economically viable AI agents. The code and data are released under an Apache 2.0 license.
