Skip to content
Hammad Yousuf.
Long-running agents · NOTE 18

Long-running agents: write a useful session handoff

The next agent session needs the work state, not a vague summary.

Starter template · 4 October 2026
Hammad Yousuf
By Hammad YousufSoftware, AI & automation
CURRENT STATE → OPEN FAILURE → NEXT ACTION
Session handoff prompt · Open access

What to inspect

A useful handoff records the objective, completed work, verification results, open issues and the next concrete action. Keep pointers to real files and relevant versions. The next session should check the current workspace before relying on the summary.

Worked example

“Almost finished” is not actionable. “Parser updated; regression check A passed; case B still fails; inspect src/parser.ts next” gives the next session a starting point. This is an illustrative handoff, not a claim about a deployed agent.

Copy the full prompt

Adapt the inputs to your task. Remove private data before sending anything to a model. This page copies text locally; it does not run the prompt.

Full prompt · adapt the inputs
Write a handoff for [WORK SESSION]. Include objective, current file/version pointers, completed changes, checks actually run and their results, unresolved failures, constraints and the next concrete action. Separate verified facts from assumptions. Do not mark work complete because a summary was written. Tell the next session which current state it must inspect before continuing.

Review checklist

  1. Link to actual artifacts and versions.
  2. Record checks with observed results.
  3. Keep unresolved failures explicit.
  4. Start the next session by verifying current state.

Keep the resource

Download the complete note ↓Markdown · explanation, example, prompt and checklistDownload the prompt ↓Plain text · ready to adaptOpen the full-size visual ↓SVG · scalable reference diagram

Documentation & scope

Anthropic: long-running agent harnesses ↗

This is an original workflow template with an illustrative example. It does not report completed model tests or measured performance. Provider APIs can change; check the linked documentation for your exact integration.

Have a workflow to review?

Bring the task, inputs and the result you need. We can discuss the integration and the checks around it.

Discuss your workflow ↗