Introduction

DeepSeek Harness (DSH) adopts a plugin-based architecture, allowing users to extend its functionality. When using DSH for workflow orchestration, you often encounter network fluctuations, server-side errors, or interrupted model streaming outputs. The built-in retry mechanism is sometimes insufficient, or executes too quickly for users to notice, and disconnected turns often require manual intervention.

The dsh-auto-retry plugin is designed to solve these problems. It provides request-level supplementary retries, turn-level automatic continuation, and automatic wake-up for hung tasks. Through these mechanisms, the plugin automatically handles most exceptions in the background and visualizes the process, avoiding users sitting idle in front of the screen.

Core Capabilities

Request-Level Supplementary Retry

After DSH’s built-in retries are exhausted, the plugin performs additional retries for 8 trigger conditions. These 8 conditions include: rate limiting (429), server errors (5xx), response timeouts, empty responses, network transport errors, unknown errors, HTTP 4xx errors, and request interruptions. Users can check each item in settings and set the retry count (0~20 times).

Turn-Level Automatic Continuation

For turns that cannot be rescued by retries, the plugin waits for a delay (default 5 seconds) and then automatically sends a “continue” message as the user to restore the context. This includes continuing generation after truncated output, as well as stopping caused by unavailable models and other reasons. To avoid endless idle loops when the network is completely disconnected, the plugin includes a circuit breaker mechanism: once consecutive failures reach the threshold, automatic continuation pauses until the turn succeeds.

No-Response Watchdog

DSH’s streaming output has no default timeout protection. If the model produces no output for a long time (zero activity), the task can remain hung indefinitely. The plugin detects this situation through a “watchdog” mechanism: once no stream frame or event occurs within the configured duration (default 180 seconds), it actively cancels the current request and triggers automatic continuation.

Real-Time Status Display

To address the blind spot of “what is actually happening in the background,” the plugin adds a real-time countdown banner at the bottom of the interface, showing retry progress, trigger reasons, and remaining time. At the same time, lightweight status notifications appear in the upper-right corner, with each notification automatically disappearing after 4 seconds.

Data Dashboard

A collapsible data dashboard is provided at the bottom of the settings page. It records retry counts, the average number of retries required for success, error code distribution, model distribution, and daily trends. Data is persisted locally (~/.dsh/auto-retry-stats.), and the most recent 5000 records are retained after restart.

Built-in Policy Display and Input Optimization

The settings page directly displays the currently effective built-in retry policies for each Provider, helping users understand when the plugin performs supplementary retries. At the same time, for UI input fields, the plugin fixes the issue where numeric fields change while being typed, allowing free input and automatically validating and correcting after focus is lost.

Main Agent / Sub Agent Division of Responsibility

The plugin uses a divide-and-conquer strategy: the main agent handles retries and automatic continuation; sub-agents only handle request-level retries. When a sub-agent fails completely, the error is returned to the main agent, which decides whether to retry or continue, avoiding out-of-scope operations.

Installation and Activation

Enter the profile directory:

cd ~/.dsh/profiles/web

Use the plugin command to install:

dsh plugin add github:zxmqq1234/dsh-auto-retry

After installation, restart DSH Web. Enter the settings page, and you will see the “Automatic Retry” section.

Configuration and Settings

The settings page includes the following sections from top to bottom:

  1. Total Switch and Real-Time Notifications: Disable the plugin with one click, or only turn off popup notifications.
  2. Trigger Conditions: Check the 8 error types that should trigger supplementary retries, and set the retry count for each.
  3. Main Agent: Configure the automatic continuation delay, circuit breaker limit, continuation message, watchdog duration, and truncation continuation switch.
  4. Sub Agent: Enable supplementary retries only, and review the relevant instructions.
  5. Advanced: Select the interval strategy (exponential backoff or fixed interval) and parameters.
  6. Built-in Retry Policy: View the currently effective configuration.
  7. Data Dashboard: Click to expand the statistics panel.

The default configuration is the recommended value and usually does not require adjustment.

Notes

  • Recovery Scope: The plugin only recovers “watchdog cancellation” and “real errors.” Turns manually stopped by clicking stop will not automatically continue.
  • Supplemental, Not Replacement: The plugin respects DSH’s built-in retries and only acts when they are exhausted or not covered, avoiding double retries.
  • Data Storage: Statistics data is stored locally, with the file name ~/.dsh/auto-retry-stats..

Compatibility

This plugin is compatible with the following DSH versions:

  • dsh 0.1.7-alpha.1
  • dsh 0.1.7-alpha.2
  • dsh 0.2.0-rc.1
  • dsh 0.2.0-rc.2

Closing

dsh-auto-retry automates tedious manual intervention tasks, making it suitable for scenarios with unstable network conditions or long-running tasks. For more details and source code, please visit the GitHub repository.