DSH Hub

snow-The/dsh-session-handoff

dsh-session-handoff

UIMemory0 GitHub stars· updated 2026-08-22

Session handoff & context management for DeepSeek Harness: structured handoff docs (export/resume/status) + active context pruning (acp_* via official compaction API) + optional OpenViking/archify enhancers

Install

npx @deepseek-ai/dsh plugin --profile web add github:snow-The/dsh-session-handoff

Restart `dsh web` after install. Bundle APIs can change during the developer preview.

README badge

dsh-session-handoff DSH Hub badge
[![DSH Hub](https://dshhub.dev/badge/dsh-session-handoff.svg)](https://dshhub.dev/plugins/dsh-session-handoff)

Paste this into your README. The star count updates with every catalog sync.

From the README

Excerpt from snow-The/dsh-session-handoff, cleaned of badges and images.

@snow-the/dsh-session-handoff

Session handoff & context management for DeepSeek Harness — built because the existing session-management and context-pruning plugins were written before the latest DSH update and don't cover the full workflow.

Why

Long sessions (like a 170k-line r32 session) hit context limits, trigger repeated automatic compaction, and stall. Switching to a fresh session loses all progress. This plugin fixes both halves — and more:

  1. Handoff — export a structured, portable handoff document so a fresh session can continue seamlessly.
  2. Active context pruning — compress spent history before the context window fills (official compaction API, model-authored summaries).
  3. Session management — trash / restore / purge / list sessions.
  4. Model routes — every registered route (official API, Ark, custom, vision-toolkit wrappers) is orderable and switchable; each route can pin its own model and reasoning effort (provider:model:effort), or follow the chat's current selection. No model id is hard-coded.
  5. ACP thresholds — tune compaction limits without touching YAML.

Tools

Module A — Handoff (zero dependencies)

ToolPurpose
handoff_statusCompact session overview: turns, messages, tool usage, checkpoints, context pressure
handoff_exportParse the session into a structured Markdown handoff under <workspace>/.dsh-handoff/ + a ready-to-run handoff package (OpenViking archive command, archify diagram command — only when those enhancers are present)
handoff_resumeLoad the latest handoff document in a fresh session and continue

Also /handoff command.

Module B — Active Context Pruning (official compaction API)

ToolPurpose
acp_statusUsage, surface seq map, limits (soft/hard pressure level)
acp_compressReplace an inclusive surface seq range with your summary (ctx.compaction.compactRegion)
acp_decompressRead the original text hidden by a checkpoint (read-only)
acp_searchSearch visible + hidden compacted history
acp_configShow the active thresholds (soft/hard limits, preserveRecent, minTokens, nudge)
acp_set_limitPersist new thresholds into settings.yaml (new sessions take them)

Plus a system-prompt pressure banner that nudges the model to compress past the soft/hard limit (60% / 70% defaults), and a compaction.summarize interception so model-authored summaries are used.

Module C — Session management

ToolPurpose
session_listList sessions (optionally including the trash)
session_trashArchive + move a session's artifact into the plugin trash (recoverable; refuses running sessions)
session_restoreMove it back and unarchive
session_purgePermanently delete artifact + trash entry

Trash entries persist as JSON under $DSH_HOME/dsh-session-handoff-trash/ (keeps the newest 10; oldest overflow auto-purged).

Module D — Model routes (same model, many vendors)

ToolPurpose
model_routesList every route serving deepseek-v4-flash: provider, baseURL, key env + family (ark-/sk-), default marker (incl. vision-toolkit- variants), vision wrapper variant
model_switchPoint agent-default-model at a route (persisted to settings.yaml; new sessions use it). Optional vision:true selects the vision wrapper variant; warns when the key family is missing

Related plugins