插件目录 / Developer / dsh-ask-guard
dsh-ask-guard
未验证 Q1hangL
功能简介
Timeout guard for ask_user_question in DeepSeek Harness: a lost or unanswered question resolves as ASK_TIMEOUT instead of hanging the turn forever
未验证 — 尚未实测
Timeout guard for ask_user_question in DeepSeek Harness: a lost or unanswered question resolves as ASK_TIMEOUT instead of hanging the turn forever 尚未验证——请自行安装测试。
「未验证」表示我们的自动化 CI 尚未安装过该插件。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。
README
dsh-ask-guard
Timeout guard for ask_user_question in DeepSeek Harness: a lost or
unanswered question resolves as a structured ASK_TIMEOUT instead of hanging
the turn forever.
The problem
The question card is delivered to the browser over a single push on the mux
WebSocket. When the page is backgrounded, the laptop sleeps, or the connection
dies half-open, the frame is lost, the client never notices (no heartbeat), and
the tool waits forever — observed hangs of 6+ hours, recoverable only by
pressing Stop. Upstream report:
deepseek-ai/deepseek-harness#1554.
What this plugin does
It registers a tools/execute wrapper that arms a cooperative deadline on
every ask_user_question dispatch (the same mechanism as the officialdsh-tool-call-timeout-policy, which only enforces budgets declared by tool
plugins — ask_user_question declares none).
- When the deadline wins, the waiting provider's abort handler fires: the web
provider broadcastsquestion/resolved cancelled, so the stuck composer
(if any) is cleaned up. - The wrapper then replaces the normalized abort with a structured error result
(code: ASK_TIMEOUT,name: AskTimeoutError) with a model-facing message, so
the agent can end the turn gracefully instead of blocking. - All other tools pass through untouched.
The timeout is cooperative (@deepseek-ai/dsh-timeout notifies viaexec.signal; the web user-questions provider honors the signal, so it
terminates for real).
Install
dsh plugin --profile web add dsh-ask-guard
Restart dsh web. The plugin is a dsh.bundle package, so its patch row is
added to the profile composition automatically on reconcile.
Install from a git checkout instead:
dsh plugin --profile web add github:Q1hangL/dsh-ask-guard
Config
| Field | Default | Meaning |
|---|---|---|
timeoutMs |
300000 |
Deadline for one ask_user_question call (ms). |
Tune it in the profile's cordis.patch.yml:
- id: ask-guard
config:
timeoutMs: 600000
Recovery note
A page refresh (F5) re-syncs pending questions — the host replays unanswered
questions to a reconnecting client. With this plugin, even without a refresh
the turn no longer hangs forever.
Test
npm install
node --test
License
MIT
安装
装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:
dsh plugin add dshbase-catalog 然后对 agent 说「帮我装 dsh-ask-guard」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。
该插件是 GitHub 源码(未发 npm)——直接从仓库装:
Web profile:
dsh plugin --profile web add github:Q1hangL/dsh-ask-guard Headless(CLI)profile:
dsh plugin --profile headless add github:Q1hangL/dsh-ask-guard 实测报告
尚未 L3 验证——若已跑过,见下方失败备注。