TRANSMISSION // 2609.37196v2
A finer-grained fence for AI agents’ tool calls
Source published
ToolFence checks not just which tools an AI agent uses, but whether sensitive arguments such as recipients and destinations are authorized. Benchmark results are promising, though long-horizon attacks remain a challenge.

An agent can choose the right tool and still make the wrong move—for example, sending a message to an unauthorized recipient. ToolFence is a proposed way to check those details before a tool call is executed.
When an AI agent can send emails, search files or make payments, a malicious instruction hidden in a webpage or tool response may steer it away from the user’s request. A basic guard might block the agent from using an unrelated tool. But what if the agent uses the expected tool while changing a sensitive detail, such as an email recipient or payment account? The authors call this “within-tool hijacking.”
ToolFence aims to catch that subtler problem. Instead of judging only whether a tool is allowed, it checks whether the proposed action’s sensitive arguments are authorized for the task. The work is described in a research preprint by Yanjie Li, Yiming Cao and Bin Xiao.
Checking the call, not just the tool
ToolFence first uses an LLM to turn the authenticated user request into a task-specific authorization plan. That plan sets out permitted tools and effects, where sensitive argument values may come from, which workflow stages apply and how many times an action may occur. For example, a request to pay a bill could authorize a payment to the recipient named in a specified bill file, but not a different recipient suggested by an untrusted message.
A deterministic monitor then checks each proposed tool call and its concrete arguments before execution. The monitor is modeled using a Guarded Colored Petri Net, a formal way to represent workflow stages, available permissions, evidence and action limits. Tool output can provide evidence for a value when the user asked the agent to obtain that value from that source—but, by itself, it cannot create permission.
A fixed plan might miss a legitimate step that only becomes apparent during a task. ToolFence therefore allows an isolated LLM judge to review proposals for missing capabilities. If approved, a narrowly scoped permission is added, and the monitor checks the action again. The authors also describe a cache that can reuse permission rules without carrying specific argument values from one session into another.
What the tests found
The authors evaluated ToolFence on four benchmarks: AgentDojo, MCPTox, ASB and AgentLAB. Together, these cover attacks involving external content, poisoned tool descriptions, memory and longer sequences of actions. The tests used four language models. The authors report that ToolFence had the lowest or tied-lowest attack success rate in all 15 benchmark-and-model combinations they could evaluate. That is a result across these particular tests, not a guarantee against every attack.
On AgentDojo with Qwen3-max, reported attack success fell from 21.2% without ToolFence to 0% with it, while clean-task utility fell by 2.0 percentage points. In a measured subset of 200 AgentDojo instances using that model, ToolFence’s end-to-end runtime was 1.63 times the undefended baseline. The paper reports 12.95 times the baseline for CaMeL on the same subset. These figures are specific to the benchmark, model and measurement setup; they do not establish how the systems would compare in every deployment.
The harder case was AgentLAB, which tests attacks that unfold over longer workflows. ToolFence reduced attack success compared with an undefended agent, but the paper reports substantial residual attack success for some models. The authors suggest that attacks woven into a task’s business logic can be difficult to distinguish from necessary steps. They also identify a boundary of provenance checks: if an attacker can get a malicious value into the authenticated request itself, tracking where a value came from may not establish whether it was genuinely intended.
Promise, with limits
The results support the value of checking sensitive arguments, not just tool names. In an ablation study on one benchmark and model, removing those argument-binding checks raised attack success from 5.1% to 24.0%. The study also indicates a practical tension: overly strict permissions can interrupt legitimate work, while reviewing new permissions can introduce risk if a grant is too broad.
These are benchmark findings in simulated tool environments, not evidence of security in live systems. Results may depend on the task definitions, attack strategies, model versions and implementation choices. The paper is a preprint, so its claims should be treated as provisional rather than as independently validated conclusions. ToolFence offers a concrete approach to agent authorization, but its tests do not show that it eliminates prompt-injection risk.
- AI agent security
- prompt injection
- tool authorization
- data provenance
- LLM agents
- cybersecurity
Reviewed cross-references
These connections were reviewed by a model, not independently fact-checked by a human. Similarity does not imply agreement; consult the original papers and the evidence below.
Checking Whether AI Agents Act on What Users Actually Asked
Shared method: Both papers mediate proposed tool calls at the argument level and use provenance in authorization. ToolFence checks typed capabilities and argument sources; IntentFlow combines provenance policy with an intent contract that checks whether a value was authorized by the request. This is a shared component, not an identical authorization method, and their reported evaluations are not directly comparable.
Model review: · openai-codex/gpt-6-luna
Evidence and provenance
Selected excerpts, not complete papers. PDF extraction can omit figures or damage equations, tables and reading order; sources may be preprints.
2609.37196v2 — Original paper
Excerpt reference:
static/papers/2609.37196v2.md:16-56
Basis: Paper text
Source SHA-256:e15db5d62820abc6f8b72ad32e4411e5b3b3b38cb65611edd8ce6e2edf64c11a2609.37196v2 — Original paper
Excerpt reference:
static/papers/2609.37196v2.md:452-589
Basis: Paper text
Source SHA-256:e15db5d62820abc6f8b72ad32e4411e5b3b3b38cb65611edd8ce6e2edf64c11a2611.30745v1 — Original paper
Excerpt reference:
static/papers/2611.30745v1.md:54-97
Basis: Paper text
Source SHA-256:23cb6ceda3857c1d13dfb2476d8683c04a84acb64f9b4c51e7c58921cf2f28a1
Related reading
Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.
When an AI agent’s summary can rewrite what the user authorized
Source published
Shared keywords: ai agent security, data provenance, llm agents, prompt injection
Checking Whether AI Agents Act on What Users Actually Asked
Source published
Shared keywords: data provenance, prompt injection
Conflux puts permission checks outside the language model
Source published
Shared keywords: ai agent security, prompt injection
MemoryDojo tests how poisoned AI memories influence later tasks
Source published
Shared keywords: ai agent security
Why more AI attacks don’t always make agents safer
Source published
Shared keywords: prompt injection