Preface¶
When running long tasks with dsh web, network jitter, upstream timeouts, or hitting output token limits can cause the current turn to suddenly stop. The common practice is to watch the interface, wait for an error to appear, then manually input “continue” and click send. With many tasks, this chain is prone to breaking due to human reaction delays.
This article introduces dsh-auto-continue (npm package name dsh-client-auto-continue). It monitors session events within the DSH Web UI; when a turn ends due to non-human reasons, it automatically follows the same agent.followup queue as the “send” button, using your configured text to resume interrupted tasks. Since version 0.8.0, the engine runs within the host process as a single-instance daemon, enabling scan-and-resume even when all browser tabs are closed, and preventing duplicate sends across multiple tabs.
What Is This¶
dsh-auto-continue is a Web UI plugin for DeepSeek Harness (DSH), maintained by HsiangNianian, and categorized as “Workflow” in the SkillHub community directory. The GitHub repository has about 37 stars and 2 forks, with the current release version 0.8.1 under the MIT license.
It addresses a straightforward core problem: automating the recovery chain of “detect interruption → wait grace period → send continue,” with configurable strategies for error classification, backoff, idempotency, and loop detection to avoid blind retries or duplicate tool executions.
Core Features¶
What Interruptions Are Monitored¶
The plugin subscribes to the session event stream within the host process and reacts to the following scenarios:
| Event | Meaning |
|---|---|
turn/end → error |
Turn failure (model/network/timeout etc.) |
turn/end → interrupted |
Interrupted turn left after host crash and restart (recovered by startup scan) |
turn/end → max-tokens |
Output token limit reached |
host/agent-error |
Agent failure without a turn position (only network/timeout messages auto-continue) |
The following situations will not automatically continue: user-initiated stops (aborted), policy blocks (blocked), sessions already running or with queued messages, sub-agent sessions, and sessions in cooldown or at consecutive attempt limits. The interrupted status in the real-time stream also does not trigger auto-continue; orphaned turns are handled by the host’s startup scan.
Intelligent Recovery Strategies¶
All the above capabilities can be toggled or tuned in the settings card:
- Error Classification — Temporary errors (network, timeout, 5xx, 429, etc.) auto-continue; permanent errors (401/403, or keywords like authentication, API key, balance/quota, model not found, context limit exceeded) are skipped and notified. Disabling classification auto-continues all errors.
- Adaptive Backoff — Wait times increase on consecutive failures (cooldown × factor, default 20s → 40s → 80s…), with a maximum to avoid persistent retries on failing upstreams.
- Templated Continue Text —
continueTextsupports placeholders:{code},{message},{status},{tool},{turn},{errorCount},{sessionTitle},{elapsed}; a separatecontinueTextMaxTokenstemplate can be used formax-tokensscenarios. - Idempotency Guard — Before continuing, it checks the last tool call: if unconfirmed, it prompts to verify status and avoid duplicate execution; if confirmed successful, it explains the result and avoids rerunning; if the tool failed, no guard is applied.
- Loop Guard — Monitors running turns: cancels the current turn and restarts with configurable text if identical messages repeat consecutively, many short sentences without tool calls occur within a short time, or the same tool is repeatedly called with identical parameters and results.
- Pause and Notifications — Global “Pause Auto-Continue” immediately stops real-time and scanning; notifications include buttons for “Continue Now” (ignores cooldown, limits, and pause) and “Pause This Session for 1 Hour.”
- Statistics Panel — Displays counts for today’s auto-continues, successful recoveries, post-continue failures, permanent skips, limit stops, loop interruptions, etc., grouped by error code, with an option to reset to zero.
Workflow¶
After detecting an interruption, the engine waits for a grace period (default 3 seconds). If the host starts a new turn (turn/start) during this period, auto-continue is canceled; otherwise, it sends the configured text via agent.followup, equivalent to manually clicking send.
On host startup or reconnection, it also scans active sessions: if the last turn ended within the scan time window (default 15 minutes) for non-human reasons and no new turn or user message followed, it will be auto-continued. For example, if the host crashed while the browser was closed, the engine can resume the session after the agent-loop recovers it.
Installation and Enabling¶
DSH plugins are installed into profiles (the dsh web command corresponds to the web profile). Requires DSH ≥ 0.1.0-rc.7; versions rc.6 and earlier will fail to load due to incompatible settings.plugin.item slots—upgrade DSH first.
Recommended installation from npm:
dsh plugin --profile web add dsh-client-auto-continue
dsh web
Alternatively, install directly from the GitHub default branch (tracks main, suitable for trying out; for stability, npm is preferred):
dsh plugin --profile web add github:HsiangNianian/dsh-auto-continue
dsh web
After installation, restart dsh web. Verify the configuration is mounted:
dsh --profile web --dump-config | grep auto-continue
The browser console should show the log [auto-continue] Started; each detection of an interruption and auto-send will also log.
Uninstall:
dsh plugin --profile web remove dsh-client-auto-continue
dsh web
Typical Usage¶
Graphical Interface Configuration¶
Open Settings → Plugins, find the dsh-client-auto-continue configuration card. Changes are staged; clicking “Save” writes to the auto-continue section of ~/.dsh/settings.yaml, and the host monitors file changes to apply them immediately.
The default continue text is “continue,” which works out-of-the-box for most scenarios. If you want the resume message to carry failure context, modify continueText, for example:
continue ({tool}: {code})
For the output token limit scenario, you can separately configure continueTextMaxTokens, for example:
continue output, do not repeat already generated content
Direct Configuration File Editing¶
You can also skip the GUI and edit ~/.dsh/settings.yaml directly:
auto-continue:
paused: false
continueText: 'continue'
continueTextMaxTokens: 'continue'
guardTools: true
graceMs: 3000
cooldownMs: 20000
maxConsecutive: 3
scanOnBoot: true
freshMs: 900000
classify: true
backoffFactor: 2
backoffMaxMs: 300000
loopGuard: true
notify: false
Common tuning directions: increasing cooldownMs and maxConsecutive reduces frequent auto-continues; enabling notify pops up browser notifications on auto-continue, abandonment, or permanent errors (permission is requested on first use).
Applicable Scenarios and Notes¶
Who It’s For: Developers who frequently use dsh web to run Agent tasks for extended periods and often encounter network or upstream temporary failures. It also reduces manual monitoring for max-tokens truncations and interrupted turns left after host crashes.
Please Note Before Use:
- The plugin engine runs within the DSH host process; automatically sent
sessions.prompthas the same permissions as manually clicking send. Before installation, review the source code and understand the MIT license—it will send messages on your behalf using the current DSH process permissions. - Error classification blocks permanent failures like authentication and balance issues, but disabling it auto-continues on all errors; idempotency guards and loop guards are recommended to stay enabled, especially with tools like
git pushthat may partially succeed. - When global or session-level pause is active, only the “Continue Now” button in notifications will send once as an exception; turns requiring manual intervention are better handled with pause than repeated auto-continue.
- SkillHub (skillhub.cn) is a DSH plugin community directory, not officially affiliated with DeepSeek or High-Flyer; DSH itself follows an “everything is a plugin” extension philosophy, and this plugin is a community-maintained workflow extension.
Links¶
- SkillHub Directory Page: skillhub.cn/plugins/HsiangNianian/dsh-auto-continue
- GitHub Repository: github.com/HsiangNianian/dsh-auto-continue
- npm Package: dsh-client-auto-continue
After following these steps, interruption recovery transforms from “watching the interface and manually continuing” into a configurable, trackable, and pausable automated process. For scenarios relying on dsh web for long-running tasks, it can significantly reduce unproductive waiting time.