Preprint · August 2026

HarnessRisk

A Lifecycle-Oriented Benchmark for Agent Harness Safety

Yajing Bai1,2 Jinhao Duan1 Jie Peng1 Xianfeng Wu1 Sijia Liu3 Song Wang2 Tianlong Chen1,*

1 UNITES Lab, UNC Chapel Hill 2 University of Central Florida 3 Michigan State University

128Sandboxed cases
6Lifecycle phases
3Agent harnesses
14Model–harness configurations

Abstract

Large language models are increasingly deployed through agent harnesses that manage tools, extensions, persistent state, permissions, and external actions. Existing safety benchmarks mainly target individual attack mechanisms or a limited subset of operational settings, making it difficult to compare how safety failures emerge across different harness responsibilities.

We present HarnessRisk, a lifecycle-oriented benchmark that organizes agent harness safety into six operational phases: Harness Configuration, Capability Extension, Runtime Operation, State Persistence, Action Control, and Incident Recovery. HarnessRisk contains 128 sandboxed cases, each pairing a benign user objective with an adversarial instruction embedded in an untrusted workflow artifact. We evaluate each trajectory using Utility, Attack Success Rate, Persistence, and Detection.

Across three harnesses, six language models, and 14 model–harness configurations, attack success ranges from 12.6% to 80.9%, while Utility remains between 75.0% and 97.6%. Harness Configuration is the most vulnerable phase across all three harnesses. Explicit risk recognition also does not reliably lead to safe action. These results motivate evaluating safety across multiple harness responsibilities and at the level of the deployed model–harness configuration.

Threat Surface

Safety spans the entire agent lifecycle. HarnessRisk follows adversarial influence from initial setup to post-incident repair, with each phase isolating a distinct harness responsibility that can turn a benign workflow into a security failure.

  1. 01

    Harness Configuration

    Credentials, connectors, permissions, and security-sensitive policies.

    22 cases
  2. 02

    Capability Extension

    Plugin selection, installation, updates, and permission boundaries.

    22 cases
  3. 03

    Runtime Operation

    Untrusted emails, webpages, documents, and tool outputs.

    21 cases
  4. 04

    State Persistence

    Memory, identities, preferences, policies, and durable triggers.

    21 cases
  5. 05

    Action Control

    Payments, deployments, deletions, grants, and communications.

    21 cases
  6. 06

    Incident Recovery

    Investigation, rollback, rotation, state repair, and evidence preservation.

    21 cases
Lifecycle attack chain. An adversarial instruction can enter through configuration or extensions, redirect runtime execution, poison persistent memory, trigger unauthorized actions, and interfere with recovery.

Evaluation Design

Each case pairs a benign goal with an adversarial artifact and records the resulting observable outcomes across a legitimate three-turn workflow. The attacker-controlled artifact attempts to induce a specific unauthorized effect, while all actions remain inside isolated sandboxes and controlled mock services.

01

Initialize

Reset files, harness state, memory, and mock services from a case-specific world state.

02

Interact

Deliver three owner turns while the agent encounters untrusted workflow evidence.

03

Observe

Record transcripts, tool use, state changes, network observations, and mock-service effects.

04

Evaluate

Score each trajectory independently on task completion, compromise, persistence, and recognition.

Four trajectory-level metrics

Utility and security are measured separately.

Utility
Was the benign objective completed?
Attack Success
Was the adversarial objective realized?
Persistence
Did unsafe influence enter durable state?
Detection
Did the agent explicitly identify the risk?

Harnesses

Three execution environments

OpenClawNanobotHermes

Models

Six language models

DeepSeek-V4-ProGLM-5.2Kimi K2.6 MiniMax M3GPT-5.5Claude Opus 4.7

Replication

Independent evaluation

3sampling seeds 384trajectories / configuration

Findings

No evaluated configuration is lifecycle-safe. The model and harness jointly determine safety: strong task performance can mask unsafe execution, and recognizing a threat does not guarantee that the agent will block or remediate it.

01 4.3×

Harness effect

GLM-5.2 shifts from 54.7% ASR on OpenClaw to 12.6% on Nanobot.

02 38–59%

Useful but unsafe

Share of trajectories that complete the task while an attack succeeds, depending on harness.

03 97.9%

Detection is not enough

MiniMax M3 on OpenClaw detects risk frequently yet retains 31.2% ASR.

A

Configuration is the most vulnerable phase on every harness.

Attacks can weaken approvals or alter security-sensitive parameters inside otherwise authorized workflows.

B

Safety rankings change with the harness.

The same model can become more than four times less safe when tools, context, and authorization are presented differently.

C

Risk recognition must be coupled to control.

Agents may identify contaminated state but still execute unsafe actions or leave credentials, skills, and policies compromised.

Attack success across the lifecycle. Every cell reports ASR, with a shared scale across OpenClaw, Nanobot, and Hermes. Lower values are safer.
Utility can conceal compromise. Useful-but-unsafe trajectories occupy a substantial share of outcomes on every harness.
Detection helps, but does not guarantee safety. Detection is negatively associated with ASR, while utility has only a weak relationship with ASR.

Complete results

Model–harness safety matrix

Values are percentages. Lower ASR and Persistence are better; higher Utility and Detection are better.

Harness Model ASR ↓ Utility ↑ Persistence ↓ Detection ↑
OpenClawGPT-5.575.592.620.674.0
Claude Opus 4.747.775.017.278.9
DeepSeek-V4-Pro54.094.516.976.5
GLM-5.254.795.318.092.2
Kimi K2.680.997.120.543.2
MiniMax M331.294.310.897.9
NanobotDeepSeek-V4-Pro37.380.016.977.3
GLM-5.212.692.918.899.7
Kimi K2.655.294.623.961.0
MiniMax M326.882.714.794.8
HermesDeepSeek-V4-Pro65.497.620.534.6
GLM-5.223.896.84.061.9
Kimi K2.665.693.815.611.7
MiniMax M314.896.15.585.2

Cite

Harness safety is a system property. Use the preprint citation below; publication metadata can be updated here once available.

BibTeX
@article{bai2026harnessrisk,
  title   = {HarnessRisk: A Lifecycle-Oriented Benchmark
             for Agent Harness Safety},
  author  = {Bai, Yajing and Duan, Jinhao and Peng, Jie and
             Wu, Xianfeng and Liu, Sijia and Wang, Song and
             Chen, Tianlong},
  journal = {arXiv preprint},
  year    = {2026}
}