CrewAI 1.14 added checkpointing, and it closes a gap people had been working around by hand. Pass checkpoint=True to a crew and it saves a snapshot of the run to .checkpoints/. Restore it with Crew.from_checkpoint(), call kickoff(), and the run picks up where it stopped instead of starting over. Agent memory, task progress, intermediate outputs and the kickoff inputs all come back. For a long crew that died nine tasks in, that is the difference between resuming and paying for the whole thing again.
All of which is true right up until a task does something you can't undo.
The window
The checkpoint is written after the task finishes.
That isn't a criticism, it's the default and it's in the source. CheckpointConfig.on_events is ["task_completed"] (checkpoint_config.py:172), and a listener turns that event into a write. So the unit of durability is the task.
A tool call lives inside the task.
Take a dispatch agent with two tools. It looks an order up, then hands the parcel to a courier. The pod gets rescheduled in the middle.
run 1
│
├─ task "verify" ───► order looked up, checkpoint written
│
├─ task "dispatch"
│ │
│ └─ dispatch_order() ───► courier API the parcel is moving
│
╳ process dies here
│
└─ no checkpoint for "dispatch" was ever written
run 2 Crew.from_checkpoint(...).kickoff()
│
├─ task "verify" ───► skipped. its checkpoint exists.
│
└─ task "dispatch" ───► runs again, because nothing says it ran
│
└─ dispatch_order() ───► courier API dispatched a second time
Re-running the task is the only correct thing the checkpoint could do with what it knows. As far as the durable record goes, that task never happened. The courier has the parcel and the process died before the checkpoint was written, so now one order is on two vans.
Worth noticing how much re-runs. LangGraph's checkpointer writes after a node, and a node is usually one step. A CrewAI task is a whole agent loop: several model turns, and every tool call the agent decided to make along the way. The resumed task starts at the top of that loop. Everything the agent already did to the outside world during it happens again.
A checkpoint records what your agent decided. It can't record what your agent did to the outside world, because it never saw it happen. Every checkpointing system in every agent framework has this window. None of them sit in the call path of your HTTP client.
Two things to check before you trust it
The first is the obvious objection, and it's a good one. task_completed is only the default. The event list is long and tool_usage_finished is on it, so you can checkpoint after every tool call instead:
Crew(
agents=[...],
tasks=[...],
checkpoint=CheckpointConfig(on_events=["tool_usage_finished"]),
)
That narrows the window. It doesn't close it, because the event fires when the tool returns and the write happens after that. The courier already has the parcel by the time anything durable hears about it. You've moved the window from "the whole task" to "the gap between the call returning and the record landing", which is better and is still a window.
The second is worth checking before any of this matters: whether your checkpoints are being written at all.
An agent holding a tool written as a decorated function can't be checkpointed. CrewAI serialises the run with state.model_dump(mode="json"), a function isn't serialisable, and the listener catches its own failure and logs a warning rather than stopping:
except Exception:
logger.warning("Auto-checkpoint failed for event %s", event.type, exc_info=True)
That's checkpoint_listener.py:243. The run carries on looking healthy and no file is written. Same crew each time, the agent's tools the only variable:
| the agent's tools | checkpoint files written |
|---|
| none | 1 |
one @tool function | 0 |
one BaseTool subclass | 1 |
Measured on 1.15.41 and on 1.15.45. If your tools are the decorated-function kind, which is the form most of the documentation uses, checkpoint=True is doing nothing and saying nothing, and the resume you think you have is a directory that stays empty. Subclassing BaseTool is the form that works today.
The same swallowing applies to any serialisation failure, so it's worth grepping your logs for that warning before relying on a resume.
That one is a bug and it will be fixed. The window above is not a bug and will not.
It isn't only restarts
Three other shapes it takes.
Two workers arrive at the same job. A checkpoint id is a storage key. It doesn't claim anything. Nothing stops two processes restoring the same checkpoint and kicking off at once, and that happens more than people expect: a retry that fires while the first attempt is still running, a queue that redelivers, two replicas picking up the same message. Five identical restores of one checkpoint and the courier gets five parcels.
An advisory lock doesn't fix this, which surprises people. Mutual exclusion and idempotency get treated as the same property. A lock means one worker runs the task at a time. It says nothing about how many times the dispatch happens across all of them, and the measured answer there is also five.
The worker holding the job dies and doesn't come back. Not a crash loop, where the pod restarts and retries. The process is gone: the node was killed, the container was evicted, the host went away. Whatever marked that work as in-progress is now held by something that no longer exists.
Several agents reach the same conclusion independently. CrewAI is a multi-agent framework, so this one is closer to home than it is elsewhere. Five agents working one support ticket, each deciding a refund is owed. They aren't retrying each other, they reasoned separately, and the customer is owed one refund. Nothing in the checkpoint model connects them, because they're five different runs.
What people already do about it
If the API provider supports an idempotency key, use that. Stripe has one. If it doesn't and it's an internal API you own, add one. The receiver dedupes on its own side, which beats anything the caller can do about it.
It buys less than it sounds, because nobody hands you the key. Stripe dedupes a retry only if the retry presents the same key, and your agent has to produce that key twice across a process that died in between. Generate it inside the tool and the resumed run generates a different one. Derive it from the model's arguments and two agents that reasoned differently derive two keys, which is a measured result rather than a worry: in a harness where two agents each decided a refund was owed and disagreed on the amount, putting the amount in the key let both of them through. Stripe also retains keys for at least 24 hours and may drop them after that, so reuse past the window executes a new request. Fine for a retry loop, no use for a crew somebody resumes on Tuesday.
What's left is the calls with no such header, which for an agent is most of them. A courier endpoint, a Slack message, an internal service another team owns, a tool someone wrote last quarter.
For those the usual answer is a claims table, the Stripe-style idempotency key written by hand. Insert a row keyed on the operation before you do the work. A second caller's insert conflicts, so it knows someone else owns the operation and waits for their answer, and you store the response against the key when you're done. It's a good answer, it's what teams actually write, and it handles both the restart and the concurrent workers.
It's the dead holder that breaks it. The row says in-progress and it's held by a process that no longer exists, so nobody else can finish the operation without a human clearing it. The usual next move is a TTL on the claim, and the instinct is right, but a TTL whose expiry is the only thing authorising takeover can't tell a dead holder from a slow one. It takes over from both. From the dead one that's correct. From the paused one you get two workers who each believe they own the operation.
Making it safe takes a heartbeat, so the holder can say it's still alive, and a fencing token, so a superseded holder's late write gets refused instead of applied. At which point you've written a lease, and you own it.
This is also where the workflow engines sit, and it's worth being clear that they don't remove the problem. Temporal makes the orchestration durable: the workflow survives, the step re-runs on replay, and you get timers and retries and history for free. Its own documentation says activities execute at least once and that you should make them idempotent, because an activity can run more than once and can partially complete more than once. Run Temporal and you still write something like the claims table inside your activity, since an activity retry is exactly the thing that dispatches the order twice.
None of this catches the independent agents. Five agents on five runs derive five different keys, so every guard sees five unrelated operations and lets all of them through. Catching that means deriving the key from the ticket rather than from the run, which you have to decide on purpose whatever you're using.
Which is what I built
I wrote Cellaflow for this, so weigh the rest accordingly. It's an engine that holds the leases. A tool call takes one before it runs, and if a later call derives the same key it's answered from the record of the first attempt instead of executing. If the holder dies the lease expires and the work gets reclaimed by whoever takes it, which is the case a claims table can't reach.
For CrewAI the integration is two things: a lease on the tool you can't take back, and a context manager around the kickoff.
from cellaflow import durable_tools
from cellaflow import tool as leased
leased_dispatch = leased(tool_name="dispatch_order")(dispatch_order)
class DispatchOrder(BaseTool):
name: str = "dispatch_order"
description: str = "Hands order_id to courier for delivery. Cannot be recalled."
def _run(self, order_id: str, courier: str = "DHL") -> str:
return leased_dispatch(order_id, courier)
leased is cellaflow.tool, renamed on import so it doesn't collide with CrewAI's decorator of the same name. Keep the leased function at module level rather than storing it on the tool: a BaseTool is a pydantic model, and a function held on one is the thing that stops the crew being checkpointed.
If you aren't checkpointing, the decorator form works and reads better:
@crewai_tool("dispatch_order")
@leased(tool_name="dispatch_order")
def dispatch_order(order_id: str, courier: str) -> str:
"""Hands `order_id` to `courier` for delivery. Cannot be recalled."""
Read that one bottom-up. Cellaflow leases the call, then CrewAI builds the schema the agent sees from the signature and the docstring.
The agent's other tool isn't leased either way, because repeating a read costs nothing and a lease on it would buy nothing.
Then the run:
thread_id = f"dispatch-{uuid.uuid4().hex[:8]}"
with durable_tools(thread_id, target=ENGINE):
result = crew.kickoff()
CrewAI has no config object to carry an id the way LangGraph's configurable does, so whatever id your application already uses for the conversation is passed straight in. The same id always derives the same session, so the resumed run derives the same key. That's what survives the restart.
kickoff() runs a tool on the caller's context, so the tool body reaches the session opened around it with nothing further required. A leased tool called with no session open raises rather than running unguarded, which is what you want, and is worth knowing if you move work onto the asynchronous path.
Does it hold up
There's a runnable version of that dispatch crew in the repo. Two arms, the same crew, the same checkpoint=True, the same crash at the same instant, and the only variable is whether the tool call holds a lease.
| arm | orders looked up | parcels dispatched |
|---|
checkpoint=True alone | 1 | 2 |
| the same crew, leased tool call | 1 | 1 |
The left column is the control, and it's what makes the right one mean anything. One lookup in both arms, because task one's checkpoint was written before the crash and the resumed run skipped it. The checkpoint is working. The lease isn't fixing it. It's covering the call that was still in flight when the process died.
docker run -d --name cellaflow -p 50051:50051 \
-e CELLAFLOW_ALLOW_UNAUTHENTICATED=true ghcr.io/cellaflow/cellaflow:latest
git clone https://github.com/cellaflow/cellaflow-sdks
cd cellaflow-sdks/examples/at_most_once_proof_crewai
pip install -r requirements.txt
python proof.py
No API key and no database. The model is a local endpoint in the directory returning the same two tool calls every time, so the run is deterministic and offline. Point it at a real model instead and it behaves the same. There's a reason it's an endpoint rather than a scripted class: CrewAI stores a model's name and rebuilds it through its provider factory on restore, so a custom model class doesn't survive from_checkpoint.
The arms differ by one line, whether the dispatch function is wrapped in cellaflow.tool. Both arms assert their own number and the script exits non-zero if either stops behaving. A proof that cannot fail is not a proof.
The counters live inside the tool bodies, so a suppressed call can't be counted as a success: if the lease works, the body is never entered and nothing is appended.
Some things it doesn't measure. No throughput, no latency, no storage engine comparison; it's a correctness demonstration, and a deterministic one, in that the dispatch either repeated or it didn't on any hardware. It runs one writer, one crew, one crash, so the concurrent scenarios above come from a separate harness. It kills a process rather than cutting power to the host. And the engine is a single node today.
It also tests one crash point, after the tool returns and before the task completes. A kill inside the tool body, after the courier accepts and before the result is recorded, is a different window, and nothing on the caller's side closes that one.
One thing I'd like to know
If you've turned checkpoint=True on in anger, I'd like to hear what happened the first time a run resumed into a tool that had already fired. Specifically whether you noticed from the duplicate or from the logs, or whether it just never came up.
I'll be in the comments answering any questions or thoughts. My DMs are also open.
Live demo: https://cellaflow.com/#live-demo
Github: https://github.com/cellaflow/cellaflow-sdks