Introduction

The DeepSeek Harness (DSH) plugin ecosystem allows developers to extend the capabilities of the main program. In agent development, two independent top-level sessions frequently need to collaborate. The traditional subagent mechanism can handle task dispatch, but in some scenarios developers prefer two agents to interact directly as equal peers. dsh-peer-relay was created to address this need: it provides a set of Host-side tools that allow a regular top-level agent to submit asynchronous tasks to another regular top-level session.

Plugin Positioning

This is a Host-only plugin maintained by klpzj under the MIT license. Its core role is to act as a relay layer between two DSH sessions, enabling bidirectional task delivery and asynchronous result reception.

Core Features

The plugin provides five main tools for managing peer sessions and tasks:

  • peer_list: Lists live regular top-level sessions in the same workspace as the current session.
  • peer_call: Submits an asynchronous task to a specified session in the same workspace.
  • peer_create: Creates a new peer session in the current workspace (you can specify agent_preset; by default, it inherits the current session’s preset).
  • peer_status: Queries the status of a task initiated by the current agent.
  • peer_cancel: Cancels a task initiated by the current agent.

Installation and Enablement

Install the plugin using DSH’s plugin command. After installation, restart the Host to load it.

dsh plugin --profile web add dsh-peer-relay

Typical Usage

In a DSH Host environment, developers can establish peer collaboration using the following steps:

  1. List sessions: First, use peer_list to view the available peer sessions in the current workspace.
  2. Create a session: If a new collaborator is needed, use peer_create to create a new peer session in the current workspace.
  3. Submit a task: Use peer_call to submit an asynchronous task to the target session.
  4. Monitor and cancel: Use peer_status to check task execution, and use peer_cancel when necessary to cancel a task.

Applicable Scenarios and Notes

  • Host-only: The plugin runs only inside the DSH Host and does not include a Client or Web UI.
  • Data persistence: It always uses ~/.dsh/peer-relay.sqlite to store session and task state.
  • Session resolution: It always uses the configured Typert agent lookup in the Host to resolve sessions (including the official cold-recovery path).
  • Session type limitation: The tools are only installed for regular top-level sessions, not for subagents.
  • Feature boundaries: The plugin does not include ACLs (access control lists), storage adapters, fallback paths, or interactive protocol state.
  • Workspace constraint: Peer collaboration is strictly intended for work within the same project workspace. peer_list only returns sessions with the same cwd as the main session, peer_call rejects cross-workspace targets, and peer_create creates new sessions in the cwd of the main session.

Summary

dsh-peer-relay provides DSH plugin developers with a lightweight inter-session communication solution. Rather than relying on a complex protocol stack, it achieves direct connection through SQLite and DSH’s basic session mechanism. For developers who need multiple agents to work in parallel on tasks within the same project, this is a practical tool.