New: Cookbooks and AI ExplanationsStep-by-Step recipes to solve problems connected to Roadmaps and Cheat Sheets. Need more details? Use AI buttons for structured and simple explanations with concrete examples throughout the whole platform.Take a look
Your agent dies halfway through a long task, and the only way to recover is to start the whole thing over from scratch.
What you'll have at the end
An agent that, killed and restarted mid-task, picks up at its last completed stage instead of redoing everything
You need
A working agent that already completes a real multi-stage task end to end when nothing crashes, with each stage's work callable as its own function or unit.
Not covered
Locking a task so two different workers can never resume the exact same crashed run at once, a separate problem once more than one process might pick it up.
Leans on
One bad tool call crashes the whole agent run
Covers a single tool call failing inside a run that keeps going; this recipe covers the whole process dying and needing a saved state to resume from.
Give a runaway agent a spending cap
Caps total spend across an entire run; the cap built in the last steps here is narrower, aimed at one stage that keeps failing on every resume.
Log every tool call so you can find what broke a run
The call log this builds is what you would read to work out why a stage keeps landing in the blocked state the last steps here catch.
Checked 15 Aug 2026
Part of the AI Engineering cookbook