dsh-resume-turn
Manifest validDSH Checkpoint and Resume Plugin: If a model response fails mid-stream due to network interruptions or timeouts, the plugin automatically carries the partially generated output into the next round, allowing the model to resume from the point of interruption rather than rerunning the entire generation from scratch.
dsh-resume-turn
DSH plugin: resume an interrupted reply from its partial output instead of restarting from scratch.
简体中文 · Repository · Issues · MIT
When a model request fails mid-stream on a slow / flaky endpoint (e.g. the AMD
DeepSeek endpoint — slow inference, frequent disconnects, TIMEOUT /
TRANSPORT / SERVER / RATE_LIMIT), the default dsh-llm-retry rebuilds
the same request and re-runs it from zero: everything that had already
streamed (including a long thinking chain) is thrown away, and a multi-minute
attempt can be repeated several times before giving up.
dsh-resume-turn changes that: at the failure point it collects the partial
output that already streamed (visible text + reasoning chunks) from the
session event log, injects a visible "auto-resumed" steering message that
quotes that partial output and instructs the model to continue from where it
stopped, and takes over recovery with { kind: 'retry' } — so the next
request starts from the interruption point, not from zero.
How it works
agent/request-error (waterfall)
├─ user cancelled? → delegate (never auto-resume over a user stop)
├─ code not transient? → delegate
├─ no partial output? → delegate (nothing to resume; default retry is right)
├─ mid tool-call? → delegate (restart is safer for tool arguments)
├─ resume budget spent (default 3 / turn)? → delegate
└─ otherwise
├─ collect current-attempt chunks (assistant/chunk events after the
│ last attempt boundary) → partial text + reasoning
├─ cancellable backoff (2s, doubling, cap 30s)
├─ agent.steer(resume message) # visible "auto-resumed" row; carries
│ # the partial output + "continue" instruction
└─ return { kind: 'retry' } # retry rebuilds the request from the
# surface, which now includes the resume message
Install (one command)
# from GitHub
npx @deepseek-ai/dsh plugin --profile web add github:Harris-Logic/dsh-resume-turn
# or from a local checkout
npx @deepseek-ai/dsh plugin --profile web add /absolute/path/to/dsh-resume-turn
Restart the profile (or the web host) to activate. The package declares
dsh.bundle.patch, so the installer appends it to dsh.profile.bundles and its
cordis.patch.yml plugin row is applied automatically — no manual file
edits. @deepseek-ai/* modules come from the host (the very schemastery /
dsh-llm instances DSH itself runs on): they are declared as optional peers and
are never installed separately.
Config
The plugin has no required config. Optional keys (in the profile's
cordis.patch.yml row config, or as bundle config):
| key | default | meaning |
|---|---|---|
maxResumesPerTurn | 3 | max auto-resumes per turn; beyond that, default retry takes over |
resumeCodes | ["TIMEOUT","TRANSPORT","SERVER","RATE_LIMIT"] | failure codes eligible for resume |
initialDelayMs | 2000 | backoff before the first resume (doubles per attempt, cap 30s) |
maxPartialChars | 12000 | max characters of partial output quoted into the resume message |
Interaction with dsh-llm-retry
- On providers whose
retryPolicyismode: always(recommended for flaky endpoints; see the A1 config notes),llm-retryconsults downstream recovery first — this plugin gets the first refusal. Returning{ kind: 'retry' }short-circuits the chain; returningundefinedletsllm-retryschedule its own backoff. - On
mode: normalproviders this plugin is only consulted if it is ordered beforellm-retryin the waterfall; otherwise the default restart-based retry applies unchanged.
Limitations
- Resume quotes the partial output into context; the continued answer may rephrase a boundary sentence (mitigated by the "don't repeat" instruction).
- If the endpoint fails again right after a resume, attempts count against the per-turn budget; after the budget is spent the default retry takes over.
- A host restart resets in-memory resume budgets/boundaries (no custom session events are appended, so stored logs stay fully readable).
License
MIT
Comments
Loading…
Similar plugins
by zchuxi
DSH Web 插件:三段式回合恢复(同轮静默重试 / 输出超限同轮续写 / 可选新一轮继续),输入框为空时发送键变成「继续」。A three-tier recovery policy for broken turns for DSH.
★ 0
MIT
JavaScript
Oct 3, 2026
dsh plugin --profile web add dsh-restart-taskby Frog755
DSH client plugin: auto-sends 「继续」 when a turn is interrupted/errored/overlong. No model/provider switching. Ships with a settings card.
★ 3
↓ 155/wk
MIT
JavaScript
Sep 10, 2026
dsh plugin --profile web add @frog755/dsh-client-auto-retryby HsiangNianian
DSH Web UI plugin: auto-sends 「继续」 after non-human interruptions, with error classification, adaptive backoff, pause, idempotency/loop guards, resume templates, and stats—all configurable in settings
★ 175
MIT
JavaScript
Oct 27, 2026
dsh plugin --profile web add dsh-client-auto-continueby zxmqq1234
DeepSeek Harness(dsh)自动重试插件:报错自动重试、中断自动继续、挂起自动唤醒、 每一步右上角弹窗告诉你,不用再手动发"继续",数据看板还原每一次重试的真相。与 dsh系统重试互补而非替代——在内置重试耗尽或不覆盖的错误码上追加保障。
★ 13
MIT
TypeScript
Oct 15, 2026
dsh plugin --profile web add dsh-auto-retryby liuyun847
DSH 宿主插件:给模型一个 restart_dsh 工具,重启 dsh 后自动恢复原会话续跑 (DeepSeek Harness)
★ 0
MIT
JavaScript
Oct 19, 2026
dsh plugin --profile web add dsh-host-restartby webkubor
给 DSH 模型页补上官方适配器缺的那半:网关可达性探测、模型目录拉取、DeepSeek 余额常驻。零运行时依赖,不改动 DSH 安装。
★ 33
↓ 25/wk
MIT
JavaScript
Oct 18, 2026
dsh plugin --profile web add dsh-llm-hub