DeepSHPlugins
dsh-ask-guard 项目预览
GITHUB / COMMUNITY PROJECT

dsh-ask-guard

Tools & IntegrationsJavaScriptMIT

Cooperative timeout guard for ask_user_question: lost or unanswered questions resolve as a structured ASK_TIMEOUT instead of hanging the turn forever.

3 StarsQ1hangL Updated 2026-08-14
Open GitHub repository
dsh-ask-guard 项目预览

About this project

Chinese

Cooperative timeout guard for ask_user_question: lost or unanswered questions resolve as a structured ASK_TIMEOUT instead of hanging the turn forever.

English

Cooperative timeout guard for ask_user_question: lost or unanswered questions resolve as a structured ASK_TIMEOUT instead of hanging the turn forever.

Project details & listing signals

Snapshot 2026-09-11
Creator / organization
Q1hangL
Repository
Q1hangL/dsh-ask-guard
GitHub Stars
3
Forks
1
Programming language
JavaScript
License
MIT
Last push
2026-08-14
Manifest
Declaration found in the catalog

A public repository does not automatically permit commercial use. Check the project's license and compatibility. Manifests and catalog scores are not security certifications.

Catalog score

61/ 100
Maintenance activity
81
Documentation & practical information
85
Community interest
25
Installation signals
100
Project declarations
100

README 含完整安装与使用说明;关注度尚低(3);标准命令一键安装。

Scores use five dimensions of the catalog snapshot. They are browsing aids, not hands-on reviews or security assessments.

Install & use

The respective GitHub repositories define project information and licensing.

dsh plugin --profile web add github:Q1hangL/dsh-ask-guard

Copying a command does not execute it. Read the repository documentation and check requirements and licensing first.

Project screenshots

Repository README

GitHub 原文

Saved repository documentation. Its capture date was not recorded and it may differ from the catalog description. Check the current repository before installing.

Repository documentation is preserved in its original language.

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 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

FieldDefaultMeaning
timeoutMs300000Deadline 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

Before you begin

Check the current repository for installation, compatible versions and licensing. Stars and catalog scores are snapshot-based browsing signals.

Installation & troubleshooting · 项目问题反馈

Related projects