DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Wait Subagent — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins
W

dsh-wait-subagent

Wait Subagent

DeepSeek Harness 中用于主动等待后台可继续子代理:注册 wait_subagent 工具,阻塞至指定子代理完成,然后返回其停止原因和收尾消息——弥合 run_in_background 即时返回与异步完成通知之间的空缺。dsh-wait-subagent

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:john-walks-slow/dsh-wait-subagent#ee1ab1981f83db0da88404ef472e438a1fa4dd8f
README兼容性版本

说明

DeepSeek Harness 中用于主动等待后台可继续子代理:注册 wait_subagent 工具,阻塞至指定子代理完成,然后返回其停止原因和收尾消息——弥合 run_in_background 即时返回与异步完成通知之间的空缺。dsh-wait-subagent:为 DeepSeek Harness 提供后台可继续子代理的主动等待——注册 wait_subagent 工具,阻塞至指定子代理完成,返回停止原因和收尾消息,弥合后台子代理只能被动等待通知的空缺。

兼容性与来源证明

Wait Subagent 以 dsh-wait-subagent 发布,当前版本为 1.0.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
github
Registry 更新时间
2026/9/19

版本

1.0.0stable
2026/9/19

相关插件

正在加载相关插件…

最新版
1.0.0
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
any
许可证
MIT
发布源
github
GitHub
★ 0
周下载
0
最近提交
2026/9/19
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 agents-orchestration 分类下经过校验的插件。

Headless@deepseek-ai/dsh-headlessdsh one-shot bundle:基于 dsh-base 的直接核心 Agent/Session 运行器,不包含 Host、HTTP 或浏览器层Experimental Agent Team Web Profile@deepseek-ai/dsh-experimental-agent-team-web-profile用于 Agent Teams Remote 和 UI 插件的实验性 Web 配置层Subagent Codex@deepseek-ai/dsh-subagent-codex基于官方 app-server 协议的一次性 Codex 子代理提供程序Subagent Claude Code@deepseek-ai/dsh-subagent-claude-code基于官方 Agent SDK 的一次性 Claude Code 子代理提供方

README

dsh-wait-subagent

English · 简体中文

A DeepSeek Harness (cordis) plugin that registers a wait_subagent tool: block until a background continuable subagent settles, then get its stop reason and closing message in the same call.

It fills a real gap in the subagent workflow: run_in_background returns a subagentId immediately, but the only way to learn the outcome is an async settlement notice — there was no tool to actively wait for it.

Real output

Start a subagent in the background, then wait for it:

wait_subagent({ subagent_id: "session-9f2c47ab-83d1-4e06-b5a9-1c7f2d84e0b3" })

The call blocks while the subagent runs. When it settles, the tool returns:

{
  "status": "settled",
  "subagent_id": "session-9f2c47ab-83d1-4e06-b5a9-1c7f2d84e0b3",
  "stop_reason": "completed",
  "closing_message": "Spec written to docs/plan.md; 3 files changed, ready for review."
}

The text the model sees:

Subagent session-9f2c47ab-83d1-4e06-b5a9-1c7f2d84e0b3 settled: completed
Spec written to docs/plan.md; 3 files changed, ready for review.

Other outcomes:

SituationResult
Subagent already settled before the call{ "status": "settled", "subagent_id": "…", "stop_reason": "unknown" } — "had already settled before this call; its closing message was delivered separately as a settlement notice."
timeout_ms elapsed{ "status": "timeout", "subagent_id": "…" } — "Timed out waiting for subagent …; it may still be running."
Caller's AbortSignal fired{ "status": "cancelled", "subagent_id": "…" }
Unknown / foreign subagent idRejected with an error: "… is not one of your subagents — pass the id a background dispatch returned (see list_agents)"

Why

What the subagent system gives you today:

  • subagent with run_in_background: true → returns a subagentId at once; work continues asynchronously and a settlement notice arrives later.
  • subagent with run_in_background: false → blocks at start time only.
  • send_message → fire-and-return, never waits for the answer.
  • list_agents → a snapshot, not a wait (and explicitly "not to poll").

What's missing: after starting a subagent in the background, there is no tool to block and wait for it to finish. That is exactly what wait_subagent does — use it when your next action depends on the subagent's result, instead of guessing or polling.

How it works

  • Registers the wait_subagent tool on every root agent (same pattern as dsh-proactive).
  • Membership gate: ctx.subagents.listChildren(parent.id) — the same projection list_agents reads — covers live AND storage-only children, so unknown ids are rejected with an error instead of being misreported as settled. A known child absent from the live registry has already settled.
  • The tool listens for the subagent/end lifecycle event — which fires when a child's activation is disposed — scoped through the plugin context (an ancestor of all agent contexts).
  • Settlement removes the child from the live registry and dispatches subagent/end in the same synchronous block (finishDisposal), so attaching the listener first and then re-checking the registry is race-free.
  • Optional timeout_ms parameter returns status: "timeout" if the subagent does not settle in time. Omit to wait indefinitely — usually the best choice; if set, use a generous value rather than polling with repeated short waits.
  • Respects the caller's AbortSignal (returns status: "cancelled").

Tool schema

wait_subagent(subagent_id: string, timeout_ms?: integer)
→ { status: "settled" | "timeout" | "cancelled",
    subagent_id: string,
    stop_reason?: "completed" | "aborted" | "error" | "max-tokens" | "refusal" | "unknown",
    closing_message?: string }

Caveat: don't wait and interrupt in the same step

wait_subagent is concurrency-safe, but interrupt_agent is not — it needs the tool lane exclusively and queues behind any in-flight call. Issuing wait_subagent and interrupt_agent in one parallel step serializes them: the wait runs to its timeout first, and only then does the interrupt land. Call interrupt_agent first, then wait_subagent in the next step (an already-interrupted child settles quickly).

Install

dsh plugin --profile web add dsh-wait-subagent

Or straight from GitHub (source install — plain ESM JavaScript, no build step, so pnpm ≥ 10 build-script approval is not needed):

dsh plugin --profile web add github:john-walks-slow/dsh-wait-subagent

Restart your DSH instance after installing; the bundled cordis.patch.yml registers the loader entry automatically.

Permissions & compatibility

  • What it touches: registers exactly one model-facing Agent tool (wait_subagent) on every root agent. No web client, no UI changes, no configuration.
  • Blocking semantics: while waiting, the call holds the calling agent's tool lane until the subagent settles, the optional timeout elapses, or the caller aborts — that is the feature. The wait itself is event-driven (subagent/end lifecycle event), not polling; CPU cost while blocked is negligible. An omit-timeout_ms wait is unbounded by design; set a generous timeout_ms when you need a bound.
  • No side effects: no network requests, no external services, no filesystem writes.
  • Dependencies: @deepseek-ai/dsh-tools 0.1.2-rc.1 (aligned with the dsh 0.1.2-rc.1 locked version), Node ≥ 22.5.

Local development

npm install

That's it — lib/ is plain ESM JavaScript; there is no build step and no test suite.

Release a new version

npm run release        # bumps the patch version and packs /tmp/dsh-wait-subagent-<newver>.tgz

Then publish the tarball to npm and push the version commit and tag:

git push --follow-tags

Verify with npm view dsh-wait-subagent version.

License

MIT