handoff
Package the current session's state into a compact continuation document so a fresh session can resume without losing decisions or context.
Instructions
Package the current (or a given) session's state into a compact continuation document for starting a fresh session, without losing decisions/context already established.
Use when the current session has grown long (many turns, large context) and continuing it is getting expensive, or when the user explicitly asks to "hand off", "continue this in a new session", or "start fresh but keep context" — and no different AI coding tool is named. If the user names a specific other tool ("move this to Cursor", "open in Codex"), use transfer_session instead — it preserves full captured history losslessly, where this tool summarizes. If session_id is omitted, resolves the current session from the CLAUDE_SESSION_ID environment variable; if that isn't set, pass session_id explicitly. Returns a markdown document to paste as the first message of a new session — this does not end the current session for you.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "handoff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | No | ||
| include_diffs | No | ||
| max_diff_lines | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||