SHE: Trajectory-driven Safety Harness Evolution for LLM Agents

Wanying Qu, Qinghua Mao, Yu Li, Jiyao Liu, Xin Zhang +10 more
8/10/2026
cs.AIcs.CV

No confident code implementation found for this paper.

Abstract

The safety of large language model (LLM) agents depends not only on model weights but also on the agent harness that manages context, memory, tools, permissions, and runtime control. Existing safety mechanisms often treat the harness as a fixed deployment artifact, limiting their ability to evolve with emerging risks.

Show full abstract

Moreover, coupled functions across harness components obscure safety responsibility attribution, making localized evolution difficult. We propose Safety Harness Evolution (SHE), a framework that learns evolving safe boundaries from rollout trajectories. SHE decomposes the harness into four artifacts with explicit safety responsibilities, including the System Prompt, Rule Bank, Safety Memory, and Tool Policy, defining clear functional boundaries for localized evolution. Based on this decomposition, SHE introduces an attribution-guided evolution loop that converts trajectory failures into structured diagnoses, learns artifact-specific boundary refinements, and selects evolved harnesses through safety-utility validation. Experiments on Agent-SafetyBench demonstrate that SHE effectively enhances safety through harness evolution, achieving a 3.1x ASR reduction compared with static SafeHarness, while also improving benign utility. The evolved harness further generalizes to unseen risks on the held-out AgentHarm benchmark and transfers across agent models without additional evolution.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{qu2026she,
  title  = {SHE: Trajectory-driven Safety Harness Evolution for LLM Agents},
  author = {Wanying Qu and Qinghua Mao and Yu Li and Jiyao Liu and Xin Zhang and Dadi Guo and Yanxu Zhu and Qingyu Liu and Leitao Yuan and Xi Lin and Shanfeng Zhu and Yanwei Fu and Jing Shao and Xia Hu and Dongrui Liu},
  year   = {2026},
  eprint = {2608.09885},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2608.09885v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2608.09885.svg)](https://codeofpaper.com/paper/2608.09885)

Discussion