In DeepSeek Harness (DSH), threads are usually isolated from one another. A subagent can only work inside the thread that invoked it and cannot access other threads in the same deployment. This makes cross-thread collaboration require manual intervention. The dsh-thread-tools plugin solves this problem by providing tools to directly access and operate on other threads.
This is a plugin maintained by wig123 (MIT license). It provides DeepSeek Harness with cross-thread operations: listing other threads in a deployment and sending messages to active threads.
Core Features¶
The plugin provides the following tools:
thread_list: Lists thread information (ID, title, directory, creation time, status).thread_search: Performs a full-text search of thread content.thread_send: Sends a message to an active thread.thread_reply: Reads the latest reply from a thread.thread_create: Creates a new empty thread.thread_fork: Forks an existing thread.
Installation and Activation¶
Install using the official NPM package:
dsh plugin --profile web add @wig123/dsh-thread-tools
Or install from GitHub source:
dsh plugin --profile web add github:wig123/dsh-thread-tools
After installation, restart the profile for the changes to take effect.
Typical Usage¶
- List the 3 most recent threads:
thread_list({"limit": 3})
- Send a message to a specified thread:
thread_send({"session_id": "...", "message": "..."})
- Wait 30 seconds and read the reply:
thread_reply({"session_id": "...", "wait_ms": 30000})
Notes¶
- Thread status: Only threads in the active state (
live) can receive messages; dormant threads (dormant) are unreachable. - Search dependency:
thread_searchrequires the optional dependencydsh-session-query; otherwise, it is unavailable. - Fork limitation: Forking must happen after a completed turn; otherwise, it returns
no-completed-turn. - Reply mechanism:
thread_replyreturns the latest text from the target thread, rather than performing pattern matching.
The plugin fills the gap in DSH for top-level thread interaction. To learn more or view the source code, visit the GitHub repository.