cs.CRApr 8, 2026

TraceSafe: A Systematic Assessment of LLM Guardrails on Multi-Step Tool-Calling Trajectories

Authors: Yen-Shan Chen, Sian-Yao Huang, Cheng-Lin Yang, Yun-Nung Chen

Organizations: CyCraft AI Lab, Taiwan · National Taiwan University

Abstract

As large language models (LLMs) evolve from static chatbots into autonomous agents, the primary vulnerability surface shifts from final outputs to intermediate execution traces. While safety guardrails are well-benchmarked for natural language responses, their efficacy remains largely unexplored within multi-step tool-use trajectories. To address this gap, we introduce TraceSafe-Bench, the first comprehensive benchmark specifically designed to assess mid-trajectory safety. It encompasses 12 risk categories, ranging from security threats (e.g., prompt injection, privacy leaks) to operational failures (e.g., hallucinations, interface inconsistencies), featuring over 1,000 unique execution instances. Our evaluation of 13 LLM-as-a-guard models and 7 specialized guardrails yields three critical findings: 1) Structural Bottleneck: Guardrail efficacy is driven more by structural data competence (e.g., JSON parsing) than semantic safety alignment. Performance correlates strongly with structured-to-text benchmarks (ρ=0.79ρ=0.79, p<0.01p<0.01) while we detect no association with standard jailbreak robustness. 2) Scale Is Not the Deciding Factor: Trajectory detection accuracy does not scale monotonically with model size, and general-purpose LLMs consistently outperform specialized safety guardrails. 3) Bounded Temporal Stability: Detection accuracy improves with trajectory length within native context bounds as models process dynamic execution behavior, but degrades in extreme long-context regimes due to over-refusal.

Figures & tables

Appendix figures & tables19 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. PASTABench: Proactive Assessment of Sequential Trajectories for Agent Safety

    Sep 23, 2026Jiapeng Sun, Yujin Zhou, Han Zhu +4AI Agent Safety BenchmarksInference-Time Intervention

  2. ATBench: A Diverse and Realistic Agent Trajectory Benchmark for Safety Evaluation and Diagnosis

    Apr 2, 2026Yu Li, Haoyu Luo, Yuejin Xie +10AI Agent Safety BenchmarksLLM Agent Safety

  3. Trust No Tool: Evaluating and Defending LLM Agents under Untrusted Tool Feedback

    May 17, 2026Lecheng Yan, Ruizhe Li, Xicheng Han +5AI Agent ReliabilityLLM Agent Evaluation