Skip to content

Session handoff ​

Continue a long session in a fresh one.

@lukstei/dsh-session-handoff

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 ​

  1. Work until the gauge appears beside the send button. Hover it to see the token count.
  2. Wait for the current turn to finish, then click the gauge. A new session opens beside the old one on the same model.
  3. Or type /handoff in the composer and pick a model from the list to continue on another model.
  4. Read the summary (Goal:, State:, Next:) and confirm or correct the next step.
text
/handoff
/handoff google/gemini-4

Controls & gestures ​

Handoff gauge

The gauge appears only above the yellow bar. Below it nothing is shown.

WhereGestureResult
Gauge button beside sendhoverTooltip: Context <n>k tokens: ... with the hint to hand off; says the cache is cold after 5 idle minutes
Gauge button beside sendclickRuns /handoff on the same model and opens the new session in a pane next to this one
Composer
WhereGestureResult
Composerslash command /handoffOpens the model list (same as /model, current model highlighted); choosing a row hands off to that model
Model listtypeFuzzy search by model name
Composerslash 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 ​

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

Released under the MIT License.