01Chapter 1: Why long-running tasks breakA long-running agent task is work that takes more time, more steps, or more tokens than one uninterrupted run can hold. Examples include migrating hundreds of documents, exporting months of records, or refactoring a large codebase. This chapter explains why such tasks fail and what has to be saved s8 min read
02Chapter 2: What state has to surviveA long-running task stops at some point, whether the context window fills, the process crashes, or a person ends the session. The next run can only continue if the right facts were saved outside the agent's memory. This chapter defines which facts those are, so later chapters can cover how to store 6 min read
03Chapter 3: Breaking work into resumable stepsThis chapter covers how to split a large task into steps that a restarted agent can skip, repeat, or continue from. It assumes you can read Python, JSON, and Markdown. It also assumes you know how an LLM agent calls tools in a loop, and that you have a basic picture of files and processes. Later cha7 min read
04Chapter 4: Making steps safe to repeatThis chapter assumes you can read Python, understand JSON files, and know that an agent runs tools in a loop. It also assumes you have seen why long tasks get interrupted and how work is split into steps. Here we focus on one property of each step: running it twice should be as safe as running it on7 min read
05Chapter 5: Saving checkpointsThis chapter assumes you can read Python and JSON, know that an agent runs tools in a loop, and understand basic file system behavior such as files, directories, and processes. It covers what a checkpoint is, what belongs in one, when to write it, and the errors that make checkpoints misleading.6 min read
06Chapter 6: Writing checkpoints atomicallyThis chapter assumes you can read Python and JSON, and that you know what a checkpoint is from the earlier chapters: a small file that records which steps of a task are finished. Here you will learn how to write that file so a crash cannot corrupt it.6 min read
07Chapter 7: Keeping a progress fileThis chapter assumes you can read Python, JSON, and Markdown, and that you know how an agent calls tools in a loop. It also assumes you have seen the idea of a checkpoint from the previous chapters: a machine-readable snapshot of task state that is written after each step.6 min read
08Chapter 8: Resuming from saved stateThis chapter covers the resume routine: what an agent does when it starts and finds state left by an earlier run. It assumes you can read Python, JSON, and Markdown, and that you know how an agent loop calls tools. It also assumes you have seen checkpoints and progress files from earlier chapters. H6 min read
09Chapter 9: Checking saved state against realityThis chapter assumes you have read the earlier chapters on checkpoints, atomic writes, and the resume protocol. You should be comfortable with the save_checkpoint and load_checkpoint functions and with the completed list pattern. You also need basic Python and some familiarity with hashing fil6 min read
10Chapter 10: Handing work to another agent or personThis chapter assumes you can read Python, JSON, and Markdown. It also assumes you know how an agent calls tools in a loop, and that you have seen checkpoints and progress files from earlier chapters. Here the question is what changes when the next reader is not the process that wrote the state.5 min read
11Chapter 11: What a good handoff note containsA handoff note is the document a new agent or person reads before touching a task they did not start. It is not a full log of what happened. Its job is to let the reader act correctly within a few minutes, without access to the previous context.6 min read
12Chapter 12: Avoiding conflicting writersThis chapter assumes you have read the chapters on checkpoints and atomic writes. It also assumes you can read Python and know that a process is a running program with its own memory. Most long-running tasks have one writer, but a task that gets resumed, retried, or split across agents can easily en6 min read
13Chapter 13: Common failure modes and how to spot themThis chapter assumes you can read basic Python, know how an LLM agent calls tools in a loop, and have seen the checkpoint, progress file, and handoff patterns from earlier chapters. Here the focus is on how those patterns break and how to notice the break before it costs you work.7 min read
14Chapter 14: A checklist for designing long-running tasksThis chapter collects the earlier chapters into one design review. It assumes you can read Python, JSON, and Markdown, and that you know how an agent calls tools in a loop. It also assumes you have read the chapters on checkpoints, progress files, resuming, and handoffs. Each item below points back 8 min read