Session resume replays a conversation; a checkpoint records completed work. They solve different problems. Build a long-running agent that survives being killed halfway, and be precise about what you persist and when.
What to build
- Build an agent that processes a queue of twenty items with a tool call per item.
- After each item, write a checkpoint: item id, status, output reference, timestamp.
- Make the checkpoint write atomic — write to a temp file and rename, or use a transaction.
- Kill the process at item nine.
- Restart. Resume from the checkpoint, not from the conversation history.
- Verify no item is processed twice and none is skipped.
Done when
- Restart reprocesses exactly zero completed items.
- The checkpoint survives a kill between the tool call and the response write.
- Resumption does not require replaying the original conversation.
- You can articulate when conversation resume is sufficient and when a checkpoint is required.
If you want to go further
- Make each tool call idempotent with a key, so an interrupted call is safe to retry.
The trap this exercise teaches
Relying on conversation replay for durability. Replay re-costs every token and, for tools with side effects, re-executes work that already happened.
Before you start
The theory behind this build is covered in Session state, resume and crash recovery. If any step below is unfamiliar, read that first — the exercise assumes it. Primary source: Claude Docs — Agent SDK.
Check yourself against the exam
This exercise sits in Domain 1, which is 27% of the CCAR‑F exam. Once you have built it, run a domain drill in the study app and see whether the questions read differently.