Session handoff
Continue a long session in a fresh one.
What it does
- Adds
/handoff, which writes a short resume brief of the current session and starts a new session with it. - Opens the new session in a pane next to the old one and moves any unsent text from your composer into the new session's composer. The new agent reads the brief and replies with a short Goal, State, and Next summary, then waits for you.
- Shows a gauge button beside the send button when the context grows large: yellow at about 100k tokens, red at about 150k.
- Lets you continue on a different model, including across native and ACP models.
- Renames the old session
<title> (Resumed), moves it to Done on the Kanban board and links the two.
How to use
- Work until the gauge appears beside the send button. Hover it to see the token count.
- Wait for the current turn to finish, then click the gauge. A new session opens beside the old one on the same model.
- Or type
/handoffin the composer and pick a model from the list to continue on another model. - Read the summary (
Goal:,State:,Next:) and confirm or correct the next step.
text
/handoff
/handoff google/gemini-4Controls & gestures
Handoff gauge
The gauge appears only above the yellow bar. Below it nothing is shown.
| Where | Gesture | Result |
|---|---|---|
| Gauge button beside send | hover | Tooltip: Context <n>k tokens: ... with the hint to hand off; says the cache is cold after 5 idle minutes |
| Gauge button beside send | click | Runs /handoff on the same model and opens the new session in a pane next to this one |
Composer
| Where | Gesture | Result |
|---|---|---|
| Composer | slash command /handoff | Opens the model list (same as /model, current model highlighted); choosing a row hands off to that model |
| Model list | type | Fuzzy search by model name |
| Composer | slash command /handoff <provider>/<model> | Skips the list and hands off to that model; a wrong name returns an error before anything is created |
Settings you might change
The gauge thresholds are token counts, set per model, provider or for all models. Example for cordis.patch.yml:
yaml
- id: session-handoff
config:
defaults: { warmSoft: 100000, warmStrong: 150000 }See the README for cold-cache bars and per-model values.
Works with
- Requires Split View (
@lukstei/dsh-client-split-view) to open the new session in a pane; without the client part the session is created but not opened. - Kanban (
@lukstei/dsh-client-kanban) shows the new session on the board; the old one is marked Done. - ACP adapter (
@zaimokuza/dsh-acp-adapter), optional: lets the gauge read context size for ACP agent sessions.
Good to know
- The brief is a summary of the session log: goal, recent turns, tool failures and touched files. Tool output and reasoning are not included.
- Unsent text,
@references, and quotes in the source composer move to the new session automatically when you hand off. File and image attachments cannot be carried over; if your draft had attachments, the new session notes that they were left behind. - After 5 idle minutes the bars drop to 70k and 100k, and they are also capped at 60% and 80% of the model's context window.
- Handoff works from a session with at least one turn; a session without turns returns an error.
- Model Experience: the new session gets one follow-up message telling the agent to read
HANDOFF.md; nothing is added to tools or the system prompt.
Install
sh
dsh plugin --profile <web|desktop> add @lukstei/dsh-session-handoff