TL;DR
When a security guardrail blocks an AI agent from doing something dangerous, what should it say? Say nothing, and the agent abandons the legitimate task you actually wanted done; explain why it failed, and a clever attacker eavesdropping on the error log gets a roadmap for their next exploit. This paper introduces FORK, a framework that pits a guardrail and an adaptive attacker against each other in an evolutionary arms race to learn the fine art of "safe disclosure"—giving the agent just enough truth to fix its mistake without giving the attacker any leverage.
What Problem Does This Paper Address?
Tool-using LLM agents operate with your authority (sending emails, paying bills), yet they constantly read untrusted data from the wild. If an attacker slips a malicious prompt injection into a document—say, changing a landlord's bank account number on a rent notice—an action-level guardrail must step in to block the unauthorized transfer.
Here lies the catch-22: whatever message the guardrail outputs enters the agent's public trajectory, where both the agent and the attacker can read it.
- Silent guardrails emit a generic
"Request rejected."The attack fails, which is great, but the confused agent gives up on updating your legitimate rent increase too. - Explanatory guardrails explain the rule that tripped:
"New recipients must appear in two transaction records."Helpful! Except the attacker reads that too, forges a second record in the next tool observation, and walks away with your money.
Hand-writing rules to navigate this trade-off—which the authors term safe disclosure—is nearly impossible because humans can't anticipate every way an adaptive attacker will weaponize an error message.
Methods
Instead of fine-tuning model weights, FORK keeps the underlying LLM frozen and learns an inspectable, plain-English skill library split into two halves: decision skills (approve or reject?) and disclosure skills (what do we say publicly?). At deployment, FORK makes a single structured LLM call per action, strictly settling the decision before drafting the message so formatting guidance never corrupts security judgment.
To build this library, FORK runs a gradient-free co-evolution loop:
- Twin-Pair Episodes: Every training scenario pairs a benign user goal with a harmful attacker goal in the exact same environment, forcing the guardrail to reason about true authorization rather than lazy surface cues.
- Public-Channel Adaptation: Across sequential attempts, the attacker reads every public refusal message and evolves its own attack skill library. Every rejection becomes a "fork" between recovery and breach.
- Programmatic Verification & Reflection: Rather than trusting what the agent claims happened, an environment-state verifier checks what actually mutated. Role-specific LLM "reflectors" then diagnose breaches, false refusals, and exploited messages to update the text libraries.
- Maximin Opponent Selection: To prevent the guardrail from patching today's exploit while forgetting yesterday's, FORK uses game-theoretic maximin selection over all past checkpoints—constantly testing both sides against their worst historical matchups.
Datasets
- Training: Remarkably small—just 65 hand-authored twin pairs built on four public SHADE-Arena worlds.
- Evaluation: The frozen library is tested zero-shot across four benchmarks spanning static to fully adaptive threats: AgentDojo and MT-AgentRisk (static replays), STAC (adapts in final turns), and FORK-World—a newly introduced 677-scenario benchmark (ported from AgentDojo, AgentLAB, and SHADE-Arena) where a live attacker reads every refusal message and rewrites both user turns and tool observations on the fly.
Key Insights and Ideas
- Helpful explanations are actively dangerous without training: Prompting a guardrail to "be careful" isn't enough. In ablations, an unlearned explanatory guardrail actually increased the Attack Success Rate (ASR) over a silent guardrail (from 30.3% to 39.3%) while barely helping the agent—adaptive attackers extract way more value from naive explanations than agents do.
- Static benchmarks lull us into a false sense of security: Frontier models like Claude Sonnet 4.5 and GPT-5.6-Sol look practically invincible on static AgentDojo without a guardrail (0.1%–0.2% ASR). Put them in FORK-World against an online adaptive attacker, and their unguarded ASR skyrockets to 66.3%–73.9%.
- Text skills transfer across brains: Because FORK evolves natural-language principles rather than neural weights, a library trained using Qwen3-32B can be dropped directly into Sonnet 4.5 or GLM-5 at deployment—and actually performs even better on the stronger models.
Key Results
Using a single frozen skill library distilled from those 65 training pairs:
- FORK-World (Adaptive): Averaged across three agents, FORK (with Sonnet 4.5) slashes ASR from 78.4% down to 14.1% (beating the strongest baseline, TS-Guard, at 55.0%) while keeping benign utility above 85% (a mere 0.5-point drop from having no guardrail at all).
- MT-AgentRisk (Unseen Environments): FORK drops ASR from 70.6% to 9.1% while preserving 93.1% benign utility.
- Efficiency & Recovery: On Qwen3-Next-80B, adding learned disclosure skills on top of learned decisions boosts post-rejection task recovery by 21.1 points and cuts wasted tool calls per success by 26.4%, without increasing attack success.
Limitations and Future Work
FORK assumes the platform can safely record the user's initial authenticated request and operator profiles at ingress; if those anchors are missing, it falls back to a stricter "rogue-user" mode that blocks attacks well (lowering ASR across all rogue-user benchmarks) but rejects more broadly. Additionally, malicious tool metadata and compromised tools themselves are out of scope. Finally, while FORK drastically shrinks disclosure risk against an online adapting LLM, an attacker optimized offline specifically against FORK's frozen library might still uncover blind spots—making continuous, post-deployment co-evolution a natural next step.
Summary updated