dsh-cross-session: Enables top-level DSH sessions to exchange messages, files, and read records

Introduction

When performing long tasks in DSH, a common practice is to spawn sub-agents to work in parallel. Sub-agents are cheap to start, but it is worth noting: they share the same turn, the same context window, and the same failure modes. The truly stable unit is often another top-level session—the one you can open in the sidebar, specify the model and tools for individually, and has its own long-running history. The problem is that the agent has no way to find it.

The zhyunran/dsh-cross-session introduced below is the plugin that solves this problem. Maintained by zhyunran, it provides five tools to the agent, allowing it to treat other top-level sessions under the same profile as peers: list them, send messages, transfer files, search history, and read conclusions. It is not a sub-agent, nor a message forwarding script, but a plugin running with the current DSH process permissions.

The plugin is listed in the community directory SkillHub, categorized under Workflows. GitHub shows 1 stars, version 0.1.2, license MIT, and requires DSH 0.2.x.

What is this plugin?

One-sentence positioning: Let an agent in a DSH session directly communicate with another top-level DSH session—send messages, transfer files, search its history, and read its own final answer.

It solves the “post-delegation acceptance problem.” Instead of trusting the other party to send back an envelope, you read their original transcript. The README calls this peer-session development.

Maintainer: zhyunran. Repository: zhyunran/dsh-cross-session. DSH’s philosophy is “everything is a plugin.” This plugin itself is a normal DSH bundle with no build step, relying only on the host’s @deepseek-ai/dsh-tools at runtime.

Core Features: Five Tools

The five tools are all hung under cross_session_* with a clear division of labor.

  1. cross_session_list: Lists other sessions, returning precise id / title / cwd / state. You can resolve “session B” or “those sessions C/D/E” by name.
  2. cross_session_send: Sends messages and real file attachments to one or more sessions. The goal is to wake them up and have them continue working on their own normal turn.
  3. cross_session_read: Reads the peer’s raw transcript—user messages, assistant replies, optional tool calls and results. Even cold-start sessions can be read.
  4. cross_session_search: Performs a literal search across the peer’s entire conversation; all terms must appear in a single message simultaneously.
  5. cross_session_wait: Waits for one or more peers to be completely idle, then retrieves its own final assistant message from its logs.

The last two tools are the key. The acceptance method is reading the other party’s dialogue record, not trusting the summary it returns. This is the difference between “pray after dispatch” and true cross-session collaboration.

Installation and Activation

Prerequisites: DSH 0.2.x (Desktop or dsh web). Plugin 0.1.2, requires Node >= 22.19.0.

First, look at the official recommended plugin manager method, then the CLI method.

  1. Get the package: Download dsh-cross-session-0.1.2.tgz from the GitHub release or the repo’s dist/ folder.
  2. Open DSH → Settings → Plugins. Install from a local tarball path, a local directory containing package.json, or a GitHub URL.
  3. Restart DSH once; the host loads the new bundle.

Method 2: CLI

# Local tarball (must be absolute path, relative paths will be rejected by installer)
dsh plugin --profile desktop add C:\path\to\dsh-cross-session-0.1.2.tgz

# Or GitHub tarball (does not require git to be installed locally)
dsh plugin --profile desktop add https://codeload.github.com/<owner>/dsh-cross-session/tar.gz/<40-char-commit>

# If published to npm
dsh plugin --profile desktop add dsh-cross-session

Restart once after installation. The plugin registers itself via its own cordis.patch.yml, so you don’t need to manually modify the profile. Note that the parameters here are --profile desktop add, not directly dsh plugin add github:owner/repo based on the plugin name.

The verification method is to ask the agent directly:

List the other sessions in this DSH.

It should call cross_session_list and list real session titles. If the tool is missing, it means the bundle didn’t load; check Settings → Plugins and restart.

Typical Usage

The following examples are based on the README and can be reproduced.

Reuse another session’s needs. The user says “finish the packaging task, requirements consistent with session B.” The agent searches first, then reads:

cross_session_search({ session: "ManageBac 打包要求", query: "版本号 changelog" })

After getting the precise rules, complete it yourself without moving the entire context over.

Command a group of sessions. It is known that C, D, and E have each done part of this project. Have them finish their respective parts:

cross_session_send({ to: ["C", "D", "E"], message: "...", expect: "transcript" })

The three peer sessions will then start working on their own. Later, verify by:

cross_session_wait({ sessions: ["C", "D", "E"] })

Then individually cross_session_read their transcripts to verify the actual output.

Ask a peer. You want to know about a decision made earlier regarding the installer:

cross_session_send({ to: "session-B", message: "What did we decide about the installer?", expect: "reply" })

The peer will use cross_session_send to reply back, or you can wait for cross_session_wait and then directly read the transcript.

Configuration

Available out of the box by default: any top-level session in the same profile can access any other session. DSH is a local single-user harness, and installing a plugin itself grants authorization. To tighten the strategy, override configuration items in your profile:

# <DSH_HOME>/profiles/<profile>/cordis.patch.yml
- id: dsh-cross-session
  config:
    access: workspace          # all | workspace | allowlist
    allowlist: []              # ids, exact titles, or "cwd:<absolute path>"
    denylist: []               # never listed, read or written
    allowSend: true
    allowRead: true
    includeHeader: true
    messageSource: agent-message   # agent-message | user

Meaning of key fields:

Field Default Meaning
access all all for all top-level sessions in the same profile; workspace limited to same cwd; allowlist limited to items in the list.
allowlist [] Works with access: allowlist. Accepts session ids, exact titles, or cwd:<path>, * matches all.
denylist [] Prohibited regardless of the access mode. Vocabulary same as allowlist.
allowSend / allowRead true Can be disabled for writing or reading separately.
includeHeader true Adds sender id before the message, clarifies this is a peer message, and specifies the reply tool.
messageSource agent-message agent-message marks senderSessionId truthfully; appears to the peer interface as receiving a task message; user makes it look like a message sent by a human.

Other default limits come from two tables in the README: single attachment 25 MiB (maxFileBytes), max 8 attachments per message (maxFiles), message text 100000 characters (maxMessageChars), single read/wait response 60000 characters (maxTranscriptChars), read/search event scan limit 20000 (maxEvents), read default returns 20 items (defaultReadLimit), search default returns 10 hits (defaultSearchLimit), default wait budget 120 seconds (defaultWaitSeconds), hard limit 600 seconds (maxWaitSeconds).

A behavior related to security worth noting: if the configuration is malformed, the plugin will not open access. It will log the error and fall back to deny-all, rather than preventing DSH from starting.

Applicable Scenarios and Notes

Suitable for those who have already broken down long tasks in DSH into multiple top-level sessions, configured models and tools for each, and hope the agent can find requirements, transfer files, collect results, and self-verify across sessions, rather than relying on copying and pasting context.

Points to note:

  1. The plugin runs with the permissions of the current DSH process. What it can read/write is within the scope of what the host can read/write. You should check the source code (lib/, cordis.patch.yml) and the license (MIT) before installing.
  2. It only acts on top-level sessions within the same profile and does not replace sub-agents; use sub-agents if lightweight parallelism is needed.
  3. Acceptance relies on transcript reading. If the peer session is cleared or the history exceeds the limit (maxTranscriptChars / maxEvents), full content might not be readable.
  4. The directory site SkillHub is an independent site with no official affiliation to DeepSeek/Huansuan. Star counts, versions, and configuration items are based on the repo README and package.json.

Conclusion

The value of this plugin lies in turning “another top-level session” into an object that the agent can truly call: send messages, transfer real files, search history, wait for idle, and read its own final answer. When multiple sessions work in parallel under the same profile, it is heavier than a sub-agent, but also more verifiable.

  • Directory page: https://www.skillhub.cn/plugins/zhyunran/dsh-cross-session
  • GitHub: https://github.com/zhyunran/dsh-cross-session
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye