arXiv:2610.24055cs.CROct 2026

Manuscript Offprint

arXiv:2610.24055

ToolRosetta: Surface-Form Invariance of Tool-Call Guards

Hasan Demirkiran, Jens Ernstberger

Abstract

Step-level guards for tool-using agents are evaluated on tidy JSON tool calls, but deployed coding agents act through execute_bash and execute_code tools whose payloads are strings. We introduce TOOLROSETTA, which re-renders every candidate action in the AGENTDOJO and AGENTHARM splits of TS-BENCH as a Python call, as a shell command, and without the agent's rationale. The renderings are produced by code and verified by round-trip parsing, so the user request, the history, the label and the action's effect stay fixed while only the surface form changes. Across eleven guards with two placebo controls, frontier and strong open-weight guards are stable: no frontier error rate moves by more than 3.4 points. Four of five specialized agent guards are not: under the shell form their false-positive rates rise by 21 to 47 points on AGENTDOJO, and TS-GUARD's by 38 points on its own home benchmark, blocking between a third and nine in ten benign actions; the fifth, STEPGUARD, does not move. A small open guard drifts five points more permissive. Removing the agent's rationale moves most guards whose input carries it, in guard-specific directions. A request-blind control on one guard shows that the rationale is where intent is read from. A parser that restores the canonical call in front of the guard removes the effect for these renderings, by construction. Benchmark accuracy on JSON calls does not predict a guard's operating point behind a code-acting agent.

1 Introduction

Runtime guards that approve or block an agent's tool call before execution are the most direct defense for tool-using agents [Mou et al., 2026, Zheng et al., 2026, Chennabasappa et al., 2025]. They are trained and benchmarked on step datasets in which the candidate action is a typed call: a tool name and a JSON argument object. Code-acting agents [Wang et al., 2024, 2025] route most actions through one or two generic tools, execute_bash and execute_code, and the action the guard must judge is a string inside the argument. The same reservation, transfer or deletion arrives as reserve_hotel(hotel=...) inside a code block or as reserve-hotel -hotel ... inside a shell command.

Whether a guard’s verdict survives that change has not been tested. Recent agent-safety benchmarks stress agents and guards with multi-turn, decomposed or long-horizon attacks [Li et al., 2026a, Kothamasu et al., 2026, Jiang et al., 2026], audit what existing test suites cover [Chen et al., 2026a], or measure agents’ own paraphrase robustness [Rabanser et al., 2026]; none varies how the same action is written. Chen et al. [2026b] observed that guard accuracy on tool trajectories correlates with structured-data competence more than with jailbreak robustness, but did not intervene on the format. Work on the text-to-tool gap [Cartagena and Teixeira, 2026, Yu et al., 2026] asks how the agent changes when it can act. We ask the same of the referee.

40th Conference on Neural Information Processing Systems (NeurIPS 2026). Workshop: Third Workshop on Agents in the Wild: Safety, Security, and Beyond.

We answer it with a paired, label-preserving intervention. Every step in the AGENTDOJO and AGENTHARM evaluation splits of TS-BENCH [Mou et al., 2026] is rewritten so that only the candidate action's surface form changes. The renderings are produced by code, not by a model. Each rendered row is parsed back and compared with the original tool and arguments before it is accepted, so labels are inherited rather than re-annotated, and any change in a guard's decision is attributable to the writing of the action alone. Two placebo conditions bound tokenization noise and the effect of declaring the wrapper tool.

Our contributions are: (i) TOOLROSETTA, a derivation recipe and pinned artifact that turns any step-level guard benchmark into a surface-form invariance test: four renderings, two placebos, labels inherited, code renderings round-trip verified; (ii) an evaluation of eleven guards, from frontier APIs to five specialized agent guards, with pre-registered, placebo-adjusted estimands; (iii) the finding that surface form leaves frontier guards nearly untouched but shifts four of five specialized guards by 21 to 47 false-positive points while the fifth holds; and (iv) mechanism evidence, from a request-blind control on one guard, that intent is read from the agent's rationale.