Preface¶
When developing with DSH (DeepSeek Harness), you often encounter this situation: Session A has just analyzed a problem thoroughly, and Session B takes over the related work, needing A’s complete context. Without specialized tools, the path is to export session logs, move the files over, unzip them, and then manually read the zstd-compressed JSONL—moving the files “back and forth” between sessions, which is costly.
dsh-session-link compresses this into a single copy and paste: a one-click copy of the current session’s @session-<uuid> reference in the session header, pasted into another session and sent; the model then invokes the session_read tool to read back that session’s conversation content in the form of user: / assistant: text. Below is an introduction to its features, installation, and usage.
What is this¶
dsh-session-link is a plugin for DeepSeek Harness (DSH), maintained by jinhuang712, and is licensed under MIT. DSH’s philosophy is “everything is a plugin”; this plugin targets context sharing between sessions: it does not modify the model’s memory mechanism but allows any local session to be read by another session via reference.
After installation, it provides three things: a copy button in the session header, @ session mention sources in the input box, and the session_read tool. Additionally, it comes with a companion skill of the same name to teach the model when and how to read references.
Core Features¶
Copy Current Session Reference¶
A new button “🔗 Copy Session ID” has been added to the session header. Clicking it places the current session’s @session-<uuid> reference into the clipboard. This is a pure clipboard operation with no host round-trip; the button toggles to “✓ Copied” after clicking.
List Sessions by Title via @ Mentions¶
Type @ in the input box; the session source group lists all local sessions by title, searchable by title or ID. Selecting an item inserts a reference chip into the input box without needing to switch sessions.
Render References as Chips¶
@session-… references are rendered with a blue background and white text in sent bubbles. The scope of the redraw is precisely limited and does not affect other types of @ mentions. Since the reference is a structured chip rather than a string of text needing interpretation, the model knows how to handle it once the other party receives it.
session_read Tool¶
A tool on the model side that can parse three forms of references:
@session-<uuid>: Precise match, recommended for use, this is the format produced by the copy button.dsh-session:URI: The URI form of the link payload.@title: Precise match by title; returns a list of candidates and IDs if not found or ambiguous, requiring a retry by ID.
The return fields are { sessionId, title, cwd, logPath, seqRange, transcript, truncated }. The tool is read-only and live-first: the read reflects the current state of the running session; sandbox sessions are also supported.
Projection behavior can be controlled via parameters:
maxChars: Character budget for projection, default 64000.truncate:"tail"(default) keeps the most recent dialogue lines,"head"keeps the earliest.raw: For debugging, returns the first 200,000 characters of the raw JSONL.
Accompanying Companion Skill¶
During installation, it declares and registers a skill of the same name via dsh.skills. The content is usage instructions for the model to know which tool to call and what parameters to pass when encountering a reference.
Installation and Enablement¶
Installation of a fixed version. Build artifacts are committed; no local build is required, and no registry is involved:
dsh plugin --profile web add "github:jinhuang712/dsh-session-link#v0.1.0"
# Restart dsh web and refresh the page
If you want to track unpublished commits, you can pin to the main branch:
dsh plugin --profile web add "github:jinhuang712/dsh-session-link#main"
You can also install via link from a local checkout:
git clone https://github.com/jinhuang712/dsh-session-link.git
dsh plugin --profile web add "link:$PWD/dsh-session-link"
If your dsh profile directory itself is a pnpm workspace, pnpm will require passing -w first to operate on the workspace root directory; just pass it through to the command: dsh plugin --profile web add -w ….
After installation and restart, the header button, @ menu group, and session_read tool are permanently available in all sessions.
Typical Usage¶
Handing over Session A’s context to Session B involves the following complete process:
- Open Session A and click the “🔗 Copy Session ID” in the header.
- Switch to Session B, paste the reference into the input box (displayed as a chip) and send it.
- The model invokes the tool to read the reference:
session_read({ "link": "@session-7fc2d98e-…" })
The returned result contains the session’s title, cwd, and conversation text in the form of user: / assistant:.
If you just want to reference a session without switching to it, type @ in the input box, find the target session in the session group by title, and insert it.
Note that the @title form is an exact title match. If it is not found or is ambiguous, the tool will return candidates and IDs, so you just need to retry by ID.
Boundaries and Considerations¶
A few practical boundaries you need to know before using:
- Chinese titles will not render as chips: The accompanying
@mention regex is missing the/uflag, so references like@分析…will not be redrawn. Therefore, the copied format is always the ID rather than the title, specifically to bypass this issue. @titleresolution depends on the host’ssessionQuerytitle snapshot: When this capability is unavailable, the tool will explicitly state it and point to the ID form.- Reading is read-only and live-first:
sessionQuery.readSessionreflects the current state of the running session; the disk log path is returned only as reference information (logPath), and the plugin never writes to it.
Additionally, the plugin runs with the permissions of the current dsh process. It is recommended to read the source code and license of any third-party plugin before installing. This plugin is MIT licensed and the repository is public, so the cost of checking before installing is low.
To uninstall: remove the insert line for dsh-session-link from cordis.patch.yml in the web profile; then remove the dependency from dsh.profile.bundles and run pnpm remove.
Summary¶
dsh-session-link solves a very specific problem: context passing between sessions. It eliminates the need for the workflow of exporting, moving, unzipping, and manually reading logs, completing it with a single copy and paste. The reference is a structured chip, the read is a read-only projection, and the behavioral boundaries are clearly documented.
The plugin is listed in the community directory (an independent site with no official affiliation to DeepSeek or Hypothesis): https://www.skillhub.cn/plugins/jinhuang712/dsh-session-link , source code repository: https://github.com/jinhuang712/dsh-session-link .