Manuscript Offprint

arXiv:2610.02920

HASTE: Evolving Agent Harnesses Against Emerging Attacks Using Sparse Evidence

Xiqiao Xiong, Moxin Li, Zhixin Ma, Ouxiang Li, Wenjie Wang, Fuli Feng, Xiangnan He

ABSTRACT

Agent harnesses play a critical role in defenses by enforcing safety constraints to prevent unsafe actions. However, rapidly emerging attacks outpace manual harness adaptation, motivating automated harness evolution. Yet the signals available for harness evolution are often sparse, such as brief descriptions or a few attack examples in threat reports and preprints. To address this limitation, we introduce HASTE, a multi-agent framework that evolves agent harnesses from sparse threat evidence through an adversarial interplay between safety-specification generation and attack-case generation. Safety specifications guide harness updates toward addressing identified safety vulnerabilities, while attack cases probe for remaining safety vulnerabilities after each update. By feeding evaluation outcomes back into both processes, HASTE enables harness evolution against emerging attacks beyond the initially observed evidence. Experimental results across multiple backbone models, attack types, and evidence forms show that HASTE consistently reduces attack success rates while preserving benign-task utility. The code is available at https://github.com/xxiqiao/HASTE.

1 INTRODUCTION

Large language model (LLM) agents are autonomous systems that interact with external environments by taking actions and receiving observations (Grace et al., 2026; Pan et al., 2026). These systems generally consist of a backbone LLM operating within a harness. The LLM reasons over a context of interaction history and observations to select the next action (Yao et al., 2022), while the harness is a stateful program that maintains this context (Runkle, 2026), executes the selected tool calls (Grace et al., 2026), and incorporates the resulting observations (Pan et al., 2026). This has enabled agent systems to perform complex tasks across a wide range of real-world applications (Gottweis et al., 2026; Peng et al., 2026).

In deployment, agent systems are exposed to safety risks, such as harmful queries (Zhang et al., 2024), injected malicious instructions (Greshake et al., 2023), and compromised tools (Liu et al., 2026), any of which can lead to harmful or unauthorized actions. This motivates defense mechanisms (Zheng et al., 2026; Mou et al., 2026) that identify risks and prevent unsafe actions during agent execution. Currently, such defenses can operate at both the model and harness levels. Model-level approaches align the underlying LLM to avoid generating unsafe actions (Zhang et al., 2026; 2025b; Wang et al., 2026a), while harness-level defenses impose execution-time constraints through safety rules, permissions, and workflow controls (Lin et al., 2026; Jia et al., 2026). Because the harness directly controls agent execution and environment interactions, it plays a critical role in defenses by preventing unsafe actions and supporting benign task completion.

However, a key challenge is that real-world safety risks evolve rapidly. Emerging attacks are often first disclosed through only sparse evidence, such as descriptions or a few examples in threat reports (Sharbat, 2025) and preprints (Zhang et al., 2025c). Unlike a comprehensive attack benchmark, such evidence offers limited coverage for systematically evaluating and improving defenses, and therefore cannot directly serve as a signal for automatic adaptation. Nevertheless, defenses must adapt to new risks from the sparse evidence alone. For model-level defenses, adaptation typically requires updating the underlying model, which can be computationally expensive and slow (Trivedi

Figure

(a) Evolution From Full Benchmark

(b) Evolution From Sparse Threat Evidence

Figure 1: Illustration of harness evolution from a full benchmark versus sparse threat evidence. (a) With a full benchmark, diagnosis and proposal directly revise the harness based on judge feedback. (b) With sparse threat evidence, attack cases and a safety specification are generated to guide harness adaptation and iteratively optimized using judge feedback.

et al., 2025). Harness-level defenses provide a more flexible alternative by modifying execution constraints without changing model parameters, but such adaptation still largely depends on manual engineering and substantial human effort (Lou et al., 2026). This motivates the following question.

Can agent harnesses evolve to defend against emerging attacks using sparse threat evidence?

To tackle this important yet underexplored problem, our key idea is to extrapolate from sparse threat evidence to guide effective harness evolution. We operationalize this idea through an adversarial interplay between safety-specification generation and attack-case generation that drives harness evolution (cf. Figure 1). The two processes have opposing objectives: safety-specification generation aims to guide harness updates toward addressing identified vulnerabilities, while attack-case generation seeks to expose vulnerabilities that remain after each harness update. The evaluation outcomes of each round then feed back into both generation processes, allowing the harness to progressively evolve to defend against emerging attacks beyond the initially observed evidence.

In this paper, we introduce HASTE, a three-stage multi-agent framework for Harness Adaptation from Sparse Threat Evidence. First, an attack parser abstracts the sparse threat evidence into an attack specification that captures the core attack mechanism. Second, conditioned on the attack specification and the feedback from previous rounds, two optimizer agents respectively generate a safety specification and a set of attack cases, while a proposer agent revises the current harness according to the safety specification. Third, a judge evaluates the updated harness for attack success on the attack cases and utility on some benign cases. The evaluation outcomes are then fed back to the optimizer agents in the next round, which refine both the safety specification and attack cases, enabling harness evolution. Experiments on Agent-SafetyBench (Zhang et al., 2024) and STAC (Li et al., 2025) across four backbone models and two evidence forms show that HASTE outperforms existing baselines in defending against emerging attacks while preserving, and in some cases improving, utility on benign tasks. Our contributions are threefold:

• We identify the important yet underexplored problem of evolving agent harnesses to defend against emerging attacks given sparse threat evidence.

• We propose HASTE, a multi-agent framework that enables harness evolution by extrapolating from sparse threat evidence through adversarially enhanced safety specifications and attack cases.

• We conduct extensive experiments across multiple backbone models, evidence forms, and attack types, where consistent reductions in attack success rate (ASR) and improvements in safe and helpful rate (SHR) demonstrate the effectiveness of HASTE.

References (50)