Generate a structured work handoff for the next coding agent picking up your task — Codex, Cursor, another Claude Code session, or a human.
When you stop working on a task mid-stream and need someone (or some other agent) to continue, the usual options leak signal: a quick paragraph misses decisions, dumping the full chat history is noisy and overflows context. This command produces an 8-section structured brief that captures goal, decisions, dead-ends, and open work in one paste-able chunk.
The command always produces these 8 sections, in order:
- Goal — what the task is and why
- Current State — what's done, what's working
- Decisions Made — key choices and why, including rejected alternatives
- Failed Approaches — what was tried that didn't work, so the next agent doesn't repeat
- Evidence — test output, commits, repro steps
- Open Questions — pending decisions
- Next Steps — what's left (described as "X is not yet done", not "do X")
- Relevant Files — paths + line numbers to read first
No preamble, no closing remarks — output is paste-ready.
Available in all Claude Code projects:
mkdir -p ~/.claude/commands
cp commands/handoff/handoff.md ~/.claude/commands/handoff.mdOnly in the current project:
mkdir -p .claude/commands
cp commands/handoff/handoff.md .claude/commands/handoff.mdRestart Claude Code to pick up the new command.
In a Claude Code session:
/handoff
Or with an optional focus hint:
/handoff focus on the auth refactor in src/auth/
Then copy the output and paste it into the next agent (Codex, another session, etc.) as the first message.
- Claude Code: native slash command support; install as above
- Codex / Cursor / Windsurf: no native slash command for this. Typically you receive a handoff in these tools rather than generate one. If you do want to generate from there, ask the agent directly: "produce a handoff with these 8 sections: Goal / Current State / Decisions Made / Failed Approaches / Evidence / Open Questions / Next Steps / Relevant Files"
- One-shot, not chained: each handoff is a complete snapshot. No
seq-1/seq-2references to prior handoffs — keeps the surface small - No file output: output goes to chat. The user copies it (or pipes to
/copy). No.handoffs/directory, no git noise - Tone is left to the generating agent: section headings are fixed, but writing style is not enforced — keeps the prompt short
- Receiver protocol is not embedded: cross-tool, the receiver may be Codex or a human. The 8 sections are self-explanatory enough not to need a "how to read this" preamble