Introduction¶
When working with agents or long-running tasks in DSH, conversations often grow longer over time: the context window fills up, responses slow down, and the model tends to “forget” early conventions. DSH natively supports compaction and forking—the former compresses history within the original session, while the latter copies the complete history to a new session. If you want to keep the original session untouched while continuing work in a new session using a one-page structured summary instead of carrying the entire baggage or re-dictating requirements, you need an extra step beyond “compress/copy”: “write a handoff, start a clean session.” The following introduces the community plugin dsh-session-handoff.
What is this¶
dsh-session-handoff is released by maintainer MountBatten718 and categorized as a workflow plugin in the SkillHub community directory. The GitHub repository currently has about 2 stars, uses the MIT license, and the package version is 0.3.1 (subject to the repository’s package.json).
In one sentence: when the context or session size approaches a threshold, it asks first (or you can manually trigger /handoff), using an LLM to organize recent conversations into a handoff document (goals, methods, completed items, involved files, next steps, open questions, etc.). It creates a new session with no old context in the same workspace, injects the document as the first message, and automatically opens it. The original session is not modified, and the title sidebar can link back to it.
Differences from compaction and fork¶
/compact |
fork | dsh-session-handoff | |
|---|---|---|---|
| Original Session | Compresses in place | Retained | Kept as is, title can link back |
| Content loaded in new session | Same session | Full history copy | One-page handoff note |
| Switch timing | Auto when threshold reached | Manual | Ask first when threshold reached (or auto by strategy) |
Compaction repacks the old context, and fork is a full copy; this plugin writes what “needs to be remembered” into a brief, allowing you to continue lightweight in a new session.
Core Features¶
The following capabilities are derived from the project README and can be tailored to your needs.
- Manual Handoff: Enter
/handoff,/handoff <N>, or/handoff all; if no parameters are provided, the config itemturnsis used (default: last 50 user messages). - Automatic Strategy:
autoModesupportsreplace(before native compaction),hybrid(when session becomes heavy, default), andnative(no auto-switch). - Ask Before Acting: Defaults to a
confirmpopup for confirmation; can be changed tonotifyorauto. If the suggestion is rejected, the trigger watermark needs to rise by another 50% (askRearmPercent) before it asks again. - Health Line: A persistent status bar above the input box showing “context xx% | session xxMB | ~N turns left”.
- Clean New Session: Inherits workspace, model routing, and agent presets (system prompts / tools / skills), without carrying old conversation context.
- Structured Document: Can be persisted to disk; the settings panel allows browsing historical handoff documents.
- Auto-open Sub-session: The client waits for the sub-session to be created and then navigates to it (only once per sub-session; replays do not trigger duplicate jumps).
- Decision Log: Every decision (action and reason) can be recorded and viewed in settings.
- Implementation: Relies only on public host services, integrated via a single
dsh.bundle.patch, without modifying the DSH core.
Installation and Activation¶
Environment requirements: DSH Desktop or CLI, Node ^22.19.0 || >=24. The README states it has been tested on versions 0.1.0-rc.5–rc.8, 0.1.1-rc.2, 0.2.0-rc.2, 0.2.1-rc.2, etc.; refer to the repository’s package.json for engines.dsh and peerDependencies.
The plugin is a standard DSH bundle: place it in the node_modules of the currently used profile and register it in that profile. Desktop profile example (replace paths according to your environment):
# 1) Clone the repo to any directory (or extract dsh-session-handoff-0.3.1.tgz from the release)
git clone https://github.com/MountBatten718/dsh-session-handoff.git ~/dsh-session-handoff
# 2) Link to the desktop profile's node_modules
ln -s ~/dsh-session-handoff ~/.dsh/profiles/desktop/node_modules/dsh-session-handoff
Register the dependency in the same profile’s package.json:
{
"dependencies": {
"dsh-session-handoff": "link:/Users/you/dsh-session-handoff"
}
}
And add dsh-session-handoff to the dsh.profile.bundles of that profile. Restart DSH to apply changes.
Note: The profile named desktop is exclusive to the Electron application. The CLI rejects plugin add / --dump-config for this name. If you want to use the CLI for read-only checks, you can use a symlink profile with a different name pointing to the same directory. Standard CLI profiles can be handled in the same way you install other local plugins.
Please read the repository source code and the MIT license before installing; the plugin runs with the permissions of the current DSH process, and the handoff summary will call the model you configured to process recent conversation text.
Typical Usage¶
Enter the following in the input box of any session:
/handoff # Uses configured turns (default 50 user messages)
/handoff 20 # Summarizes the last 20 user messages
/handoff all # Summarizes all user messages
The flow is roughly: Command card displays “summarizing” → LLM generates handoff document → New session opens automatically; the original session remains unchanged and can be linked back from the title.
Privacy: User and assistant messages within the specified window are sent to the currently configured model to generate the summary. Please confirm that the model and routing comply with your compliance requirements before use.
Most options are modified in DSH → Settings → Plugins → session handoff and take effect immediately. Example of a complete profile snippet (see README for field meanings):
- id: handoff
name: dsh-session-handoff
config:
autoMode: hybrid
autoPromptLevel: confirm
sessionVolumeBytes: 8388608
turns: 50
handoffDocPersist: true
If provider / model are not set, the new session inherits the model routing most recently recorded in the current session. Each handoff also records stages and results in <DSH_HOME>/session-handoff-docs/handoff-trace.jsonl (long text is masked, rotated at approximately 5 MiB).
Applicable Scenarios and Notes¶
Suitable for: Long-duration code changes, requirement breakdown, or multi-round troubleshooting within a single workspace, where the window or session size frequently hits the threshold, and you want to “write it down and start a new game” rather than forking the entire history or just compacting in the original session.
Notes:
- Known limitations listed in the README include: some DSH versions are verified;
0.1.2-alpha.1requires separate client migration due to conversation UI/service splitting; the host-sidesession.snapshotEvents()is marked@deprecated, and the reading entry point may be replaced in future kernels. Refer to the repository’s Known limitations. - The community directory SkillHub Plugin Page and GitHub repository are maintained by the community and have no official affiliation with DeepSeek / High-Flyer; the DSH ecosystem emphasizes “everything is a plugin”, please verify the source and permissions before installing third-party bundles.
Conclusion¶
dsh-session-handoff fills the gap of “remember key points → continue in a clean new session”: manually use /handoff or trigger a prompt before the threshold based on strategy, replacing the relocation of the entire context with a one-page handoff document. For details and configuration, see GitHub: MountBatten718/dsh-session-handoff, and for the directory entry, see SkillHub: dsh-session-handoff.