Introduction

DeepSeek Harness (dsh) provides subagents and @session mentions in the Web UI as built-in cross-session mechanisms. The former is a parent-child relationship, while the latter is one-way and read-only. In many scenarios, two independent dsh sessions (for example, a database assistant and a frontend assistant running on different machines) need to communicate bidirectionally. This plugin solves this problem by establishing a peer-to-peer, decentralized message channel between independent processes.

Plugin Positioning

This is a decentralized, peer-to-peer, cross-process (optionally cross-machine) message channel.
* Model-driven: The model discovers peer sessions by calling cross_session_list_agents and sends text by calling cross_session_send_message.
* Safe injection: Messages are injected with form: 'relay', without requiring authorization for tool calls; tool calls made by the recipient still require user approval (denied by default).
* Reliable delivery: Supports sender-side delivery confirmation, exponential backoff, and dead-letter handling to ensure eventual message delivery.

Installation

Prerequisites: Node.js >= 24.11 and a working dsh environment.

  1. Install dependencies and build:
    npm install
    npm run build
  1. Add the plugin to the configuration file:
    dsh plugin --profile demo add ./cross-session-messaging
    dsh --profile demo --dump-config

Typical Usage

  1. Open two independent sessions in DSH.
  2. In one of the sessions, use a natural language prompt:
    “List the other sessions currently running, then send one of them a message: hello.”
  3. The model calls cross_session_list_agents for discovery and cross_session_send_message for sending.
  4. The other session receives the form: 'relay' text.

Configuration

Configuration is specified under config: in the plugin’s cordis.patch.yml. For local use, typically only name and the inbound policy are needed:

- insert:
    - id: cross-session-messaging
      name: '@wy/dsh-cross-session-messaging'
      config:
        dirs:
          baseDir: ~/.dsh/cross-session   # data root directory, default value
        inbound:
          rules: []                        # matching rules; an empty list means allow all
          defaultDecision: auto            # default decision; auto is determined based on DSH_PERMISSION_MODE
        name: ''                           # session name; uses shortId by default

Cross-machine communication:
You need to configure the remote field:

remote:
  listen: { host, port, identity, secret }
  tls: { key, cert }
  peers:
    - { name, host, port, secret, tls, tlsCa/tlsFingerprint }
  • remote.listen: TCP listen configuration for the local machine.
  • remote.tls: Listener certificate configuration.
  • remote.peers: Static peer list used by the sender.
  • Note: Cross-machine TLS requires configuring tlsCa or tlsFingerprint; otherwise, the connection will be rejected.

Tools

  • cross_session_list_agents: Lists reachable peer sessions.
  • cross_session_send_message: Sends text to a session.
  • cross_session_inbox_review: Reviews messages pending acceptance/rejection.
  • cross_session_inbox_resolve: Resolves pending messages.

Notes

  • Requires Node.js >= 24.11.
  • Messages are injected as “relay” text and do not automatically approve tool calls.
  • Tool calls made by the recipient still require user approval (denied by default).
  • Cross-machine communication requires configuring a remote listener and TLS settings.
  • Cross-machine TLS requires configuring tlsCa or tlsFingerprint.

Ecosystem

The DSH philosophy is “everything is a plugin.” This plugin is maintained by Weiyang742 under the MIT license.