Session handoff
The handoff-new extension creates a fresh continuation prompt from the current conversation and starts it in a clean new session. This resets context and reduces token spend when a conversation has grown large or shifted direction. RPC clients can use the handoff_new command for the same flow in headless hosts.
Bundled with Selesai
Loaded automatically with Selesai; no per-extension npm install is required.
Setup and prerequisites
- This extension is bundled with Selesai. It is loaded automatically; you do not need to install it separately.
- Works in the terminal TUI and non-TUI/RPC hosts such as VS Code. In non-TUI hosts, generation runs directly without the terminal loader.
- Requires a selected model and valid API credentials so the handoff document can be generated.
- A model is used to summarize the conversation; the result is submitted as the first prompt of the new session.
What it sets up
- Registers the
/handoff-newslash command. - Reads the current session branch, including message and compaction entries.
- Calls the configured model with a system prompt that asks for a handoff document and preserves branch structure around compaction summaries.
- Starts a new session whose parent is the current session file, seeded with the generated handoff text. The current session’s name is carried over as the new session’s starting name.
- Emits a
handoff-newcustom entry in the current session as a breadcrumb.
What you can configure
Session handoff is controlled by the goal argument. The prompt template is source-owned.
No user configuration
This capability does not expose user-editable settings. Its behavior is controlled by the commands and runtime rules documented below.
Command, tool, and shortcut controls
| Key / path | Description |
|---|---|
/handoff-new <goal> | Create a continuation prompt in a fresh session. |
Source evidence
src/extensions/handoff-new.tsHandoff sourcesrc/skills/handoff/Handoff skillsrc/skills/selesai-handoff/
What you can do
- Run
/handoff-newto continue from a clean session after the model summarizes the current thread. The new session keeps the current session’s name (you can rename it with/name). - Run
/handoff-new implement the remaining database migrationsto tell the next session exactly what to focus on. - Use the output as an editable continuation prompt before the new session starts.
Commands, tools, and shortcuts
| Command | Description |
|---|---|
/handoff-new [goal] | Generate a handoff document and start a clean new session from it. |
RPC handoff_new | Generate a handoff and start a clean child session; accepts an optional goal. |
$selesai-handoff [goal] | Ask a skill-backed agent to launch a background Selesai session with a handoff summary instead of editing in place. |
Limits and safety
- The model prompt explicitly asks it to redact sensitive information such as API keys, passwords, or PII, but you should still inspect the generated handoff before it is submitted.
- Handoff generation requires a working model and API key. If generation fails, no new session is created.
- The original session remains intact and can still be resumed or navigated via
/tree. - The
selesai-handoffskill is a companion resource; it is not a separate bundled extension entrypoint.