syncended/deepseek-harness-retry ↗★ 0
@syncended/dsh-retry
Configurable automatic retries and interrupted-session recovery for DeepSeek Harness
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:syncended/deepseek-harness-retry说明文档
阅读完整 README ↗Configuration
The defaults apply immediately after installation. To customize them, edit the existing model-error-retry row in $DSH_HOME/profiles/ /cordis.patch.yml; do not add a duplicate row with the same id.
- id: model-error-retry
config:
maxRetries: 3
overloadMaxRetries: 5
retryableCodes:
- PI_AI_ERROR
- UNKNOWN
- STREAM_CLOSED
- EMPTY_RESPONSE
- RATE_LIMIT
- SERVER
- TIMEOUT
- TRANSPORT
initialDelayMs: 750
overloadInitialDelayMs: 2000
maxDelayMs: 15000
jitterRatio: 0.15
respectRetryAfter: true
resumeInterrupted: true
resumeDisposed: false
resumeMaxAgeMs: 86400000
resumePrompt: >-
DeepSeek Harness stopped before the previous task produced a complete final
assistant response, or before a scheduled retry started. Continue the unfinished
work from the durable session history. Re-check the current workspace and
external state before acting. Do not blindly repeat tool calls that may have side
effects; verify their outcome first.
providers:
- openai
- openrouter
excludeProviders: []
Restart the Host after changing this file.
| Option | Default | Description |
|---|---|---|
maxRetries | 2 | Retries after an ordinary original failure. 0 disables request-error retries but not resumeInterrupted. |
overloadMaxRetries | 5 | Retries for PI_AI_ERROR with an explicit overload message. |
retryableCodes | see below | Exact provider-neutral codes. * matches any request error. |
initialDelayMs | 500 | Initial ordinary exponential-backoff delay. |
overloadInitialDelayMs | 2000 | Initial explicit-overload delay. |
maxDelayMs | 10000 | Maximum local delay. A larger Retry-After leaves the failure terminal. |
jitterRatio | 0.1 | Symmetric jitter ratio from 0 to 1. |
providers | [] | Exact provider-route allowlist; empty allows all routes. |
excludeProviders | [] | Exact provider-route denylist; takes precedence over the allowlist. |
respectRetryAfter | true | Honor provider Retry-After when it does not exceed maxDelayMs. |
resumeInterrupted | true | On cold resume, continue an unmatched plugin retry, a model step with no assistant message, or a durably closed tool boundary before its next model step. |
resumeDisposed | false | Also accept aborted/disposed as an unfinished retry. Disabled because HMR and intentional teardown can produce this reason. |
resumeMaxAgeMs | 86400000 | Oldest pending retry eligible for automatic continuation; 24 hours by default. |
resumePrompt | built in | Model-visible safety instruction for a confirmed interrupted continuation. |
Default fallback retry codes:
STREAM_CLOSED, MALFORMED_RESPONSE, PI_AI_ERROR, API_ERROR, MODEL_ERROR,
INTERNAL_ERROR, PROVIDER_ERROR, UNKNOWN
Permanent failures such as AUTH, INVALID_REQUEST, MISSING_CREDENTIAL, UNKNOWN_MODEL, and context overflow are not retried by default. Add an exact code or * only after considering cost and repeated side effects.
Validation rules
- Retry counts must be non-negative safe integers.
initialDelayMsandoverloadInitialDelayMsmust not exceedmaxDelayMs.jitterRatiomust be between0and1.retryableCodescannot be empty while request-error retries are enabled.resumePromptcannot be empty when interrupted-session recovery is enabled.- Provider filters compare exact route strings; they are not regular expressions or prefixes.