Q1hangL/dsh-ask-guard
Cooperative timeout guard for ask_user_question: lost or unanswered questions resolve as a structured ASK_TIMEOUT instead of hanging the turn forever.
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 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 and the tool waits forever — observed hangs of 6+ hours, recoverable only by pressing Stop (upstream discussion deepseek-ai/deepseek-harness#1554). This plugin registers a tools/execute wrapper that arms a cooperative deadline on every ask_user_question dispatch; when the deadline wins, the provider's abort handler fires and the stuck composer is cleaned up, then the wrapper replaces the pending call with the ASK_TIMEOUT resolution.
Install
dsh plugin --profile web add github:Q1hangL/dsh-ask-guardGitHub install per README (English): dsh plugin --profile web add github:Q1hangL/dsh-ask-guard (the README's npm form dsh plugin --profile web add dsh-ask-guard is documented but the package is not yet on the public registry as of 2026-08-28 — use the github: path).
Compatibility
DeepSeek Harness web profile. Wraps ask_user_question via the tools/execute seam (same mechanism as the official dsh-tool-call-timeout-policy).
Details
- Repo: Q1hangL/dsh-ask-guard
- Category: Tools & Capabilities
- Stars: 3
- Version: GitHub source (npm package not published as of 2026-08-28)
- Last push: 2026-08-14
- First seen: 2026-08-14
Recent updates
ask_user_question timeout guard; ASK_TIMEOUT instead of 6h+ hangs; cooperative deadline via tools/execute wrapper.
FAQ
- What problem does it solve?
- A lost or unanswered ask_user_question could hang the turn for hours; the guard resolves it as a structured ASK_TIMEOUT.
- How does it work?
- It wraps every ask_user_question dispatch with a cooperative deadline (the same seam as the official tool-call-timeout-policy); on timeout the provider's abort handler cleans up the composer and the call resolves as ASK_TIMEOUT.
- Is it the same as the official timeout policy?
- Related but different — the official policy only enforces budgets declared by tool plugins; ask_user_question declares none, which is the gap this plugin closes.
Alternatives
PeterBon/dsh-hooks · jiesou/dsh-stream-rules · ang-XWBWZ/dsh-approval-ai