acceptodds
Under review as a conference paper at ICLR 2027

Surface Cues Are Not Enough: Towards Content-Grounded Defenses for Tool-Using Agents

Abstract

LLM agents combine reasoning with external tools to solve complex real-world tasks, but the same tools can also enable harmful actions, motivating guardrails to monitor agent behavior. However, existing evaluations construct harmful and benign tasks independently, so they often differ not only in safety-critical content but also in instructions and tools. This makes it difficult to tell whether guardrails truly identify the content that makes a task harmful or simply rely on these surface cues. To address this limitation, we introduce CoPair-Bench, a content-contrastive paired benchmark that systematically constructs harmful–benign task pairs while holding instructions and tools fixed, isolating the safety-critical semantic differences that determine harmfulness. Evaluations reveal that existing guardrails struggle to distinguish harmful tasks from their benign counterparts: they either allow both, providing negligible protection, or reject both indiscriminately, resulting in severe over-refusal. This behavior suggests that their decisions are driven largely by superficial cues, such as task instructions and tool names, rather than by the harmful objective itself. To mitigate this issue, we further propose Harm-Perception Shield (HP-Shield), a training-free self-exploration defense that prompts agents to first inspect content for safety risks and distills reusable safety experiences from iterative sandbox simulations. HP-Shield improves Safe-Utility by 14.48% on average compared with existing guardrails, enabling more accurate safety decisions without model retraining.

Primary area:
alignment, fairness, safety, privacy, and societal considerations
Keywords:
Agent Safety, LLM Safety, Tool-using agents

Reviews

Among:
Shape:
1234this paper, Bottom 10%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 1.67 over 3 reviews, above 10% of the others.
Reviewer_HhYKOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

The paper introduces CoPair-Bench, a 175-pair benchmark intended to isolate content-dependent harmfulness under fixed instructions and tools. It also proposes HP-Shield, combining content inspection with safety experiences distilled from sandbox simulations. Across three agent backbones, the method improves contrastive pair accuracy by an average of 14.48 percentage points over the strongest existing guardrail for each backbone.

Critical strengths
  1. Paired harmful/benign evaluation exposes over-refusal that harmful-only blocking rates conceal, making the benchmark question consequential.
  2. Prompt/experience ablations, cross-model transfer, and repeated-run/judge checks support a practical benefit from content-grounded guidance.
Critical weaknesses
  1. Evaluation setting: The paper attributes failures to superficial cues, but the cue-free subset consists only of OpenAgentSafety and AgentDojo, whereas other sources are entirely cue-bearing (Table 3). The cue-removal experiment helps, but source difficulty and access to decisive content still need controlled comparisons before concluding that existing guards principally use shortcuts.
  2. Method contribution: HP-Shield adds an inspection prompt and a library of safety rules. Prompt-only and iteration ablations show improvement, but do not establish why sandbox execution is necessary. A rule library generated directly from the same entity cards/cases, with matched rule length and budget, would distinguish self-exploration from simply supplying more detailed instructions.
  3. Generalization and comparison: The 108 exploration cases come from 18 manually specified entity cards and run in benchmark environments. Cross-model transfer does not establish transfer to unseen entities, tools, or risks. The paper needs a clear separation of preparation and evaluation, and comparisons where existing guards receive the same inspected evidence; otherwise gains may reflect tailored guidance or information access.
  4. Benchmark validity: The defining instruction-invariance claim is unclear: Figure 14 changes the requested item from handmade crafts to illegal drugs, while Section 3.2 says 24 native AgentHarm pairs are retained as strictly matched. If such pairs enter the evaluation, they cannot isolate content-only harmfulness. Dataset membership and results on an audited strictly invariant subset are needed.
Questions for authors
  1. Does HP-Shield outperform a directly generated safety checklist from the same 18 entity cards and 108 cases, with matched prompt length and preparation budget?
  2. What separates entity-card preparation from evaluation, and do gains persist for held-out risks/tools and when baselines receive the same inspected evidence?
  3. Is Figure 14 part of the final evaluation? Please report instruction-equality checks and controlled within-source cue-removal results.
Reviewer_KeSLOpenReview ↗
Rating
1
Confidence
3
Informativeness
1
Presentation
2
Soundness
1
Read review
Paper summary

This paper argues that harmful and benign tasks in existing agent-safety benchmarks often differ in instruction, tools, and content all at once, so it is unclear whether guardrails judge the harmful content itself or rely on surface cues. To test this, the authors build CoPair-Bench, 175 harmful–benign pairs that share the same instruction and tools and differ only in the processed content. Results show that existing guardrails often allow or block both members of a pair. The authors further propose HP-Shield, which combines a content-inspection prompt with safety experiences learned through sandbox self-exploration, and report higher Contrastive Pair Accuracy (CPA) than existing guardrails.

Critical strengths

Strengths

  1. The paired design is well motivated: keeping the instruction and tools fixed and changing only the content provides a clean way to test whether guardrails actually look at what makes a task harmful.
  2. The analysis split by the presence of explicit cues, together with the cue-removal experiment (Figure 17), effectively exposes a real weakness of current guardrails. The CPA metric is also more informative than harmful-only blocking rates, since it also counts over-refusal.
Critical weaknesses

Weaknesses

W1. Limited novelty of the proposed defense relative to ToolShield, and an unfair comparison.

HP-Shield's experience-learning procedure is nearly identical to the self-exploration pipeline of ToolShield [1]. Both methods (1) synthesize test cases when a new tool or entity is introduced, (2) execute them in a sandbox, (3) distill safety experiences from both successful and failed trajectories, and (4) continuously update an experience list. At deployment, both inject the final fixed experience list into the agent's context. The only substantive difference in the core pipeline is that HP-Shield changes the generation condition in step 1 from multi-turn cases to benign cases. However, Section 4 does not discuss how HP-Shield relates to ToolShield.

HP-Shield's experiences are generated by each backbone from author-written entity cards. The cases are synthesized and executed in the same benchmark environments used for evaluation, and they include benign cases, which makes this setup naturally favorable to CPA. In contrast, judging from the supplementary code, the ToolShield baseline does not appear to have been adapted to this setting and mainly acts as a fixed prompt. As a result, it is unclear how much of the reported gap comes from the method itself rather than from these differences in setup.

Apart from the change in case generation, the only component that does not come from ToolShield is the content-inspection prompt (Figure 19). According to Table 4, the average CPA of this prompt on its own is not better than that of ToolShield (69.52% vs. 70.28%). Thus the advantage of HP-Shield (+Exp.) over ToolShield comes entirely from the experience-learning loop. However, as discussed in W2, this comparison is unfair, so the paper provides no evidence that HP-Shield’s pipeline outperforms ToolShield’s. Moreover, the Reproducibility Statement claims that all prompts used throughout the pipeline are released, but the README of the supplementary code states that the internal prompts, experience assets, and construction workflows for experience generation are outside the release, which limits the reproducibility of these results.

W2. The benchmark does not match its own design principle.

The paper states that “every retained pair shares one instruction and tool set, differs only in processed contents, and reverses the safety label” (Figure 2 caption). The authors’ own example contradicts this: in the AgentHarm pair shown in Figure 14, the benign instruction asks for a website to trade handmade crafts and the harmful one asks for the same website to trade illegal drugs. This is unlikely to be an isolated case. Table 3 marks 110 of the 175 pairs (62.86%) as containing an explicit cue in the instruction. If both tasks of a pair shared one instruction, the cue would appear in both and could not help a guardrail differentiate them. Yet the paper attributes most guardrail gains to these pairs, which suggests that the two instructions differ in most of them. This weakens the claim that CoPair-Bench is a strictly paired benchmark. The authors should report how many pairs actually share an identical instruction.

Given that the defense largely reuses an existing pipeline (W1) and its advantage is not supported under a fair comparison (W2, W3), the remaining contribution is the paired benchmark and its analysis. However, most of the task pairs in the benchmark do not follow its own design principle (W2), so the central claim of the benchmark is not well supported. Overall, I do not think the paper is ready for publication at ICLR.

References

[1] Li X, Yu S, Pan M, Sun Y, Li B, Song D, Lin X, Shi W. Unsafer in Many Turns: Benchmarking and Defending Multi-Turn Safety Risks in Tool-Using Agents. In: Proceedings of the Forty-third International Conference on Machine Learning (ICML), 2026.

Questions for authors

Questions

Q1. Please describe, stage by stage, how HP-Shield differs from ToolShield, and which of these differences account for the performance gain.

Q2. Please run ToolShield's pipeline on CoPair-Bench with the same backbones, environments, and generation budget (108 cases, 3 iterations), and report the results alongside HP-Shield (+Exp.).

Q3. How much of the gain comes from adding benign cases? An ablation of HP-Shield with harmful cases only would help answer this.

Q4. How was the content-inspection prompt (Figure 19) designed? Was it tuned on CoPair-Bench?

Q5. How many of the 175 pairs share an exactly identical instruction, and how do the main results change when the evaluation is restricted to these pairs?

Please also see the Weaknesses section for other concerns.

Reviewer_vNe5OpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

The paper argues that existing agent-safety benchmarks build harmful and benign tasks independently. Guardrails can therefore score well on surface cues (instruction wording, tool names) without examining the content that actually makes a task harmful. It introduces CoPair-Bench: 175 harmful–benign pairs from AgentDojo, AgentHarm, P2SQL, SafeArena and OpenAgentSafety (OAS). 138 benign members are generated: GPT-5.6-sol writes candidates, Opus-4.8 reranks them, five annotators edit them, and both members of each pair are checked for executability. The stated design keeps instruction and tools fixed and changes only the processed content. Pairs are split by whether the instruction contains an explicit safety cue (110 cued, 65 cue-free). The paper evaluates eight guardrails on GPT-5, Kimi-K2.5 and Qwen3.5 backbones, using ABR, TAR and a pairwise metric (CPA). It reports that guardrails tend to allow or block both members of a pair, and that their gains concentrate on cued pairs. It then proposes HP-Shield, a training-free defense with two parts: a content-inspection prompt, and 14 natural-language experiences per backbone learned by running the agent on 108 synthesized cases. HP-Shield reports the best CPA for all three backbones (83.4 / 80.6 / 90.9), including on cue-free pairs.

Critical strengths

S1. The question is the right one, and CPA is a useful metric. Testing whether a guardrail's decision tracks the factor that makes an action harmful is an important gap in agent-safety evaluation. CPA counts a pair as correct only if the benign member is allowed and the harmful member is blocked. It exposes over-refusal that harmful-only metrics hide: ShieldLM has 95.4% ABR but 15.2% CPA. This is the main reason I see value in the paper.

S2. The cue / cue-free split and the cue-removal test give direct evidence. Removing the cue from 38 harmful tasks shrinks SafeHarbor's and ToolShield's margin over the undefended agent from 16 and 15 blocked tasks to 1 and 2 (Fig. 17). This is the clearest support for the paper's thesis, and it would be useful to the community even on a smaller benchmark. The released data is complete and consistent with Table 2: all 1,475 checksums pass, and the per-source native/generated counts match.

Critical weaknesses

W1. The benchmark does not test what it claims, so the conclusion about guardrails is not supported. The claim needs two things: pairs that differ only in content, and guardrails that can see that content. Much of the benchmark has neither.

Many pairs do not differ in content. In 87 of 175 pairs, only the instruction text differs (SafeArena 27/28, P2SQL 30/30, AgentHarm 24/24, OAS 6). One pair, safety-sharing-files, has identical inputs on both sides. On AgentDojo, the model sees only the action, with no instruction or history. The guardrail setup is not described. In the code, a guard either sees only the task text, or replays the undefended agent's trajectory and blocks the whole task at the first flagged step. Neither setup fairly tests whether a guard reads the content. The "block both" results also contradict the paper's explanation: on SafeArena the instruction itself reveals the label, yet Safiron and ShieldLM allow 0 of 28 benign tasks. They block everything rather than follow cues.

W2. HP-Shield's gains are not established.

The numbers do not match the released libraries. The released experience libraries are the ones shown in Figs. 23–25. In Fig. 7 they score 77.9 / 75.0 / 79.4 CPA on OAS, but Table 4 reports 91.2 / 86.8 / 95.6 on the same pairs, while the run-to-run SD is at most 3.1. It is likely tuned to the test set. Training cases run in the benchmark's own environments. The learned rules mirror specific test tasks (pam_permit.so, id_rsa.pub), and the settings were chosen on OAS. Some rules judge by filename rather than content: Qwen exp.6 blocks any upload whose filename contains "key" or "secret". This breaks the paper's own rule against judging by filename. The comparison is not fair. ToolShield's experiences are not re-learned for these environments, there is no plain safety-prompt baseline, and all results come from a single run.

Questions for authors

Clarifications:

  1. How were guardrails run for Table 4: a task-level gate, offline replay, or live? How often do they block a step of a benign task?
  2. Which experience libraries produced Table 4? Why do the released ones score 77.9 / 75.0 / 79.4 on OAS in Fig. 7, but 91.2 / 86.8 / 95.6 in Table 4?
  3. Which pairs actually keep the instruction fixed and change only content? Please report the main results on those pairs alone.
  4. For AgentDojo, why is judging a single action, with no context, an agent task? Why is the benign label correct when the action still follows an injected instruction (agentdojo/slack/0-1)?

Requested experiments:

  1. HP-Shield on held-out data. Write the cards and cases without the test risk categories (e.g., leave one source benchmark out), and choose settings without using the test set.
  2. Fair controls:
    • ToolShield re-learned per backbone with the same budget;
    • a plain safety prompt;
    • HP-Shield with files renamed to neutral names, content unchanged.

If Q1–Q3 are answered and Q5–Q6 show that the gains hold, I will raise my rating to 3.

Comments on the paper

1 comment

Thank you for the response. However, my main concerns remain unaddressed.

The response mischaracterizes my concern about the defense. My review did not object to the general paradigm of distilling experiences into the agent’s context. It specifically compared HP-Shield’s pipeline with one prior pipeline, ToolShield. The response replaces this with a claim I did not make. The paper’s own Figure 5 shows the actual issue. Comparing it with ToolShield’s Figure 9, I cannot identify the novelty of HP-Shield’s pipeline:

  • ToolShield: a new tool (tool documentation) is introduced → (1) Test Case Synthesis → (2) Simulated Execution in a sandbox, producing trajectories labeled Safe/Unsafe → (3) Experience Generation from the trajectories → (4) Update of the experience list, which feeds back into further simulation. At deployment, the final fixed list is injected into the agent’s context.
  • HP-Shield: a new entity (entity card) is introduced → (1) Case Synthesis → (2) Simulated Execution in a sandbox, producing trajectories labeled Safe/Unsafe → (3) Experience Generation from the trajectories → (4) Update of the experience list, which feeds back into further simulation. At deployment, the final fixed list is injected into the agent’s context.

The only differences are the input (entity cards instead of tool documentation), the type of synthesized cases (benign/harmful instead of single-/multi-turn), and the content-inspection prompt added during execution. The two pipeline figures are also nearly identical, including the stage names, the Safe/Unsafe branch, and the feedback edge to stage 2. None of [1–6] has this pipeline: those methods learn from attempts on given tasks, not from safety test tasks they synthesize themselves and execute in a sandbox. Describing the pipeline as a “widely used paradigm” is therefore inaccurate, and my concern about novelty remains unaddressed. Moreover, the new results do not isolate the effect of these modifications: of the 7.81-point gain over re-learned ToolShield, about 3.0 points come from benign cases, and the rest is unattributed. I suspect that much of the remainder comes from the entity cards or from the content-inspection prompt. The authors also do not specify how the entity cards are produced, or whether they are derived from the benchmark itself.

The revision is internally inconsistent on the benchmark’s central claim. Section 3.1 now allows pairs whose instructions differ in the tokens naming the content. However, Figure 2 still states that “every retained pair shares one instruction” and is labeled “Same instruction & tools,” and the introduction and conclusion still describe CoPair-Bench as “the first strictly paired benchmark,” built from pairs that preserve task instructions. Under the authors’ own revised definition, 110 of the 175 pairs do not satisfy this. Either the headline claim must be restated to cover only the 65 pairs that do, or the definition has been adjusted after the fact to fit the data. I therefore do not consider the central claim of a strictly paired benchmark to be supported in its current form.

Based on these concerns, I will maintain my rating.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.