Submit AI session handoff
session_handoffUser-initiated session migration only: submit the takeover prompt AFTER the user explicitly asks to hand off, move to a new chat, or generate a takeover prompt. Never call merely because advisory.type=SESSION_HANDOFF_RECOMMENDED or handoff_notice was returned, and never call when the user says continue or asks to finish the current work. The AI must summarize its own current conversation context, include the project goal, completed work, real Device/Worktree/Branch/Commit/deployment/test state when relevant, unfinished work, decisions and prohibitions, risks/BLOCKED/TODO, and the first next step. Never include passwords, tokens, private keys, bearer credentials, or other secrets. Reusing the same action_id is idempotent.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"ai_session_id": "<ai_session_id>",
"action_id": "<action_id>",
"handoff_prompt": "<handoff_prompt>",
"task_count": "<task_count>"
},
"name": "session_handoff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action_id | Yes | The fixed action_id from SESSION_HANDOFF_RECOMMENDED advisory. | |
| task_count | Yes | Pass advisory.task_count (live remote-task count) or get_ai_session_status.handoff_trigger_count (frozen threshold-crossing count). Either is accepted for the same PENDING action_id. | |
| workflow_id | No | Optional workflow_id for the same AI Session. | |
| ai_session_id | Yes | The ai_session_id from SESSION_HANDOFF_RECOMMENDED advisory. | |
| summary_title | No | Optional concise title for the handoff. | |
| handoff_prompt | Yes | Complete prompt that a new AI session can use to take over the work. Do not include secrets. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||