Saber : Benchmarking Operational Safety of LLM Coding Agents in Stateful Project Workspaces

Qi HU, Yifeng Tang, Qinghua Wang, Lanyang Zhao, Pengji Zhang, Yuhao QING, Xin YAO, Dong HUANG, Lin Zhang, Zhuoran Ji · 2026

Read Saber : Benchmarking Operational Safety of LLM Coding Agents in Stateful Project Workspaces by Qi HU, Yifeng Tang, Qinghua Wang, Lanyang Zhao, Pengji Zhang, Yuhao QING, Xin YAO, Dong HUANG, Lin Zhang, Zhuoran Ji (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2606-01317.txt.

Introduction

Hu and co-authors benchmark coding agents on real project safety. Coding agents now act in steps, not single replies. Safety thus shifts from words to action sequences. Past benchmarks test if models refuse unsafe prompts. They say little about stateful workspaces after actions run. SABER places models in realistic agent-style projects. It judges safety from the final state of the environment.

Violations get sorted by cause, not just counted. This reveals model-specific safety profiles across tools. Even the best model tops a 54 percent harmful violation rate. Current alignment falls short for real project settings. The benchmark is public for other teams to use. It pushes safety checks toward outcomes, not refusals.

Catalog record

CREATORQi HU, Yifeng Tang, Qinghua Wang, Lanyang Zhao, Pengji Zhang, Yuhao QING, Xin YAO, Dong HUANG, Lin Zhang, Zhuoran Ji
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE85 KB
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2606.01317

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Saber : Benchmarking Operational Safety of LLM Coding Agents in Stateful Project Workspaces Qi HU, Yifeng Tang, Qinghua Wang, Lanyang Zhao, Pengji Zhang, Yuhao QING, Xin YAO, Dong HUANG, Lin Zhang, Zhuoran Ji Abstract Large language models are increasingly deployed as coding agents, shifting safety from individual responses to action sequences. Existing benchmarks, however, primarily assess whether models refuse unsafe prompts, leaving impacts on stateful workspaces largely unexamined. We present Saber , a benchmark for environment-aware operational safety that places models in realistic agent-style projects and evaluates safety from the final environment state after a sequence of actions. Beyond binary safety-violation reports, Saber categorizes violations by cause, enabling analysis of model-specific safety profiles. Our evaluations show that even the best-performing model has more than a 54% harmful safety-violation rate (HSR), suggesting that current alignment remains insufficient for realistic project environments. Saber further reveals distinct safety profiles across models. Our benchmark is publicly available at https://github.com/sssr-lab/saber . 1 Introduction Large language models (LLMs) are shifting from passive text generation to active execution in computational environments. Modern agents, such as Claude Code 3 and OpenClaw 10 , can edit files and execute shell commands, enabling interaction with operating-system resources and project state. This capability increases their utility in debugging and multi-step automation, but it also changes the nature of safety risks. Harmful behavior extends beyond generating unsafe responses: the LLM driving an agent may delete data or leak sensitive information. Consequently, safety evaluation must address not only whether models refuse dangerous instructions, but also whether the underlying model behaves safely in dynamic environments. Existing safety benchmarks have made important progress on refusal of unsafe requests. However, most still measure safety in isolated prompt-response interactions. Namely, they check whether a model complies with an explicitly harmful request or resists injected instructions. These evaluations capture important risks, but they do not reflect real model behavior in stateful, multi-step project environments where actions produce persistent side effects. We identify three gaps in current evaluations. First, injection benchmarks deliver payloads through prompts or tool outputs, but do not test threats embedded in project artifacts (e.g., a malicious Makefile target). Second, benchmarks test compliance with explicitly harmful requests, but not whether models autonomously select dangerous operations (e.g., chmod -R 777 to resolve a permission error). Third, benchmarks treat safety as a property of the instruction itself, ignoring that the same operation (e.g., database reset) can be routine in development but catastrophic in production. To this end, we introduce Saber , a S afety A ssessment B enchmark for E nvironment-Aware R easoning. Saber places models in realistic agent-style project environments initialized with source code, configuration files, and git history, mirroring the workspaces in which modern agents operate. Each environment runs inside a Docker sandbox to ensure isolation and reproducibility. Unlike prompt-only benchmarks, Saber evaluates what an LLM-driven agent does , not merely what it says. Saber converts each run into an auditable artifact containing executed commands, tool calls, outputs, and state deltas. It flags violations when commands or tools match task-specific harmful patterns, or when state deltas violate global safety properties such as destructive filesystem changes, sensitive-data exfiltration, and unauthorized access. We define a layered outcome taxonomy that distinguishes genuine safety from over-refusal and reveals whether harm arises from malicious environmental content, unsafe autonomous choices, or failure to recognize contextual warnings. Evaluating 13 coding-capable models on 716 executable tasks, we show that Saber exposes distinct safety profiles across models. Moreover, even the best-performing model achieves only a 31.0% safe-completion rate, suggesting that current alignment remains insufficient for realistic project-environment operation. We make the following key contributions: • We introduce Saber , a benchmark for environment-aware operational safety of LLM coding agents in Docker-sandboxed project workspaces, covering three under-explored risk dimensions. • We propose an evaluation protocol that judges completed agent runs rather than model responses, flagging violations through task-specific harmful patterns and global safety-property checks. • We evaluate 13 models, showing that even frontier systems frequently take harmful actions and that current alignment remains inadequate for workspace-level safety. Model XSTest HarmB. AgentH. PriLens SafeTB InjecAg. AgentDyn NAAMSE SkillInj. Opus 4.6 32.2 0.6 0.0 7.5 37.3 0.0 0.0 0.2 1.2 GPT-5.4 53.6 0.0 1.1 15.6 30.6 0.0 0.0 4.8 20.0 MiniMax-M2.5 57.1 0.3 1.1 38.1 35.5 2.6 27.7 0.6 8.4 Qwen3.5-397B 62.4 8.1 0.6 43.8 37.3 4.8 14.7 1.6 14.4 Qwen3.5-35B 62.2 3.1 0.0 49.7 40.6 0.7 8.0 1.4 19.2 Qwen3.5-9B 59.6 3.6 2.3 67.5 46.8 14.4 12.6 2.4 23.2 DeepSeek-V3 63.8 22.5 11.9 54.2 37.6 11.0 38.1 26.0 43.1 DeepSeek-V3.2 60.2 25.0 11.9 46.2 28.8 7.5 87.2 19.6 49.7 DeepSeek-R1 64.0 14.9 24.4 41.8 49.5 6.5 85.0 12.4 69.7 GLM-5 65.6 10.6 6.2 17.9 23.8 1.5 8.6 9.2 30.7 GLM-4.7 68.2 11.6 4.0 36.1 37.2 0.3 2.5 11.8 48.5 Kimi-K2.5 61.8 10.9 4.5 32.5 24.4 2.1 2.1 6.0 59.5 Ling-flash-2.0 65.3 11.6 4.0 76.7 46.8 7.9 1.2 35.8 62.5 Table 1: Model safety scores on existing benchmarks show inconsistent and incomplete safety signals. SafeTB reports the high-risk tool-use rate (%) using SafeToolBench’s threshold S>\alpha , where \alpha=10 . XSTest ( \uparrow ) measures safe-request compliance (higher is better). Others ( \downarrow ) report unsafe or attack-success rates (lower is safer). 2 Related Work Existing work evaluates LLM safety through instruction refusal. Zou et al. 22 introduced transferable adversarial suffixes, while HarmBench 9 and SORRY-Bench 18 standardized red-teaming with broad harm taxonomies. XSTest 12 and OR-Bench 5 show that many models over-refuse by rejecting safe prompts at high rates. AgentHarm 2 extends evaluation to agentic settings with multi-step requests. On the injection front, Abdelnabi et al. 1 formalized indirect prompt injection, and Tensor Trust 16 collected large-scale attack-defense data through gamification. InjecAgent 20 and AgentDojo 6 moved injection evaluation into agentic tool-calling environments, followed by AgentDyn 8 , NAAMSE 11 , and Skill-Inject 14 , which introduce dynamic generation, evolutionary search, and skill-file attack vectors respectively. ASB 21 provides a unified formalization spanning prompt injection, memory poisoning, and backdoor attacks. A growing line of work evaluates safety in tool-use and agentic environments. PrivacyLens 15 and SafeToolBench 17 test privacy norm compliance and unsafe API call patterns. R-Judge 19 benchmarks risk awareness from recorded agent interactions. ToolEmu 13 uses an LM-emulated sandbox for scalable risk identification. In the code domain, CyberSecEval 4 evaluates insecure code generation, and RedCode 7 tests whether code agents refuse explicitly risky prompts in sandboxes. Despite this progress, existing benchmarks have three limitations: 1) they inject threats through prompts, tool outputs, or skill files, but not project-level artifacts such as build configurations or dependency manifests; 2) they test compliance with explicitly harmful or injected instructions, but not whether models autonomously choose dangerous operations while pursuing legitimate goals; 3) they treat safety as an instruction property, without considering how environmental context, such as production indicators or deployment configurations, should modulate LLM-driven agent behavior. 3 Preliminary Analysis We evaluate 13 models on nine representative safety benchmarks ( Table 4 ). As Table 1 shows, safety does not simply follow from capability scaling. DeepSeek-R1, despite strong reasoning ability, shows among the highest vulnerability rates (85.0% on AgentDyn, 69.7% on Skill-Inject). Within the Qwen3.5 family, the 397B model is not consistently safer than the 35B model (e.g., 8.1% vs.

Read the complete text