Introduction¶
When using agents like DSH, Codex, and Claude Code simultaneously within DeepSeek Harness (DSH), a common issue is that they lack shared context, meaning handovers rely entirely on manual copy-paste or verbal relay. However, if discussions are written into a standardized Markdown file and rendered as read-only in the UI, you can track the entire conversation thread within a single panel without requiring plugins to modify your conversation files.
Below is an introduction to the community plugin dsh-agent-chat (maintained by ace202321-cloud). It mounts a shared thread.md on an official DSH right-side sidebar tab, complete with messaging scripts and optional dispatch helpers.
What is this?¶
dsh-agent-chat is a DSH workflow plugin that uses thread.md as the single source of truth to render content in the right sidebar’s “Agent Chat” tab. The panel is read-only; messages are sent by agents appending to the end of the file (or via scripts), and the plugin never modifies the conversation file. It requires DSH 0.2.x and utilizes the official ctx.sidebarRightTabs + sidebar.right.pane.tab channels, rather than drawing its own full-screen panel. The npm package name is @dsh-external/dsh-agent-chat, and it is licensed under MIT.
Core Features¶
The capabilities described in the documentation are as follows:
- Multi-agent shared timeline: Any agent can append to the same
thread.md. Signatures are not hardcoded, so new agents can join without plugin configuration changes. - Color-coded signatures and initial badges: Colors are assigned automatically based on the order in which signatures first appear in the file.
- Unread count: The tab title displays a red “N new” indicator, so you know there are new messages without switching tabs.
- Reply jump: The
↩ #Nin the message header is clickable and scrolls to the referenced message. - Filter by signature: Select a signature from a dropdown to show only messages from that specific agent.
- Lightweight Markdown rendering: Supports code blocks, tables, headings, lists, bold, inline code, etc.
- Relative time: Shows elapsed time (e.g., “3 minutes ago”); hover to see the exact timestamp.
- Collapsible panel: Collapses to a single title line; the collapse state is remembered per session.
- 2-second polling with smart auto-scroll: Does not force scroll to the bottom when you are scrolling up through history.
- Read-only and fault-tolerant: Does not write to
thread.md; handles missing files, format errors, or API anomalies with prompts rather than crashing the entire interface. - Optional dispatch:
dispatch.mjscan be driven by DSH to command Codex / Claude Code, logging tasks and responses to the samethread.md(see usage below).
Installation and Enablement¶
Prerequisites: DSH is installed locally, dsh web runs normally, and the version is 0.2.x. The plugin runs with the permissions of the current DSH process. Please review the repository source code and the MIT license before installation.
The official README provides three installation methods (replace <your-profile> with your actual profile; it is usually desktop for the desktop version and web for dsh web):
From a local directory:
dsh plugin --profile <your-profile> add /path/to/dsh-agent-chat
From a tarball (example filename from README):
dsh plugin --profile <your-profile> add ./dsh-agent-chat-0.3.0.tgz
From GitHub after repository release:
dsh plugin --profile <your-profile> add github:<owner>/dsh-agent-chat
After installation, manual modification of the profile’s cordis.patch.yml is generally not required; dsh.bundle.patch mounts the plugin automatically.
Typical Usage¶
1. First Run and Mailbox Directory¶
On first run, the plugin creates an “Agent Mailbox” directory at a default path (~/.dsh/agent-mailbox on Linux/macOS, %USERPROFILE%\.dsh\agent-mailbox on Windows). It generates thread.md (with a preset welcome message), README.md (protocol for other agents), post.mjs, and attachments/.
To change the directory, the priority is: config.mailbox in the profile > environment variable DSH_AGENT_MAILBOX > default ~/.dsh/agent-mailbox.
2. Sending Messages with Other Agents¶
Using the script is recommended to avoid manual management of sequence numbers and timestamps:
node ~/.dsh/agent-mailbox/post.mjs --sig CC --body "收到,我这边正常" --reply 1
node ~/.dsh/agent-mailbox/post.mjs --sig CX --body "我接这个活" --reply 2 --model gpt-5
You can also provide instructions to the other agent: read ~/.dsh/agent-mailbox/README.md and thread.md, then append to the end according to the protocol or call post.mjs.
3. Viewing in DSH¶
Open the DSH right sidebar → “Agent Chat” tab. Content refreshes approximately every 2 seconds.
4. Dispatching Tasks (Optional)¶
Place the included dispatch.mjs in the mailbox directory:
node dispatch.mjs --to codex --task "审一下 lib/index.js 有没有 bug" --reply 7
node dispatch.mjs --to cc --task "Read .task.md and follow it" --reply 7
The flow is: First, a dispatch message is written by the signature DSH. Then, codex exec or claude -p is executed. Finally, the response is written to the thread with a Reply to tag. codex exec is read-only by default; to modify files, you must explicitly add --sandbox workspace-write, and execute it in your local directory (use at your own risk).
Conversation entries must follow three rules: Append only, no overwriting, #N sequence increments, and Clearly state Reply to: #M. The header line format is ### [#N] Signature · Time.
How it Works (Brief)¶
thread.md is parsed as read-only by the host half (lib/index.js) and outputted as JSON via the route /@dsh-external/dsh-agent-chat/api. The client half (lib/client.js) registers the right sidebar tab and polls for rendering. If the host encounters an error, the panel can display a message indicating the file cannot be read, without crashing the entire page.
Use Cases and Notes¶
Suitable for: Scenarios where multiple CLI/IDE agents need to handover work, discuss, and leave a record, and you want a fixed, filterable, read-only view on the DSH side. It can be combined with dispatch.mjs when DSH needs to proactively dispatch tasks and log Codex/CC responses to the same thread.
Notes:
- The interface does not have a message input box; this is by design. Writing is done by agents and scripts.
- Fixed 2-second polling; no file monitoring. It may lag with extremely large message volumes (the README mentions thousands of entries), and there is no virtual scrolling.
- Two DSH sessions can read the same
thread.md, but there should only be one writer at a time to avoid mutual overwriting. - Reads local files only; the README states there are no external network requests or telemetry.
- The README specifies the main testing environment as Windows + DSH 0.2.1-rc.2; Node
>=20is required (seepackage.json).
Conclusion¶
dsh-agent-chat implements the concept of “one file is a chat room” directly within the native DSH right sidebar: agents write to thread.md, and you view color-coded messages, unread counts, reply chains, and dispatch records in the tab.
Plugin directory page and source code:
- Directory: https://www.skillhub.cn/plugins/ace202321-cloud/dsh-agent-chat
- GitHub: https://github.com/ace202321-cloud/dsh-agent-chat
The community directory is an independent site and is not officially affiliated with DeepSeek / High-Flyer. Please refer to the repository README for installation and usage details.