"Shall We Approve?" Consequence-Aware Approval for Autonomous Coding Agents
Weiheng Wu, Junkai Chen, Zhensu Sun, Jieke Shi, Yunbo Lyu, David Lo
Abstract
Coding agents increasingly rely on automated approvers to decide whether a proposed shell command may run. Existing approvers, from rule-based checkers to guardrail models and deployed permission classifiers, base their decisions on the text of the request and command. Yet a command's behavior depends on the code it invokes and the state of the workspace, and systems that observe file changes leave the assessment to the agent or a human after execution. We present Caper, a consequence-aware approval mechanism that pre-executes each command in a snapshotted sandbox, provides an independent approver with a bounded report of its observed effects, commits allowed commands, and rolls back blocked ones with a reason the agent can act on. Compared with six existing systems, Caper achieves the lowest harmful-outcome rate on SABER (6.7% versus at least 14.8%) and YoloFS-Ext, a benchmark we build in which harmful behavior is hidden inside invoked tools (7.8% versus at least 35.3%), while blocking 1.0% of the safe twins of the dangerous tasks in YoloFS-Ext.
Create a lesson
Metadata
- Categories
- cs.CR, cs.AI
- Comments
- 24 pages, 9 figures
Related papers
PrivacyFlow: Privacy in AI Agents through Information Flow Analysis and Consequence-Aware Risk Management
Shared title terminologycs.CRRobin Staab, Tom Wollschläger, Vahab Mirrokni et al.
ParseGap: Testing What Coding Agents Authorize and What Shells Execute
Shared title terminologycs.CRJieyu Li
Who Is Prompt-Injecting Coding Agents? An Empirical Study of Hidden AI-Directed Text on GitHub
Shared title terminologycs.CRGabi Nakibly, Zvika Babo
Who Grades the Agent? Privilege Separation for Coding-Agent Benchmarks
Shared title terminologycs.CRNathan Nour Houlamy, Mattia Favretto, Earlence Fernandes et al.
ALIoTh: Orchestrating Multi-Agent LLMs for Autonomous IoT Penetration Testing
Shared title terminologycs.CRPironti Francesco Aurelio, Arena Luigi, Blefari Francesco et al.
CloakFEM: Agentic FEM Code Generation for Red-Teaming Computational Resource Exhaustion
Shared title terminologycs.CRLi Zheng, Simin Chen