Ten thread tools for DeepSeek Harness matching the set Codex exposes: list_threads, list_archived_threads, read_thread, wait_threads, send_message_to_thread, create_thread, fork_thread, set_thread_title, set_thread_archived and delete_thread. A message is delivered through the same Host path a human client uses, so a cold session is resumed and an idle one starts a turn; wait_threads waits on up to eight sessions at once, and turns are read back with harness-injected reminder blocks stripped.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:Heroicus/dsh-thread-tools
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
把 Codex 桌面端的 thread 协同工具集 1:1 搬到 DeepSeek Harness。一个 DSH 会话对应一个 thread。
工具(与 Codex 同名同参)
| 工具 | 作用 |
|---|---|
list_threads |
列出线程:mode: recent 返回置顶 + 按活跃排序;mode: history 返回一页(cursor/limit) |
list_archived_threads |
列出已归档线程的一页 |
read_thread |
读某个线程的轮次摘要,支持 turnLimit、includeOutputs、maxOutputCharsPerItem、cursor 翻页 |
wait_threads |
最多等 8 个线程,谁先完成/需要输入就返回;timeoutMs 上限 120000,0 表示立即快照 |
send_message_to_thread |
投递消息,包在 <codex_delegation><source_thread_id>…</source_thread_id><input>…</input></codex_delegation> 信封里 |
create_thread |
新建线程,可带首条 prompt 异步派发 |
fork_thread |
复制线程(含历史)成独立新线程 |
set_thread_title |
改名 |
set_thread_archived |
归档 / 取消归档;已归档的线程拒绝投递 |
delete_thread |
永久删除线程与其持久化日志 |
hostId、source 为签名兼容参数,本安装只有一台 host。
安装
本地目录安装:插件 → 添加插件 → 选这个目录。或在会话里用 plugin_manager 的 install_bundle 指向本目录。
无依赖、无构建步骤,index.js 就是全部实现。
实现要点
- 投递走宿主的人类客户端同一条路径
sessionController.prompt:冷会话自动恢复,忙碌会话排队,日志与标题语义与用户手打一致。 wait_threads用sessionController.wait,并对「消息还在入队、会话却已 idle」的情况继续等待,避免抢答。read_thread用sessionQuery.readSurface折叠事件流,剥掉<system-reminder>与时间注入块,只留真人 prompt 与模型回复。- 只读操作不会调用
sessionController.state(),避免把冷会话意外唤醒。 - 归档 / 置顶状态存在
$DSH_PROFILE_DIR/session-bus/state.json(原子写)。 - DSH 没有公开的「移除已加载会话」API,所以
delete_thread会先取消运行中的轮次,再删磁盘日志;内存里的副本到下次重启消失,返回值里clearedFromMemory: false说明这点。
已验证(2026-11-18,DSH desktop profile)
10 个工具逐个实跑通过,包括:冷线程摘要读取、跨线程投递后目标回复 BUS-REPLY-OK 被 wait_threads 取回、归档后投递被拒、fork 后改名、删除后日志目录消失。
与 Codex 的差异
- 没有
handoff_thread(跨 host / worktree 迁移)、share_thread、list_projects、get_usage_limits等依赖 Codex 账号体系或 host 网络的工具。 - 没有
set_thread_pinned/set_thread_read_state:DSH 侧边栏不消费这两个状态。
License
MIT
Links
More in this category
ranxianglei/billion-context★ 8035
The official billion-context plugin: a context-compression plugin for small context windows (a 100K context is enough), token savings (5x fewer tokens), and month-long single sessions (billions of tokens).
Minglink/dsh-infinite-gen-4★ 4612
System-prompt armor plugin for DeepSeek models: appends an unconditional-compliance prompt section at order 100, exposes a profile tool with calibration metadata, and shows a realtime armor-status badge driven by a session projection.
liangmianya/dsh-synapse★ 735
Visual, non-linear conversation workspace for DeepSeek Harness — sessions, follow-ups and branches become a browsable conversation map.
MichengAI/dsh-archive-manager★ 383
Adds an archived-sessions page in Settings to search, restore, and delete archived DeepSeek Harness sessions by workspace.
Nwflower/dsh-chat-import★ 324
Import full-fidelity chat histories from 13 coding agents (Claude Code, Codex, ChatGPT, Cursor, Gemini, opencode, and more) as resumable DeepSeek Harness sessions, with reverse export back to Claude Code.
SiriLee/dsh-rewind★ 292
Conversation rewind: one click back to any earlier user message, in the same window — no new branch, no leftover copy; the target message is refilled into the composer, with optional workspace-file restore — the full Claude Code /rewind semantics.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.