Cooperative timeout guard for ask_user_question: lost or unanswered questions resolve as a structured ASK_TIMEOUT instead of hanging the turn forever.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:Q1hangL/dsh-ask-guard
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
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 official
dsh-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 broadcasts
question/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 via
exec.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
Links
More in this category
Tencent/WeKnora#dsh-weknora★ 31002
Four read-only tools over a WeKnora knowledge base: list knowledge bases, hybrid passage search, reassemble one document's chunks in order, and WeKnora's own cited RAG or ReAct-agent answer with a resumable session id.
superdesigndev/treg★ 3752
Tool catalog for agents: search ~2,600 external endpoints (SEO and SERP, backlinks, social, people and company enrichment, ad libraries, scraping) by the task you want done, read each one's parameters and per-call price, then call it with the credential injected server-side. Ships the skill plus an MCP row that stays disabled until TREG_TOKEN is set.
TencentCloudBase/CloudBase-AI-Toolkit#dsh-plugin★ 1127
Tencent CloudBase backend for DeepSeek Harness — scaffold and deploy full-stack apps from chat, render query results as table cards with paging, sorting and CSV export, preview a deployment on its domain, and call the CloudBase MCP toolset (`mcp__cloudbase__*`) with device-code login.
gitroomhq/postiz-agent#dsh-postiz★ 498
Connects DeepSeek Harness to Postiz over MCP: list connected social media channels, fetch per-platform posting rules, and schedule, draft, or publish posts to X, LinkedIn, Instagram, Facebook, Threads, TikTok, YouTube, Reddit, Bluesky, Mastodon, Discord, Slack, Telegram and more; adds a postiz workflow skill.
EthanYoQ/Invoice-Downloader#dsh-invoice-downloader★ 465
Local IMAP invoice download, OCR, archive, and Excel reimbursement summaries for DeepSeek Harness.
anysearch-team/anysearch-dsh★ 432
AnySearch-powered real-time web and vertical search provider for DeepSeek Harness.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.