HANDOFF.md: Move Tasks Between Claude Code, Codex & Cursor
A HANDOFF.md prompt that makes your current coding agent write a short, exact handoff file so a fresh session or a different agent can pick up the task without re-reading everything.
Added · Updated
You are finishing a work session on a coding task. Another agent (or a fresh session of you) will continue it with no memory of this conversation. Write a HANDOFF.md at the repo root so it can pick up in one read. ## Rules - 60 lines max. Facts only, no narration of how we got here. - Exact paths, commands, branch names, and error messages, copied verbatim. - Mark anything you are not sure of as UNVERIFIED. - Do not paste secrets, tokens, or .env values. Say where they live instead. ## Write exactly these sections # Goal One or two sentences: what "done" means for this task, in testable terms. # Status Branch: [name] · Last commit: [hash + message] · Uncommitted changes: [yes/no, which files] # Done so far Bullets of what is finished AND verified (say how: test name, command, manual check). # In progress The exact step you stopped on, the file and function, and what is half-changed. # Next steps Numbered, smallest-first. Each one should be doable without asking me. # How to verify The commands to run (install, test, lint, build) and what passing looks like. # Decisions and why Choices already made that the next agent must not undo, each with a one-line reason. # Dead ends Approaches tried that failed, and why, so nobody repeats them. # Open questions for the human Only things that truly need me. If none, say "None". # Do not touch Files, folders, or systems out of scope for this task. After writing it, read it back once as if you were the next agent, and fix anything that would make you ask a question.
How to use it
- Click Copy template.
- Paste into ChatGPT, Claude, Grok, Cursor, or your agent framework.
- Replace the [BRACKETED] parts with your details.
Pairs well with: One Rules File for Claude Code, Codex, Cursor & Gemini
FAQ
What is a HANDOFF.md file?
A short file at the repo root that tells the next AI agent session what the task is, what's done, what's half-done, how to verify it, and what not to touch. It lets you switch between Claude Code, Codex, Cursor, or a fresh context without losing work.
How is HANDOFF.md different from AGENTS.md or CLAUDE.md?
AGENTS.md and CLAUDE.md hold standing project rules that apply to every task. HANDOFF.md is temporary and about one task in progress. Delete or archive it when the task is done.
How long should a handoff file be?
Short enough to read in one pass, roughly 60 lines. If it's longer, the next agent spends its context re-reading history instead of working. Put long logs in a separate file and link it.
Can parallel agents share one HANDOFF.md?
Give each parallel agent its own handoff file and its own branch or worktree, with one writer per file. Shared handoff files get overwritten.
Get 3 new templates every week
Free. Unsubscribe anytime.Related templates
Multi-Agent Crew Setup (Planner/Worker/Critic)
AI Agent Run Postmortem Prompt (Find the Real Fix)
End-of-Session Review: Decision Log & Rules File Updates
Browse all AI Agents templates