HackerPapers

arXiv:2602.16943cs.AI

Mind the GAP: Text Safety Does Not Transfer to Tool-Call Safety in LLM Agents

Arnold Cartagena, Ariane Teixeira

HN submission. Found in a submission link or body. Submitters do not count as commenters in the main ranking; a submission is not an endorsement.

Abstract

Large language models deployed as agents increasingly interact with external systems through tool calls--actions with real-world consequences that text outputs alone do not carry. Safety evaluations, however, overwhelmingly measure text-level refusal behavior, leaving a critical question unanswered: does alignment that suppresses harmful text also suppress harmful actions? We introduce the GAP benchmark, a systematic evaluation framework that measures divergence between text-level safety and tool-call-level safety in LLM agents. We test six frontier models across six regulated domains (pharmaceutical, financial, educational, employment, legal, and infrastructure), seven jailbreak scenarios per domain, three system prompt conditions (neutral, safety-reinforced, and tool-encouraging), and two prompt variants, producing 17,420 analysis-ready datapoints. Our central finding is that text safety does not transfer to tool-call safety. Across all six models, we observe instances where the model's text output refuses a harmful request while its tool calls simultaneously execute the forbidden action--a divergence we formalize as the GAP metric. Even under safety-reinforced system prompts, 219 such cases persist across all six models. System prompt wording exerts substantial influence on tool-call behavior: TC-safe rates span 21 percentage points for the most robust model and 57 for the most prompt-sensitive, with 16 of 18 pairwise ablation comparisons remaining significant after Bonferroni correction. Runtime governance contracts reduce information leakage in all six models but produce no detectable deterrent effect on forbidden tool-call attempts themselves. These results demonstrate that text-only safety evaluations are insufficient for assessing agent behavior and that tool-call safety requires dedicated measurement and mitigation.

arXiv comments
23 pages, 5 figures, 4 tables, code and data at https://github.com/acartag7/gap-benchmark
Journal reference
DOI
Subjects
cs.AIArtificial Intelligence cs.SESoftware Engineering

On Hacker News

No comments linking this paper were found in the collected sources. Found in 1 HN submission from Feb 2026 to Feb 2026. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments0 threads

No comments linking this paper were found in the collected sources. Open submission discussions.

Submitted to Hacker News

  • Show HN: Edictum – Runtime governance for LLM agent tool calls

    We tested 6 frontier models across 17,420 tool-call interactions and found that models consistently refuse harmful requests in text while executing them through tool calls. We call this divergence the GAP metric. The text says no. The tool call says yes. Edictum is a runtime governance library that enforces safety contracts at the tool-call boundary — the point where you have the tool name, the arguments, and the ability to block before execution. YAML contracts with preconditions…

Connected through shared HN threads, not inferred similarity or a recommendation.