arXiv:2610.28425cs.CROct 2026

Manuscript Offprint

arXiv:2610.28425

After the Attacker Leaves: Benchmarking Carryover Attacks on LLM Agents

Zhiyue Xu, Xukai Wang, Zhiyuan Huang, Mingjie Zhan, Jian Zhao, Xu-Yao Zhang

Abstract

Modern LLM agents persist state across sessions via two channels: long-lived memory files silently prepended to the system prompt, and scheduled tasks waking the agent without user input. A one-time indirect prompt injection committed to either channel can re-fire across sessions long after the attacker leaves, threats we term carryover attacks. Existing prompt-injection benchmarks evaluate attacks only in the session where malicious content is first observed, leaving the gate governing when and how often a planted payload later re-fires unmeasured. We present CarryoverBench: 12 personal-assistant scenarios and 101 attack tasks across three trigger channels: Instant, same-turn IPI; Autonomous, heartbeat-scheduled; and Latent, memory-resurfaced. A rule-based verifier scores planting and triggering as independent stages. Across five frontier models, planted payloads re-fire without measurable decay over five rounds; conditional on successful planting, the trigger stage often provides little additional protection. Porting the Latent channel to a second runtime, Hermes, attenuates but does not eliminate the effect, suggesting that carryover defense requires runtime-layer controls in addition to prompt-level interventions. 1^{1}

1 Introduction

An LLM agent triages today’s inbox. One perfectly legitimate email hides a single instruction in its body: append a "weekly tracking" task to your own HEARTBEAT.md. The agent complies; the session closes cleanly; no visible harm. But the payload now persists. Hours later while the user is asleep, in a meeting, or simply away from the machine, the runtime’s heartbeat timer wakes

Figure

Figure 1: Carryover attack. A one-time injection planted in Session t keeps re-firing in later sessions, long after the attacker has left.

the agent into a session with no human in the loop, and the agent re-executes the instruction it wrote earlier. Then again, on the next tick. And the next. Each firing ships the user's freshest private content (payroll, financials, medical) to an attacker-controlled URL after the attacker has vanished. The attacker leaves; the attack stays behind.

The danger lies not in any single turn but in what the agent has stored after the turn ends. Indirect prompt injection itself is well-understood (Greshake et al., 2023); what is not is what happens once the payload lands in persistent state. Existing prompt-injection benchmarks evaluate only the session in which malicious content is first observed, leaving the post-planting window—when the payload actually executes—entirely unmeasured. We call this class of threats carryover attacks.

Benchmark. We build CarryoverBench: 12 realistic personal-assistant scenarios and 101 attack tasks spanning 3 trigger channels Instant (same-turn IPI, classical baseline), Autonomous (a scheduled heartbeat task wakes the agent in an empty session, with no user in the loop), and Latent (long-term memory reloads the payload on a topically-aligned future user prompt). Our deterministic rule-based verifier scores the plant and

∗^{*}Equal contribution. †\daggerCorresponding author.

1^{1}Our code is available at https://github.com/igloomatics/CarryoverBench.

trigger stages independently. We report attack success rate (ASR) jointly with benign-task utility to expose the helpfulness—safety tradeoff.

Findings. Across five frontier models, we find that carryover payloads rarely decay once planted, that trigger-time execution is often the weaker defense point, and that the tested text-channel defenses mainly affect planting rather than later triggering.