🤖 AI Summary
This work identifies and formally names a previously unrecognized vulnerability in large language model (LLM) agents—termed the “cold-start safety gap”—whereby models exhibit heightened susceptibility to safety violations during early conversational turns. To mitigate this issue, the study proposes a pre-warming strategy that involves executing routine tasks prior to engaging in primary interactions, thereby enhancing initial safety. The authors introduce the SODA benchmark to systematically evaluate how safety performance evolves with task depth and validate the proposed mechanism through representational analysis and multi-model comparative experiments. Empirical results across seven mainstream LLMs demonstrate that as few as 20 pre-warming tasks can improve safety by 9%–52%, effectively closing the cold-start gap without compromising task utility.
📝 Abstract
Are tool-calling LLM agents equally safe throughout a conversation? We discover they are not: agents are most vulnerable at the very start of a session and become substantially safer after a few regular agentic tasks -- a phenomenon we term the cold-start safety gap. To study this systematically, we introduce Safety Over Depth for Agents (SODA), a benchmark that controls how many regular agentic tasks the agent completes before encountering a safety threat, supporting up to 20 preceding tasks. Evaluating 7 models from 4 families, safety improves by 9--52% as the number of preceding regular agentic tasks increases from zero to twenty. Representation analysis confirms that model hidden states gradually shift toward a safety-aligned region as more preceding tasks are present. By systematically studying which part of the preceding conversation matters most, we find that the regular agentic tasks themselves are the primary driver of safety, while the agent's own prior responses have less effect on safety but are essential for preserving later utility. This conclusion is further supported by evaluation on open-source safety benchmarks (AgentHarm, Agent Safety Bench) and utility benchmarks (BFCL, API-Bank), confirming that warming up the agent with regular agentic tasks before deployment makes it safer and preserves full capability. Based on these findings, we recommend a simple deployment strategy: having the agent complete a few regular agentic tasks before possible exposure to safety-critical requests mitigates the cold-start safety gap. Our code is available at https://github.com/Trustworthy-ML-Lab/Agent-Cold-Start-Safety-Gap