Agent Hacks Agent: Autoresearch for Production-Agent Red-Teaming

Xutao Mao, Xiang Zheng, Cong Wang
7/13/2026
cs.CRcs.AI

Official code: henrymao2004/Auto-research-red-teaming (20 stars, MIT, last commit 2026-07-14).

Abstract

Production LLM agents such as Claude Code and Codex operate over untrusted content, files, commands, and workspace state, making safety failures directly actionable. Red-teaming must therefore keep pace with evolving models and tools. Existing approaches mainly optimize attack success and preserve artifacts such as benchmarks, payloads, or attack programs, which record where attacks succeed but not the enabling conditions behind unsafe agent behavior. We study automated red-teaming for production LLM agents using one agentic research environment to discover reusable vulnerability knowledge about another. We present AHA, a falsifiable discovery loop that proposes a vulnerability hypothesis, constructs a falsifier, instantiates a valid attack, executes it in a sandboxed harness, reflects on the trajectory, and promotes confirmed findings into a Vulnerability Concept Graph (VCG). Each concept links an attacker-facing surface to an unsafe trajectory through a claim, enabling condition, falsifier, transfer prediction, and supporting evidence. Across Claude Code and Codex on three scenarios covering direct and indirect attacks, the discovered concepts reveal a reusable vulnerability core across models and agents. A frozen VCG requires no further search and outperforms the strongest frozen discovery baseline by 14.2 percentage points under the same single-shot protocol, while transferring across scenarios and attack channels. The resulting VCG provides an auditable artifact for production safety teams to inspect vulnerabilities, validate patches, and accumulate reusable safety knowledge. Our code is available at https://github.com/henrymao2004/Auto-research-red-teaming-in-sleep.

View on arXivView PDF

Code Implementations(1)

MIT

AHA (Agent Hacks Agent): AutoResearch for Production-Agent Red-Teaming — agents that surface their own reusable failure mechanisms, before attackers do.

203Jun 29, 20263 months agoMIT

Similar Papers

Cite this paper

@article{mao2026agent,
  title  = {Agent Hacks Agent: Autoresearch for Production-Agent Red-Teaming},
  author = {Xutao Mao and Xiang Zheng and Cong Wang},
  year   = {2026},
  eprint = {2607.11698},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2607.11698v1}
}

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/2607.11698.svg)](https://codeofpaper.com/paper/2607.11698)

Discussion