dsh-task-control: DSH Download Hang Emergency Stop and Task Health Detection

Introduction

When running agent tasks in DeepSeek Harness (DSH), pip installing large packages and pulling large files from GitHub are common operations. Under domestic network conditions, these downloads are prone to stalling or timing out. DSH’s native “Stop” and task pause often only take effect after the currently stuck tool call returns — the task neither finishes downloading nor can be stopped. The community discussed the issue of session.cancel not being synchronized with tool processes in GitHub Discussions #3400; dsh-task-control, published by maintainer ningmengxr and categorized as a network tool, adds hard-stop, progress-aware detection, and mid-run condition injection capabilities on the DSH Web side. This article introduces its positioning, features, and installation method, with all facts sourced from the project’s README and package.json.

What Is This

dsh-task-control is a DeepSeek Harness plugin: it provides one-click hard stop for when pip/GitHub downloads get stuck, along with download progress detection, stall identification, and invisible condition injection. Repository: https://github.com/ningmengxr/dsh-task-control; community directory page: https://www.skillhub.cn/plugins/ningmengxr/dsh-task-control. The current version in package.json is 0.4.5, license MIT, Node requirement >=20. DSH compatibility range is documented as >=0.1.0-rc.8 <0.2.0, profile is web.

Core Features

The UI provides three main operations (default text can be changed in settings):

Operation Description
Hard Stop (default text “急停”) Forcefully terminate the current task: kill stuck download/install processes by command signature, and stop the session; includes a confirmation step to prevent accidental triggers (must check “understand progress will be lost” to confirm)
Detect (default text “拍一下deepseek”) Check task status: error / suspected stall / running / healthy
Append Condition (default text “追加条件”) Add supplementary conditions during execution: first abort → pop up input dialog → invisible re-run with conditions

The following sections explain the behaviors emphasized in the README.

Hard Stop for Stuck Downloads

When large package downloads like pip install torch, large GitHub files, or curl downloads get stuck, the native stop button may not respond because it waits for the stuck tool’s return value. Clicking “Hard Stop” makes the host find and kill related processes by command signature, stopping the task immediately so you can switch sources or retry. Before hard stopping, a warning is shown that incomplete downloads will be lost, and confirmation is required via a checkbox.

Detection Logic During Downloads

When a download/install command is detected, the plugin checks the actual status first rather than uniformly reporting “suspected stall”:

  • curl-type (with output file): shows real progress percentage, e.g., downloading a zip file with progress displayed.
  • pip-type (no output file): indicates downloading, progress cannot be calculated, and does not show misleading fake progress.
  • Download process has exited: indicates download was abnormally interrupted, and can be forcefully killed within the detection dialog.

Stall Identification

When a non-download tool call does not return for more than 10 minutes, the detection will indicate “suspected stall: tool X has been running for N min N sec”; the dialog allows directly forceful termination (killing the process). The README notes that session.cancel has limited capability in such cases.

Invisible Condition Injection

The “Append Condition” recovery/condition message is injected into the session via the host channel as a plugin-originated message: the model executes normally, and the chat interface only shows a low-key context hint line, without “continue” or “supplementary condition…” user bubbles.

Host Routing

The host semi-mounts three routes (loopback host validation): /dsh-task-control/resume, /dsh-task-control/kill, /dsh-task-control/download-status; the browser side calls them via same-origin fetch. The client bundle is loaded according to the window.__ModuleLoader__ contract.

Installation and Enablement

The installation described in the materials is not a dsh plugin add github:... type command, but rather placing the plugin package in the profile’s node_modules and registering it in the cordis patch. Steps as follows.

  1. Place the plugin package in DSH profile’s node_modules (lib/ already contains build artifacts lib/index.js, lib/client.js):
    - Copy to ~/.dsh/profiles/node_modules/dsh-task-control/, or
    - Create a junction link to this directory (commonly used for local development).

  2. Insert the following into ~/.dsh/profiles/web/cordis.patch.yml:

- insert:
    - id: task-control
      name: 'dsh-task-control'
  1. Restart DSH web and hard refresh the page (Ctrl+Shift+R).

To rebuild from source, use:

node build.mjs

This generates lib/index.js (host side) and lib/client.js (client bundle).

Typical Usage

After installing and refreshing the Web interface, task control related buttons will appear in DSH Web’s slot area (specific location depends on the current DSH client UI).

  1. Download stuck: Click “Hard Stop” → read the warning and check to confirm → confirm termination; then switch sources or re-initiate the installation.
  2. Unsure if running: Click “Detect” → use the dialog to distinguish between normal, error, downloading (with progress or pip waiting hint), suspected stall; if necessary, forcefully kill within the dialog.
  3. Need to change constraints mid-task: Click “Append Condition” → enter supplementary instructions → continue via the plugin’s designed invisible re-run flow, without cluttering the interface with user bubbles.

Customize button and detection output text: Settings → General Settings → Task Control, with 6 items total (hard stop/detect/append condition button text, and detection output templates for no-issue, error {error}, and running). Text settings are stored in browser localStorage.

Use Cases and Caveats

For whom: Developers who frequently use agents in DSH Web to perform pip, GitHub, curl and other network install/download operations, and have encountered “can’t stop” issues or difficulty determining whether something is truly stalled or just downloading a large package.

Capability boundaries (README / SECURITY summary):

  • This plugin is a high-capability plugin (command execution, file read/write, network requests). Please read the repository’s SECURITY.md, source code, and license before installing.
  • Hard stop/forceful termination: uses taskkill on Windows, kill on POSIX, targeting only running and command-line-matched calls; if no match is found, only a session cancel is sent, without blindly killing processes.
  • File read/write: only reads download output file size/time to calculate progress; writes are limited to the plugin’s own directory and browser local settings.
  • Network: host routes are loopback only; auto-update queries the npm registry; materials state no telemetry, no data reporting, no credential usage.
  • Hard stop terminates the current task; incomplete downloads need to be restarted.
  • Depends on host webServer / agents; when unavailable, condition injection degrades to “visible message” recovery, and README states this does not affect DSH itself.
  • Auto-update replaces the plugin’s own lib/ (effective on next startup); junction/symlink development installations skip auto-update.

The DSH ecosystem emphasizes “everything is a plugin”; community directories like SkillHub are independent sites with no official affiliation with DeepSeek/High-Flyer. This article does not replace official documentation; please refer to the repository’s latest README for usage.

Related Resources

Plugin directory page: https://www.skillhub.cn/plugins/ningmengxr/dsh-task-control
GitHub repository: https://github.com/ningmengxr/dsh-task-control

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye