deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
PROJECT README
Safe model-request retry for DeepSeek Harness with exponential backoff, relay/proxy failure recovery, and a unified settings panel.
Version: 2.0.0
dsh-reconnect is a Host-side plugin for DeepSeek Harness (DSH). It retries failed model requests so temporary network failures do not interrupt an agent turn or a long-running task.
The plugin listens to the DSH agent/request-error waterfall event. After the built-in normal Provider retry policy gives up, or when a Provider's always policy delegates recovery downstream, the Agent loop sends the same request again according to this plugin's policy.
| Condition | Behavior |
|---|---|
EMPTY_RESPONSE / RATE_LIMIT / SERVER / STREAM_CLOSED / TIMEOUT / TRANSPORT |
Retry indefinitely (transient connection/service failures) |
Model missing or not configured (MODEL_NOT_FOUND, MODEL_NOT_CONFIGURED, or matching Provider text) |
Retry indefinitely while waiting for model/account configuration to recover |
QUOTA (insufficient balance or exhausted quota) |
Do not retry by default; retried when retryQuota: true |
Unknown errors such as PI_AI_ERROR |
Retry indefinitely by default; disable retryUnknown to apply the configurable consecutive-failure cap |
| Tool/argument/unknown-tool/auth/credential/context-overflow/aborted | Never retried; step ends immediately |
Key design points:
tool/result) are outside this plugin's retry boundary. Error routing uses the machine code from agent/request-error, rather than guessing from message text; an unknown machine code uses the configured unknown-error path (bounded only when retryUnknown is disabled).retryQuota and retryUnknown control this plugin's fallback chain. The Host always policy delegates recovery to downstream waterfall listeners, so this plugin handles the recoverable failure categories once and does not create a second parallel retry loop.1s -> 2s -> 4s -> ..., capped at 60s by default (the settings panel offers 1/2/5/10/30/60/120 seconds or a custom value; maxDelayMs overrides in milliseconds)providerRetryAfterMs when available. It is a provider minimum wait and is not capped by the local exponential-backoff limit; only the Node timer maximum applies.llm/retry events so the Harness conversation UI shows the continuous retry count and countdownOpen Settings → Plugin configuration. ReConnect is shown as a plugin card in that page:
Changes take effect immediately without restarting DSH.
The plugin accepts optional values in its Cordis row config:
maxDelayMs (integer milliseconds, default 60000): caps the local exponential-backoff delay; for example 15000 produces 1s -> 2s -> 4s -> 8s -> 15s -> 15s... indefinitely. A positive Provider Retry-After remains authoritative.retryQuota (boolean, default false): whether QUOTA errors are also retried.retryUnknown (boolean, default true): whether unknown errors are retried indefinitely.unknownMaxRetries (integer, default 3): bounded cap for consecutive unknown failures in the same model step; missing or unconfigured model errors do not use this cap.The settings service persists the plugin card values. Restore defaults removes the user overrides and immediately returns to the schema/Cordis defaults; a restart is not required.
The plugin's own retry policy is the downstream recovery for both Provider normal and always policies. The two layers do not multiply retries: normal schedules only its configured codes before this plugin, while always delegates the decision downstream.
maxDelayMs caps the local exponential wait, not a Provider Retry-After value and not the total retry duration.
- insert:
- id: reconnect
name: dsh-reconnect
config:
maxDelayMs: 15000
retryQuota: false
retryUnknown: true
Invalid or missing maxDelayMs values fall back to 60000.
The package is platform-independent. Choose one of the following methods.
dsh-reconnect-main directory as the plugin package.Windows PowerShell:
git clone https://github.com/MistRain-1/dsh-reconnect.git "$HOME\dsh-reconnect"
macOS:
git clone https://github.com/MistRain-1/dsh-reconnect.git "$HOME/dsh-reconnect"
Linux:
git clone https://github.com/MistRain-1/dsh-reconnect.git "$HOME/dsh-reconnect"
Windows PowerShell:
Invoke-WebRequest -Uri https://github.com/MistRain-1/dsh-reconnect/archive/refs/heads/main.zip -OutFile dsh-reconnect.zip
Expand-Archive -Path dsh-reconnect.zip -DestinationPath .
macOS:
curl -L https://github.com/MistRain-1/dsh-reconnect/archive/refs/heads/main.zip -o dsh-reconnect.zip
unzip dsh-reconnect.zip
Linux:
wget https://github.com/MistRain-1/dsh-reconnect/archive/refs/heads/main.zip -O dsh-reconnect.zip
unzip dsh-reconnect.zip
After downloading, register the package in the DSH Cordis composition:
- insert:
- id: reconnect
name: dsh-reconnect
A DSH restart is required after installing the persistent plugin package.
agent/request-error waterfall event and the Host settings serviceMIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。