StepShield: When, Not Whether to Intervene on Rogue Agents
On the map: LLM safety and security → Prompt injection and agent security
Abstract (arXiv)
Agent safety benchmarks measure whether a monitor detects harm, not when. Yet timing is the difference between intervention and autopsy. We introduce StepShield, the first benchmark that treats detection timeliness as a first-class metric. On 9,429 incident-grounded code-agent trajectories, we define the Early Intervention Rate (EIR): the fraction of detected rogue trajectories where the alert fires within a k-step window after the divergence point, isolating timing quality from coverage. This metric exposes what we call the Forensics Trap: a pattern-based guardrail with 847 rules achieves 86% recall yet is statistically indistinguishable from random timing on EIR (0.23 vs. 0.24; p = 0.66, one-sided binomial; difference within CI), because over three-quarters of its alerts trigger on benign prefix code before any violation occurs. The 4x EIR gap between rule-based and semantic detectors is completely invisible to accuracy, recall, or F1. Our finding is structural: regex guardrails detect syntax, not intent, and therefore cannot distinguish the moment an agent turns rogue, rendering the entire deployed class of pattern-based monitors unsuited for real-time oversight. No existing method simultaneously achieves high recall, low false-positive rate, and timely intervention, establishing step-level rogue detection as genuinely unsolved.
Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Placed in Prompt injection and agent security, one of 12 directions in LLM safety and security. Builds on 32 of its 41 references that are in the map. First posted on arXiv 29 Jan 2026.
Builds on
32 of 41 references.
Closest ancestors · 5
Same direction, newest first
- 2026ToolSafe: Enhancing Tool Invocation Safety of LLM-based agents via Proactive Step-level Guardrail and Feedback15 Jan
- 2025ShieldAgent: Shielding Agents via Verifiable Safety Policy Reasoning26 Mar
- 2025SafeArena: Evaluating the Safety of Autonomous Web Agents6 Mar
- 2024AgentHarm: A Benchmark for Measuring Harmfulness of LLM Agents11 Oct
- 2024GuardAgent: Safeguard LLM Agents by a Guard Agent via Knowledge-Enabled Reasoning13 Jun
Other references · 27
- 2017Attention Is All You Needcited by 59,932
- 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,393
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
- 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,072
- 2023Let's Verify Step by Stepcited by 3,598
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2023WebArena: A Realistic Web Environment for Building Autonomous Agentscited by 1,908
- 2018Datasheets for Datasetscited by 1,371
- 2023AgentBench: Evaluating LLMs as Agentscited by 1,211
- 2024OSWorld: Benchmarking Multimodal Agents for Open-Ended Tasks in Real Computer Environmentscited by 1,134
- 2023Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversationscited by 1,124
- 2023GAIA: a benchmark for General AI Assistantscited by 1,084
15 more
- 2023Math-Shepherd: Verify and Reinforce LLMs Step-by-step without Human Annotationscited by 895
- 2022Discovering Language Model Behaviors with Model-Written Evaluationscited by 805
- 2023Identifying the Risks of LM Agents with an LM-Emulated Sandboxcited by 514
- 2024Sleeper Agents: Training Deceptive LLMs that Persist Through Safety Trainingcited by 478
- 2024WildGuard: Open One-Stop Moderation Tools for Safety Risks, Jailbreaks, and Refusals of LLMscited by 460
- 2024TheAgentCompany: Benchmarking LLM Agents on Consequential Real World Taskscited by 306
- 2024Agent-SafetyBench: Evaluating the Safety of LLM Agentscited by 280
- 2024ShieldGemma: Generative AI Content Moderation Based on Gemmacited by 224
- 2024Agent-as-a-Judge: Evaluate Agents with Agentscited by 223
- 2025AgentSpec: Customizable Runtime Enforcement for Safe and Reliable LLM Agentscited by 196
- 2022On The Computational Complexity of Self-Attentioncited by 137
- 2024SafeAgentBench: A Benchmark for Safe Task Planning of Embodied LLM Agentscited by 102
- 2025SHADE-Arena: Evaluating Sabotage and Monitoring in LLM Agentscited by 58
- 2025PolyGuard: A Multilingual Safety Moderation Tool for 17 Languagescited by 57
- 2025CTRL-ALT-DECEIT: Sabotage Evaluations for Automated AI R&Dcited by 11
Built on by
Citing papers per year: 2026: 5.
5 papers.
- 2026Agent Behavioral Contracts: Formal Specification and Runtime Enforcement for Reliable Autonomous AI Agentscited by 18
- 2026STARS: Skill-Triggered Audit for Request-Conditioned Invocation Safety in Agent Systemscited by 3
- 2026AgentDrift: A Step-Labeled Benchmark of Injection-Hijacked LLM Agent Trajectoriescited by 2
- 2026DriftNet: A Dual-Head Trajectory Transformer for Detecting and Localizing Prompt Injection in LLM Agentscited by 0
- 2026On the Effectiveness of Kernel-Level Evidence for Agent Securitycited by 0
- 2026On the Effectiveness of Kernel-Level Evidence for Agent Security24 Sep 2026
- 2026DriftNet: A Dual-Head Trajectory Transformer for Detecting and Localizing Prompt Injection in LLM Agents9 Sep 2026
- 2026AgentDrift: A Step-Labeled Benchmark of Injection-Hijacked LLM Agent Trajectories7 Sep 2026
- 2026STARS: Skill-Triggered Audit for Request-Conditioned Invocation Safety in Agent Systems11 Apr 2026
- 2026Agent Behavioral Contracts: Formal Specification and Runtime Enforcement for Reliable Autonomous AI Agents25 Feb 2026