Skip to content
mentoor

Topic 1 of 5 · 5 min read

Handoff notes that carry decisions forward

Goal: Write a handoff from one agent to another that carries decisions and constraints, and find what a lossy handoff left out.

A handoff is the only thing the next agent knows, so it must carry the goal, the decisions already taken and the constraints, not just what was done. The receiving agent starts with an empty context. Anything you leave out does not exist for it.

Check yourself · 1 of 3

An agent finishes half a task and hands it to another agent. Which item is most likely to be lost if it is not written down?

Choose one answer

Why it matters

Agents summarise their own work, and summaries are lossy. "Added caching to the search endpoint" drops the reason that matters most: the owner said no Redis, so the cache is in-process. The next agent sees a slow endpoint, thinks Redis is the obvious fix and adds it. Nothing failed, and a decision was silently undone.

What a good handoff contains

  1. Goal: the outcome in one or two sentences, in the user's words, not the first agent's paraphrase.
  2. Done: what changed, with file paths and the commit or branch.
  3. Decisions and why: each choice that was made and the reason, so it is not reopened by accident.
  4. Constraints: rules that still apply (no new dependencies, keep the public API, do not touch the billing folder).
  5. Open questions: what is unknown and who can answer it.
  6. Next step and checks: the first action to take and the command that proves it worked.
  7. Artifacts: links or paths to files, logs and test output, so the next agent reads the evidence instead of trusting the summary.

Tools differ in how much they pass automatically. In the OpenAI Agents SDK a handoff can carry the whole conversation or a filtered version of it, plus structured input. In Claude Code, subagents and teammates start with only the prompt you write. In both cases the rule is the same: write down what must survive.

Before and after

Weak: "I finished the migration script. Please test it and deploy."

Better:

Goal: move orders.customer_email to a separate customers table without downtime.
Done: script at scripts/migrate_orders.py on branch feat/split-customers (3 commits).
Decisions: batches of 500 rows, because the 5,000-row batch locked the table for 9 s in staging.
Constraint: do not drop the old column in this release; a later release removes it.
Open: does the reporting job read orders.customer_email? Ask the data team.
Next: run it on staging with --dry-run, then check the row counts match.

What goes wrong

  • Dropped decisions. The reason for a choice is the first thing a summary loses.
  • Dropped constraints. A rule given once at the start never reaches the third agent in the chain.
  • Claims without evidence. "Tests pass" with no output cannot be checked. Pass the log.
  • Everything pasted. A 40-page transcript buries the three facts that matter. Curate the handoff.

Examples

The lost no-Redis rule

Agent one adds an in-process cache because the owner banned new infrastructure. Its handoff says only "search is cached now". Agent two, asked to make search faster, adds Redis. The fix is a Constraints line in the handoff: No new services; cache stays in-process.

A handoff in a Claude Code subagent prompt

Goal: make /export return within 3 s for 10k rows.
Done: profiled; 80% of time is the N+1 query in export_rows (see notes/profile.txt).
Decision: fix the query, do not add pagination; the API contract stays.
Check: pytest tests/test_export.py and the timing script scripts/time_export.sh.

The subagent has no other context, so each line removes a guess.

Key points

  • A handoff is all the next agent knows, so it must state the goal, decisions, constraints and open questions.
  • Record why a decision was made, or the next agent will reopen it.
  • Constraints given early must be repeated in every handoff, or they vanish after one hop.
  • Point to evidence such as logs, branches and test output rather than summarising it.
  • Curate: a short, structured note beats pasting the whole transcript.

Common mistakes

  • Writing "done, please continue" and assuming the receiver shares the context.
  • Passing results but not the reasons, so choices get reversed.
  • Pasting the full conversation instead of a curated note.
  • Reporting success without the command output or file that proves it.

Check yourself · 2 of 3

A handoff says: "Refactored the auth module, all green." What is the best improvement?

Choose one answer

Check yourself · 3 of 3

Where should an agent look to confirm that a handoff claim such as "the migration works" is true?

Choose one answer

Practice items, not counted towards your mastery.

Start here