AI agents are moving toward persistent, stateful execution across various applications, accumulating execution state and external effects that are costly to reconstruct after failures. Checkpoint and rollback (C/R) are becoming essential for recovery, yet their security implications remain largely unexplored. Correct rollback does not imply secure recovery: a faithfully restored checkpoint may resume an execution whose states, assumptions, and external effects never coexisted in any valid history. In this paper, we present the first systematic security study of checkpoint and rollback in existing agent systems. By examining representative agent C/R systems, we characterize the design space of existing C/R mechanisms and develop a general execution model that captures their recovery boundaries and state dependencies. From this model, we identify five fundamental failure modes spanning incomplete or inconsistent internal state, stale external dependencies, nondeterministic replay, and unrecorded external effects. We further demonstrate their security impact through three end-to-end attacks on Hermes, Cline, and LangGraph, enabling malware-verification bypass, unauthorized mail forwarding, and double payment. To systematically study these failures in practice, we develop a multi-agent analysis pipeline that reconstructs execution semantics, identifies violations of the five failure conditions, and validates them through actual rollback. Across five representative frameworks, our evaluation shows that these failures recur across heterogeneous C/R designs and stem from a common gap between the state restored by a checkpoint and the dependencies required for secure continuation.
Figures & tables
System
State Scope
Captured State
Checkpoint Creation
Restoration
LangGraph
Framework
Graph state, including messages, intermediate results, pending execution state
Automatic at each superstep boundary once persistence is enabled
Resume the latest checkpoint or select an earlier checkpoint for replay/branching
CrewAI
Framework
Crew/Flow/Agent execution state, including task progress, outputs, memory, and intermediate state
Event-driven once enabled; task completion is the default trigger
Restore a selected checkpoint and resume without re-executing completed tasks
Hermes
Workspace
Project/workspace files; rollback also adjusts the most recent conversation turn
Automatic before file mutations or recognized destructive commands once checkpointing is enabled
Restore a selected workspace checkpoint (or individual file) via /rollback
Cline
Workspace
Project files associated with the corresponding task-history position
Automatic after file modifications and terminal commands; enabled by default
Restore files, task history, or both from a selected checkpoint
E2B
OS/VM
Sandbox filesystem and memory state, including running processes
Explicit, at developer-selected points via create_snapshot()
Create a new sandbox from a selected snapshot
TABLE I : Checkpoint and rollback mechanisms in representative agent systems.
Fig. 1 : System model for agent checkpoint and rollback.
Fig. 2 : SF1: Incomplete internal state coverage.
Fig. 3 : SF2: Inconsistent checkpoint state.
Fig. 4 : SF3: External state mismatch.
Fig. 5 : SF4: Unbound nondeterministic replay.
Fig. 6 : SF5: Unrecorded external effects.
Fig. 7 : Methodology overview.
Framework
Dataset
SF1
SF2
SF3
SF4
SF5
LangGraph
AgentBench
99
0
49
89
6
TerminalBench
201
0
50
139
11
CrewAI
AgentBench
106
0
0
80
3
TerminalBench
222
0
0
196
4
Hermes
AgentBench
71
97
1
80
11
TerminalBench
183
143
43
140
0
TABLE II : Prevalence of security failures.
Reference
#
Reference
#
now
222
earlier
52
current state
178
previous run
44
this environment
87
this task
41
currently
83
here
39
TABLE III : Frequent semantic references to external context.
External Action
#
Execute → Commit
Commit → Execute
Payment
30
28
29
Message
31
29
30
Resource change
35
33
34
Overall
96
90 (93.8%)
93 (96.9%)
TABLE IV : Recovery failures under different orderings.
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
SF
Precision
Recall
Accuracy
SF1
96.6%
100.0%
97.8%
SF2
100.0%
100.0%
100.0%
SF3
100.0%
100.0%
100.0%
SF4
100.0%
100.0%
100.0%
SF5
100.0%
90.0%
99.8%
Overall
98.7%
99.9%
99.5%
Appendix
TABLE V : Manual validation of security-failure detection.
Artificial intelligence agent security studies attacks and safeguards for tool-using, persistent, and collaborative systems across digital and physical settings.