Sub topic 11
What a Good Handoff Note Contains
A 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.
This chapter assumes you have read the earlier chapters on checkpoints, progress files, and the resume protocol. You should be comfortable reading JSON and Markdown, and you should know that an agent loses its memory when its context window or session ends.
Why a handoff differs from a progress file
A progress file is kept up to date during the work. A handoff note is written at a boundary: the end of a session, a switch between agents, or a pause before a person takes over. The two overlap, but they serve different readers.
| Property | Progress file | Handoff note |
|---|---|---|
| Written | Continuously, during the work | Once, at the boundary |
| Reader | The same worker, later | A different worker, or the same worker with no memory |
| Focus | Goal, plan, status, decisions | Current position, risks, and the next action |
| Length | Grows with the task | Short, ideally one screen |
| Trust level | Records what was believed at each step | Marks what is verified and what is not |
The handoff note should point to the progress file and the checkpoint. It should not copy them. Copied content goes stale, and then the reader has two sources that disagree.
The six parts of a handoff note
A useful note answers six questions. Each one prevents a specific mistake by the reader.
- Where do things stand? State what is finished, in terms the reader can check. "Months 2023-01 through 2023-08 are exported" is checkable. "Most of the export is done" is not.
- What is not verified? Name work that was done but not confirmed. This is the most commonly omitted part, and it matters most. A reader who sees "done" will treat it as true.
- What must not be repeated? List steps with side effects that cannot be safely run twice, such as uploads, emails, payments, or deletions.
- What is the next action? Give exactly one concrete step. If you list five options, the reader must decide among them without the context to do so.
- What is the state of open problems? Include blockers, pending decisions, and anything surprising.
- Where is the full state? Name the files that hold the details: the progress file for decisions, the checkpoint for machine state.
Here is a complete note that covers all six parts:
# Handoff: payment export job
**From:** agent-A **To:** agent-B **Time:** end of session 3
## Where things stand
Export of months 2023-01 through 2023-08 is done. Output is in out/ and listed in checkpoint.json.
## Not yet verified
The row count for 2023-08 was not compared with the source database.
## Do not repeat
The upload step already ran for 2023-01 to 2023-06. Re-running it creates duplicate files.
## Next action
Verify the 2023-08 row count, then export 2023-09.
## Where to look
progress.md for decisions, checkpoint.json for machine state.Notice what the note leaves out. It does not narrate how the export was built or which approaches failed. Those belong in the progress file's decision list, where the reader can look them up if needed.
Separating done, verified, and believed
The most useful habit when writing a handoff is to sort every claim into one of three groups.
- Verified: you checked it against the real system, such as by counting rows, reading the file back, or querying the service.
- Done but unverified: you ran the step and it reported success, but you did not confirm the result.
- Believed: you inferred it from earlier work or from an assumption.
A step can finish without succeeding. An upload call can return a success code while the file is truncated. A script can exit with code 0 after skipping every record. If the note says only "done," the next worker inherits that mistake and builds on it.
The "Not yet verified" section in the example above is this separation in practice. It tells agent-B that the 2023-08 export exists, but that its correctness is open.
Writing "do not repeat" warnings
The "Do not repeat" section protects against duplicated side effects. A resuming worker sees an incomplete task and tries to finish it. If a step was interrupted halfway, the reader cannot tell whether it ran.
Good warnings share three features.
- They name the exact step and the exact scope. "The upload step already ran for 2023-01 to 2023-06" is better than "don't upload again."
- They state the consequence. "Re-running creates duplicate files" tells the reader why the warning matters and how to judge edge cases.
- They cover uncertain cases. If a step was interrupted and you do not know whether it completed, say so: "The upload for 2023-07 started but its result is unknown. Check the destination before retrying."
That last case is common and easy to forget. An interrupted step with side effects is neither done nor not done. The note must flag it explicitly.
Choosing the next action
The next action should be small enough to start immediately and specific enough that two readers would do the same thing. Compare these two:
- Weak: "Continue the export and make sure everything is correct."
- Strong: "Verify the 2023-08 row count against the source database, then export 2023-09."
The strong version names the object, the comparison, and the order. If the work has a verification step that must come first, put it in the action itself. Do not leave it to the reader's judgment.
If the next action depends on a decision nobody has made, say that. The open problem becomes the next action: "Decide how to handle the gallery shortcode, then resume conversion at docs/guides/setup.md."
Generating the note from state
Handwritten notes drift from reality. A safer approach is to build the factual parts from the checkpoint and add only the judgment parts by hand. The script below reads a checkpoint in the format used earlier in this tutorial, and produces a draft note with the finished steps filled in.
import json
import sys
def draft_handoff(checkpoint_path, sender, receiver):
with open(checkpoint_path) as f:
state = json.load(f)
completed = state.get("completed", [])
notes = state.get("notes", [])
lines = [
"# Handoff",
"",
f"**From:** {sender} **To:** {receiver}",
"",
"## Where things stand",
"Completed steps (from checkpoint): "
+ (", ".join(completed) if completed else "none"),
"",
"## Not yet verified",
"TODO: list work that finished but was not checked.",
"",
"## Do not repeat",
"TODO: list steps with side effects that must not run again.",
"",
"## Next action",
"TODO: one concrete step.",
"",
"## Where to look",
f"{checkpoint_path} for machine state, progress.md for decisions.",
]
if notes:
lines += ["", "## Notes recorded by the run"]
lines += [f"- {n}" for n in notes]
return "\n".join(lines) + "\n"
if __name__ == "__main__":
print(draft_handoff(sys.argv[1], "agent-A", "agent-B"), end="")The TODO lines are deliberate. They force the writer to fill in the parts that only a person or agent with context can judge. A script cannot know which steps are unverified. If any TODO remains in the final note, the note is not finished, and a simple check for that string can be part of your session-end routine.
How the reader should use the note
A handoff is only half the process. The receiving worker should follow a short sequence.
Two points about this flow matter. First, a mismatch between the note and the checkpoint is a signal to stop. One of them is wrong, and acting on either can cause damage. Second, the reader verifies before building on the note. The note is a claim made by someone else, so it gets the same treatment as any saved state.
Common mistakes
- Writing a story. Chronological narration buries the current position. Lead with where things stand, not with how you got there.
- Listing many next actions. One action is easier to follow and easier to check.
- Leaving out uncertain steps. Interrupted side effects are the highest-risk item and the easiest to omit.
- Relying on shared context. Phrases like "as discussed" or "the usual config" mean nothing to a reader with no memory. Name files, dates, and values.
- Copying state into the note. Point to the checkpoint instead. Duplicated state goes stale.
- Skipping the handoff when the same agent resumes. An agent resuming after a context reset is a new reader. It needs the same note.
Summary
A good handoff note is short and honest. It states what is done, separates verified work from unverified work, warns about steps that must not run twice, gives one next action, lists open problems, and points to the full state. Build the factual parts from the checkpoint, write the judgment parts by hand, and have the receiver check the note against reality before acting.
Exercise
A worker is interrupted while running a step that sends invoices to customers. The checkpoint does not list the step as completed. Write the "Do not repeat" and "Next action" sections of the handoff note, and explain why the next action is not simply "re-run the send step."
Show answer
Do not repeat: "The send-invoices step was interrupted. Some invoices may already have been sent, and the checkpoint does not record which. Do not re-run the step as is, because customers could receive duplicates." Next action: "Query the mail log for invoices sent today, compare it with the invoice list, and send only the missing ones." Re-running is unsafe because the step has an external side effect and the outcome of the interrupted run is unknown. The reader must first establish what actually happened, then act on the difference.
Exercise
Sort these three claims into verified, done but unverified, or believed: (a) "The upload returned HTTP 200, but nobody opened the uploaded file." (b) "I read the output file back and its row count matches the source." (c) "The earlier session probably already converted the config, since the old format is gone."
Show answer
(a) Done but unverified: the step ran and reported success, but the result was not checked. (b) Verified: the output was compared with the real source. (c) Believed: it is an inference from indirect evidence. Only (b) can be written as done. (a) belongs under "Not yet verified" and (c) should be checked before anyone relies on it.