← Latest papers
🤖 machine learning

Resume Means Resume: A Machine-Checked Conformance Contract for Checkpoint, Interrupt, and Resume Semantics in Workflow Persistence Layers

This paper introduces a machine-checkable "Resume Contract" to formally define and verify workflow persistence semantics, revealing that major frameworks like LangGraph and CrewAI violate critical properties such as effect exactly-once and checkpoint validity, while proposing and validating a verified reference implementation (REMIT) that guarantees conformance through a novel cross-process consumption gate.

Original authors: Sajjad Khan

Published 2026-08-05
📖 6 min read🧠 Deep dive

Original authors: Sajjad Khan

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

The Digital Amnesia of AI Agents

Imagine you are building a robot that can do complex tasks, like planning a trip or writing a story. Sometimes, this robot needs to pause to ask you a question, like "Should I book the flight?" or "Do you like this plot twist?" This is called an "interrupt." If the robot crashes, loses power, or gets interrupted, it needs a way to remember exactly where it left off so it can pick up right where it stopped. This is called "persistence."

In the world of computer science, specifically in the field of Artificial Intelligence (AI) workflows, there is a growing problem. We have built many different "robot brains" (frameworks) that can pause and resume. However, these robots are terrible at remembering what they already did. If a robot finishes a task, saves its progress, and then restarts, a well-behaved robot should say, "I already did that, let's move on." But a confused robot might say, "I don't remember doing that!" and do the task all over again. If that task was sending an email or charging a credit card, doing it twice is a disaster. This paper investigates whether our current AI robots are actually confused, or if they are just pretending to be smart.


The Great "Resume" Confusion

This paper is like a detective story, but instead of solving a murder, the author, Sajjad Khan, is solving a mystery of digital amnesia. The mystery is: When an AI agent pauses and then resumes, does it remember what it already did, or does it accidentally do it again?

The author found that the five most popular AI frameworks out there are all playing by different, conflicting rulebooks. It's as if you have five different video games, and in one, pressing "Continue" skips the level you just beat, but in another, it forces you to fight the boss again. Worse, some of these games don't even tell you which rule they are using.

The Six Rules of a Good Resume

To figure out who is playing fair, the author invented a "Resume Contract." Think of this as a rulebook for how a robot should behave when it wakes up from a nap. The contract has six main rules:

  1. Prefix Continuation: When you wake up, you should start exactly where you left off, not from the beginning of the movie.
  2. Effect Exactly-Once: If you already sent an email or charged a card, you must never do it again. Just once.
  3. Fork Determinism: If you decide to split your path (like choosing "Go Left" vs. "Go Right"), the robot must remember which path you chose. If you say "Left" twice, it shouldn't act like you said "Right" the second time.
  4. Checkpoint Validity: The robot's memory log must be clean. It shouldn't save "garbage" or broken data that makes it crash later.
  5. Consume-Once: If a human gives an answer (like "Yes, book the flight"), the robot should only use that answer once. It shouldn't accidentally use the same "Yes" to book two flights.
  6. Recovery Determinism: If two robots wake up with the exact same memory log, they must make the exact same decisions.

The Investigation: Who Failed?

The author built a super-precise, robot-free testing machine (a "harness") to test five popular AI frameworks. No human brains or AI models were involved in the testing, just pure code. The results were shocking: No two frameworks behaved the same way.

  • LangGraph: This framework is like a robot that forgets its own homework. When it crashes and restarts, it re-does work it had already finished (violating "Effect Exactly-Once"). It also has a glitch where if you try to change your mind (a "fork"), it ignores your new choice and repeats the old one.
  • CrewAI: This one is even more chaotic. It claims to skip finished work, but when it restarts, it re-does everything anyway. It's like a chef who says, "I already chopped the onions," but then chops them again, wasting time and ingredients.
  • LlamaIndex Workflows: This framework is honest about its confusion. It admits, "Hey, if you pause, I might redo the work before the pause." It's not a bug; it's a feature they documented, but it's still risky for things like payments.
  • pydantic-graph: This robot is so fragile that if it crashes in the middle of a task, it refuses to wake up at all. It's like a car that won't start if you turn off the engine while it's in gear.
  • AutoGen: This one is the only one that loudly says, "Hey, you tried to load a broken save file!" and refuses to run. It's the strict teacher who won't let you bypass the validation checks.

The "Double-Booking" Disaster

One of the most dangerous findings was about Consume-Once. Imagine you have a "parking spot" where a human gives an answer. If two people try to give an answer at the exact same time (concurrently), the current systems let both of them park. The robot then thinks it received two answers and does the task twice.
The author tested this with 16 "racers" trying to answer at once. In 36 out of 40 tests, the system failed completely, letting all 16 racers trigger the action. It's like a ticket booth where 16 people buy the same ticket, and the system lets them all in.

The Proof and the Fix

The author didn't just guess; they used a mathematical tool called TLA+ to simulate millions of scenarios and prove that these failures were real and not just bad luck. They also used a formal verification tool called Verus to build a "perfect" robot engine called REMIT.

REMIT is a reference engine that follows the rules perfectly. It fixes the "fork" problem by remembering exactly which path you chose, and it fixes the "double-booking" problem by locking the answer so only one person can give it. The author showed that when you use REMIT, the robot behaves correctly, even when 64 different threads try to talk to it at once.

The Takeaway

The big lesson here is that just because an AI framework says it has "checkpointing" (the ability to save and resume), it doesn't mean it's safe to use for important things like money or sending messages. Currently, the "resume" button on many AI tools is broken in ways that could cause double-charges or lost data.

The paper proves that we need a standard rulebook (the Resume Contract) so developers know exactly what their AI will do when it wakes up. Until then, if you are building an AI that does real-world tasks, you can't just trust the framework to remember what it did—you have to build your own safety net. The author has even released a free tool (REMIT) that developers can use to patch their systems and make them safe, proving that a perfect, rule-abiding resume is possible, even if the current popular tools aren't doing it yet.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →