Skip to content
Back to search

dsh-auto-continue

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 UI | DSH 前端 UI 插件:非人为中断后自动发送「继续」,支持错误分类、自适应退避、暂停、幂等/循环保护、续跑模板与统计,均可在设置界面配置

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/HsiangNianian/dsh-auto-continue with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/HsiangNianian/dsh-auto-continue'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/hsiangnianian--dsh-auto-continue/badge.svg)](/listings/hsiangnianian--dsh-auto-continue)

HTML

<a href="/listings/hsiangnianian--dsh-auto-continue"><img src="/api/listings/hsiangnianian--dsh-auto-continue/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

DSH plugins install into a **profile** (`dsh web` → `web` profile). The commands below install into the web profile; restart `dsh web` after installation. In the desktop app, install through its **Plugins** page instead.

Compatibility

| DSH runtime | Plugin version | Configuration entry point | | --- | --- | --- | | **0.2.1-alpha.1** | **0.14.2 verified** | **Plugins → dsh-client-auto-continue** | | **0.2.0-rc.1** | **0.12.1 or newer** | **Plugins → dsh-client-auto-continue** | | **0.1.7-rc.2** | **0.11.9 or newer** | Same Plugins page | | Older hosts with the legacy settings API | Legacy UI retained | **Settings → Plugins → Plugin configuration** |

DSH 0.1.0-rc.6 and earlier are unsupported. Automated settings and compatibility checks cover **0.1.7-rc.2**, **0.2.0-rc.1** and **0.2.1-alpha.1**; startup failure isolation is also checked against **0.2.0-rc.2** and **0.2.1-alpha.1**. Desktop app versions and embedded DSH runtime versions are different; use the runtime version when checking compatibility. For the CLI, run `dsh --version`; see [official DSH releases](https://github.com/deepseek-ai/deepseek-harness/releases) for available versions.

**Plugins 0.11.9 and 0.12.0 are rejected by DSH 0.2.0-rc.1’s version check.** Upgrade the plugin to 0.12.1 or newer; its existing configuration-form integration works on this runtime. See [#50](https://github.com/HsiangNianian/dsh-auto-continue/issues/50).

On current DSH, **Settings → Built-in plugins** is a component inventory, not the configuration editor. Use the main **Plugins** page. The screenshots below show plugin **0.14.0** on **DSH 0.2.1-alpha.1**. If you previously installed with a symlink or hand-written loader entry, see [Migrating an older installation](#migrating-an-older-installation).

From npm (recommended)

Published as [`dsh-client-auto-continue`](https://www.npmjs.com/package/dsh-client-auto-continue):

dsh plugin --profile web add dsh-client-auto-continue@latest
dsh web

Updating an installed plugin

Let active work finish and stop DSH. Run the npm command above again to replace the installed version with `@latest`, then restart DSH and reload the browser. Existing configuration overrides remain in the profile. For a desktop installation, update the plugin from that app’s **Plugins** page and restart the app; updating the CLI’s `web` profile does not update the desktop profile.

Directly from GitHub (no clone needed)

Installs straight from the repository's default branch — built artifacts are committed, so no local clone or build step:

dsh plugin --profile web add github:HsiangNianian/dsh-auto-continue
dsh web

> This tracks the `main` branch rather than released tags — great for trying the latest changes, while the npm method above is the stable choice. Switching between install sources is just re-running `dsh plugin --profile web add <other-spec>`; the profile dependency is replaced in place.

From this repository

Use Node.js 22, the version used by CI.

git clone https://github.com/HsiangNianian/dsh-auto-continue.git
cd dsh-auto-continue
npm ci
npm run build

# the package carries its own cordis.patch.yml (dsh.bundle.patch),
# so the plugin row registers itself
dsh plugin --profile web add "link:$(pwd)"

dsh web

Migrating an older installation

A manual loader entry can start the engine without registering a bundle in the **Plugins** page. Use the profile's package manager to install the bundle; a symlink and `insert` entry alone are no longer the recommended setup.

1. Let active work finish, then stop `dsh web`. Back up `package.json`, `cordis.patch.yml` and `pnpm-lock.yaml` in `~/.dsh/profiles/web/`, plus `~/.dsh/settings.yaml` if it exists. If you set `DSH_HOME`, use that directory instead of `~/.dsh`.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 382 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. <p align="center">
  2. <picture>
  3. <source media="(prefers-color-scheme: dark)" srcset="docs/banner-dark.svg">
  4. <img src="docs/banner.svg" alt="dsh-auto-continue" width="720">
  5. </picture>
  6. </p>
  7. <p align="center">
  8. A <a href="https://github.com/deepseek-ai/deepseek-harness">DeepSeek Harness</a> plugin that resumes interrupted sessions for you, with an optional autonomous loop.
  9. </p>
  10. <p align="center">
  11. <a href="https://www.npmjs.com/package/dsh-client-auto-continue"><img src="https://img.shields.io/npm/v/dsh-client-auto-continue?logo=npm&label=npm" alt="npm version"></a>
  12. <a href="https://www.npmjs.com/package/dsh-client-auto-continue"><img src="https://img.shields.io/npm/dm/dsh-client-auto-continue?label=downloads" alt="npm downloads"></a>
  13. <a href="https://github.com/HsiangNianian/dsh-auto-continue/stargazers"><img src="https://img.shields.io/github/stars/HsiangNianian/dsh-auto-continue?logo=github&label=Stars" alt="GitHub stars"></a>
  14. <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-65a30d" alt="MIT license"></a>
  15. <a href="https://awesome-dsh-plugin.com"><img src="https://awesome-dsh-plugin.com/badge.svg" alt="awesome · DSH plugin"></a>
  16. <a href="https://www.dsh.so/artifact/dsh-auto-continue/"><img src="https://www.dsh.so/badge/install/dsh-auto-continue.svg" alt="dsh.so install"></a>
  17. </p>
  18. <p align="center">
  19. <b>English</b> · <a href="README.zh.md">中文</a> · <a href="README.ru.md">Русский</a> · <a href="CHANGELOG.md">Changelog</a>
  20. </p>
  21. ## Contents
  22. - [What it does](#what-it-does)
  23. - [Install](#install)
  24. - [Usage](#usage)
  25. - [Configuration](#configuration)
  26. - [How it works](#how-it-works)
  27. - [Troubleshooting](#troubleshooting)
  28. - [Privacy and permissions](#privacy-and-permissions)
  29. - [Development](#development)
  30. - [Links](#links)
  31. - [License](#license)
  32. ## What it does
  33. When a turn fails with a recoverable error, hits the output limit, ends without visible output, or is cut off by a host restart, the plugin waits a few seconds and sends a continue message for you. It runs inside the DSH host, so it keeps working after you close the browser tab, and all tabs share one engine.
  34. <p align="center">
  35. <picture>
  36. <source media="(prefers-reduced-motion: reduce)" srcset="docs/demo-static.svg">
  37. <img src="docs/demo.svg" alt="Recovery demo: a network error interrupts the assistant, the plugin waits 3 seconds, sends Continue, and the assistant resumes." width="720">
  38. </picture>
  39. </p>
  40. - **Error recovery.** Network errors, timeouts, 5xx and 429 are retried with a grace period, a cooldown that grows after each failure, and a cap on consecutive attempts. Permanent errors (auth, balance, unknown model, context too long) are skipped.
  41. - **Offline hold.** Network failures wait for the connection to come back instead of burning retries.
  42. - **Startup recovery.** After a host restart, sessions interrupted in the last 15 minutes are resumed, including ones you have not reopened.
  43. - **Per-session modes.** A switch next to the message box sets each conversation to Follow default, Off, Recovery only or Autonomous loop.
  44. - **Autonomous loop (opt-in).** Keep a session going after normal completions, with an optional round limit.
  45. - **Safety.** An idempotency guard tells the model whether the last tool call finished, and a loop guard stops turns that repeat themselves.
  46. - **Visibility.** A settings page with today's statistics, recent recovery attempts and paused sessions, plus optional browser notifications with **Resume now** and **Pause this session 1h** buttons.
  47. ## Install
  48. DSH plugins install into a profile; `dsh web` uses the `web` profile. In the desktop app, install from its **Plugins** page instead of the CLI.
  49. ### From npm (recommended)
  50. ```bash
  51. dsh plugin --profile web add dsh-client-auto-continue@latest
  52. dsh web
  53. ```
  54. Restart DSH and reload the browser after installing. Then open **Plugins → dsh-client-auto-continue** from the main sidebar to check that it is **Running**.
  55. To update, let running work finish, stop DSH, run the same command again, then restart DSH and reload the browser. Your settings stay in the profile. The desktop app has its own profile: update it from the app's **Plugins** page.
  56. ### Compatibility
  57. | DSH runtime | Plugin version | Settings location |
  58. | --- | --- | --- |
  59. | 0.2.2-rc.1, 0.2.1-rc.2, 0.2.1-alpha.1 | 0.20.1 verified | **Plugins → dsh-client-auto-continue** |
  60. | 0.2.0-rc.1 | 0.12.1 or newer | **Plugins → dsh-client-auto-continue** |
  61. | 0.1.7-rc.2 | 0.11.9 or newer | **Plugins → dsh-client-auto-continue** |
  62. | Older hosts with the legacy settings API | legacy UI | **Settings → Plugins → Plugin configuration** |
  63. DSH 0.1.0-rc.6 and earlier are not supported. Plugin 0.11.9 and 0.12.0 are rejected by DSH 0.2.0-rc.1's version check ([#50](https://github.com/HsiangNianian/dsh-auto-continue/issues/50)). The desktop app's version is not the DSH runtime version; check the runtime (`dsh --version` for the CLI).
  64. <details>
  65. <summary>Install from GitHub (tracks <code>main</code>)</summary>
  66. Built files are committed, so no clone or build is needed:
  67. ```bash
  68. dsh plugin --profile web add github:HsiangNianian/dsh-auto-continue
  69. dsh web
  70. ```
  71. This follows the `main` branch rather than releases. To switch install sources, run `dsh plugin --profile web add <other-spec>`; the profile dependency is replaced in place.
  72. </details>
  73. <details>
  74. <summary>Install from a local checkout</summary>
  75. Use Node.js 22.
  76. ```bash
  77. git clone https://github.com/HsiangNianian/dsh-auto-continue.git
  78. cd dsh-auto-continue
  79. npm ci
  80. npm run build
  81. dsh plugin --profile web add "link:$(pwd)"
  82. dsh web
  83. ```
  84. The package ships its own `cordis.patch.yml` (`dsh.bundle.patch`), so the plugin registers itself. After editing the code, run `npm run build`, restart DSH and reload the browser.
  85. </details>
  86. <details>
  87. <summary>Migrating an older manual installation</summary>
  88. Older setups used a symlink plus a hand-written `insert` row in the loader config. That can start the engine without showing the plugin on the **Plugins** page.
  89. 1. Let running work finish and stop `dsh web`. Back up `package.json`, `cordis.patch.yml` and `pnpm-lock.yaml` in `~/.dsh/profiles/web/`, and `~/.dsh/settings.yaml` if it exists (use `$DSH_HOME` instead of `~/.dsh` if you set it).
  90. 2. In `cordis.patch.yml`, remove only the hand-written `auto-continue` row inside an `insert` list (and the list if it becomes empty). Keep a top-level `- id: auto-continue` entry with `config:`; that is your settings.
  91. 3. Install with the npm or GitHub command above. The profile's `package.json` should now list `dsh-client-auto-continue` under `dsh.profile.bundles`.
  92. 4. If you had settings in the old `settings.yaml` `auto-continue` section, merge them into the profile's `cordis.patch.yml` entry:
  93. ```yaml
  94. - id: auto-continue
  95. config:
  96. cooldownMs: 45000 # your own saved value
  97. ```
  98. 5. Start `dsh web`, reload the browser, open **Plugins → dsh-client-auto-continue** and check your values.
  99. On hosts that offer both profile config and the legacy settings API ([#64](https://github.com/HsiangNianian/dsh-auto-continue/issues/64)), the plugin imports the `auto-continue` section of `$DSH_HOME/settings-legacy.yaml` once per profile. Values already in the profile win, and the old file is left untouched. Recovery waits until the import is done; if the import fails, the host logs an error and recovery stays held until you fix the file or permissions and restart.
  100. The `include:auto-continue` label under **Built-in plugins** is the normal loader prefix, not a sign of a duplicate install.
  101. </details>
  102. <details>
  103. <summary>Verify and uninstall</summary>
  104. ```bash
  105. # the composed config should contain exactly one auto-continue entry
  106. dsh --profile web --dump-config | grep -A 4 'id: auto-continue'
  107. # uninstall
  108. dsh plugin --profile web remove dsh-client-auto-continue
  109. ```
  110. Also remove the `- id: auto-continue` entry from the profile's `cordis.patch.yml`, if there is one, then restart DSH.
  111. </details>
  112. ## Usage
  113. Recovery is on by default. Nothing else needs to be set up.
  114. ### Session modes
  115. The **Auto-continue** switch next to the message box applies to the current conversation only. The menu beside it picks a mode:
  116. | Mode | What happens |
  117. | --- | --- |
  118. | Follow default | Uses **Default session mode** from the settings (Recovery only unless you change it) |
  119. | Off | No automatic messages and no loop-guard interruptions in this conversation |
  120. | Recovery only | Recovers errors, output limits, silent turns and restart interruptions; leaves normal completions alone |
  121. | Autonomous loop | Also continues after every normal completion, using the loop text |
  122. Turning the switch off selects Off; turning it on again selects Follow default. Choices are saved on the host right away (`sessionModes`), sync across tabs and survive restarts. Switching a conversation to Off cancels anything waiting to be sent but lets a running turn finish.
  123. <p align="center">
  124. <img src="docs/screenshots/08-composer-toggle.png" alt="Auto-continue switch and mode menu next to the message box" width="560">
  125. </p>
  126. In a narrow window the label and menu collapse to an icon. DS-Bot and dsh-pocket get the same compact layout up to 640 CSS pixels. To hide the controls, turn off **Show auto-continue switch in the composer** in **General** and save; this does not change any session's mode.
  127. ### Pausing and manual control
  128. - **Enable auto-continue globally** (in **General**) is the master switch. Turning it off stops all automatic messages without forgetting per-session choices. The loop guard keeps running; turn off **Loop guard** too if you want no interruptions at all.
  129. - **Pause this session 1h** (notification button) suspends one conversation for an hour.
  130. - **Resume now** (notification button) sends one continue message immediately. It ignores cooldown, the consecutive limit and any pause, but does not lift the pause.
  131. - Sending a message yourself, or a new turn starting, cancels any continue message that is still waiting.
  132. ### Status and logs
  133. The **Status and logs** category shows today's counts (continue messages, recoveries, failures, skipped errors, give-ups, loop breaks, by error code, with a reset button), the last 20 recovery attempts grouped by session, and the sessions that are currently paused. These live in host memory and reset when the plugin restarts. With **Verbose logs** on, every decision is logged with an `[auto-continue]` prefix in the DSH log (the terminal running `dsh web` for the CLI).
  134. ## Configuration
  135. Open **Plugins → dsh-client-auto-continue** from the main sidebar and pick a category. (**Settings → Built-in plugins** only lists component status; it is not the editor.) Edits are staged and take effect when you click **Save**; switching categories keeps your drafts, invalid values block the save, and **Reset to default** removes an override.
  136. ![Plugin settings, General category](docs/screenshots/01-settings-section.png)
  137. Settings are stored in the `auto-continue` entry of the active profile patch, `~/.dsh/profiles/web/cordis.patch.yml` for the default web profile (older hosts: `~/.dsh/settings.yaml`, under `auto-continue:`). You can edit the file directly; omitted keys use their defaults:
  138. ```yaml
  139. - id: auto-continue
  140. config:
  141. cooldownMs: 45000
  142. resumeCompletedTurns: true
  143. loopMaxIterations: 20
  144. ```
  145. Times are in milliseconds. Text fields left empty use the built-in text in the current language.
  146. ### General
  147. | Setting | Key | Default | Notes |
  148. | --- | --- | --- | --- |
  149. | Enable auto-continue globally | `paused` | `false` | Stored inverted: `paused: true` stops all automatic messages and cancels queued ones |
  150. | Show auto-continue switch in the composer | `showComposerToggle` | `true` | Only hides or shows the controls |
  151. | Send continue messages with plugin source | `usePluginSource` | `false` | Off sends as the `user` source; on marks messages as `plugin:dsh-client-auto-continue` |
  152. | Resume silent turns | `resumeSilentTurns` | `true` | Resume turns that had model activity but no visible output; they still count toward **Max consecutive** |
  153. | Resume subagent sessions | `resumeSubagentSessions` | `false` | Resume a failed, cut-off or silent subagent, using its main conversation's mode. When DSH already disposed the child, the engine cold-resumes it from its persisted session through the host subagent service; if the host cannot resume it, the failure is handed to the main conversation instead |
  154. | Default session mode | `resumeCompletedTurns` | `false` | `false` = Recovery only, `true` = Autonomous loop, for sessions on Follow default |
  155. | Autonomous loop round limit | `loopMaxIterations` | `0` | Loop rounds per session, `0` = no limit. Resets when you send a message or turn the loop back on |
  156. | Browser notifications | `notify` | `false` | Notifications for sends, skips, give-ups and saved settings. The browser asks for permission the first time |
  157. ### Retry strategy
  158. | Setting | Key | Default | Notes |
  159. | --- | --- | --- | --- |
  160. | Grace period (ms) | `graceMs` | `3000` | Wait before sending; a new turn or your own message cancels it |
  161. | Cooldown (ms) | `cooldownMs` | `20000` | Minimum gap between recovery attempts in one session. A failure during cooldown waits for the rest of it |
  162. | Max consecutive | `maxConsecutive` | `3` | Attempts before giving up. Resets when you send a message or a turn ends with visible output. Loop continuations after normal completions do not count |
  163. | Classify errors | `classify` | `true` | Retry transient errors only; skip permanent ones. Off = retry every error |
  164. | Custom retryable errors | `retryableErrorPatterns` | `''` | One literal per line, case-insensitive, matched against code, HTTP status and message. Overrides the built-in classifier |
  165. | Backoff factor | `backoffFactor` | `2` | Cooldown multiplier per consecutive failure (20 s → 40 s → 80 s) |
  166. | Max backoff (ms) | `backoffMaxMs` | `300000` | Upper bound for the cooldown |
  167. | Pause while offline | `pauseWhenOffline` | `true` | Hold network-error retries while the host is offline, without using up attempts |
  168. | Offline re-check interval (ms) | `offlineCheckMs` | `15000` | How often a held retry checks the network. Minimum 1000 |
  169. | Re-arm goals disarmed by a restart | `resumeGoals` | `false` | After a continue message, re-arm an `active` goal the restart disarmed. This acts on your behalf, hence off |
  170. | Resume paused goals | `resumePausedGoals` | `false` | Also resume goals you paused by hand. Needs `resumeGoals` |
  171. ### Startup recovery
  172. | Setting | Key | Default | Notes |
  173. | --- | --- | --- | --- |
  174. | Scan on host startup | `scanOnBoot` | `true` | Look for interrupted sessions, open or stored, after the host starts |
  175. | Wake child sessions after restart | `resumeInterruptedChildren` | `false` | Send each root session one message listing its interrupted subagent or team-member sessions |
  176. | Scan limit | `scanLimit` | `8` | Recoveries per scan pass, most recently active first |
  177. | Scan window (ms) | `freshMs` | `900000` | Only interruptions newer than this are recovered; scanning also stops after this long |
  178. ### Continue text
  179. | Setting | Key | Used when |
  180. | --- | --- | --- |
  181. | Continue text | `continueText` | A turn failed with an error |
  182. | Continue text (max tokens) | `continueTextMaxTokens` | The output token limit was reached |
  183. | Continue text (silent turn) | `continueTextSilent` | A turn ended with reasoning only |
  184. | Continue text (after harness restart) | `continueTextInterrupted` | The startup scan resumes a turn a restart cut off |
  185. | Continue text (autonomous loop) | `continueTextLoop` | Each autonomous-loop round |
  186. | Guard text (unconfirmed result) | `guardPendingText` | Appended when the last tool call may not have finished |
  187. | Guard text (tool succeeded) | `guardDoneText` | Appended when the last tool call succeeded |
  188. | Loop text | `loopText` | The loop guard restarted a turn |
  189. All default to `''`, which means the built-in text. Continue texts accept `{code}`, `{message}`, `{status}`, `{tool}`, `{turn}`, `{errorCount}` and `{elapsed}`; for example `Continue ({tool}: {code})` becomes `Continue (git push: UPSTREAM)`. Guard texts and the loop text accept `{tool}`, and `guardDoneText` also `{result}` (a short excerpt of the tool output).
  190. Built-in texts exist in English, Chinese and Russian. They follow the DSH language: `zh` and `zh-*` use Chinese, `ru` and `ru-*` use Russian, every other locale uses English. Your own non-empty text is never replaced when the language changes.
  191. <details>
  192. <summary>Built-in English texts</summary>
  193. | Key | Text |
  194. | --- | --- |
  195. | `continueText`, `continueTextMaxTokens`, `continueTextLoop` | `Continue` |
  196. | `continueTextSilent` | `Continue. Your previous turn ended with internal reasoning only, with no message and no tool call, so nothing reached the user. Always finish a turn with a tool call or a visible answer.` |
  197. | `continueTextInterrupted` | `Continue. The harness was restarted while your previous turn was still running; tool calls pending at the restart are recorded with unknown outcomes. Resume where you left off, verifying external state before retrying anything that may have side effects.` |
  198. | `guardPendingText` | `(The previous tool "{tool}" may not have completed. Check its state before continuing and do not run it again.)` |
  199. | `guardDoneText` | `(The previous tool "{tool}" completed successfully. Result: {result}; do not run it again. Continue from there.)` |
  200. | `loopText` | `(You may be stuck in a loop. Stop repeating the last action and continue with a different approach.)` |
  201. </details>
  202. ### Safety
  203. | Setting | Key | Default | Notes |
  204. | --- | --- | --- | --- |
  205. | Idempotency guard | `guardTools` | `true` | Before resuming, tell the model whether the last tool call finished so it does not run it twice |
  206. | Loop guard | `loopGuard` | `true` | Cancel a running turn that repeats itself and restart it with the loop text |
  207. | Short-sentence max (chars) | `loopShortChars` | `40` | Messages shorter than this count as short sentences |
  208. | Short-sentence window (ms) | `loopWindowMs` | `30000` | Window for counting short sentences. Minimum 1000 |
  209. | Short-sentence threshold | `loopShortCount` | `12` | Short sentences in the window, with no tool call, that trip the guard |
  210. | Identical message count | `loopRepeatText` | `4` | Identical messages in a row (or repeated paragraphs within one streamed message) that trip the guard |
  211. | Same-tool repeat count | `loopToolRepeat` | `5` | Calls of the same tool with identical arguments and results that trip the guard |
  212. ### Status and logs
  213. | Setting | Key | Default | Notes |
  214. | --- | --- | --- | --- |
  215. | Verbose logs | `verbose` | `true` | Log decisions with the `[auto-continue]` prefix |
  216. Two keys are written by the plugin itself: `locale` (mirrors the DSH language, default `en`) and `sessionModes` (per-session choices from the composer, default `{}`). You normally do not edit them.
  217. ### Error classification
  218. With **Classify errors** on, network errors, timeouts, HTTP 5xx and 429 are retried. HTTP 401 and 403, and codes or messages about auth, credentials or API keys, balance or quota, unknown models, or context length are treated as permanent and skipped (with a notification if enabled). `MALFORMED_RESPONSE` is always retryable unless it carries an explicit 401 or 403.
  219. If a provider returns an error that you know is safe to retry (check first that typing "continue" by hand works), add a narrow, stable fragment instead of turning classification off:
  220. ```yaml
  221. - id: auto-continue
  222. config:
  223. retryableErrorPatterns: |-
  224. Upstream rejected the request as invalid
  225. ```
  226. Patterns are plain substrings, not regular expressions. Cooldown and **Max consecutive** still apply.
  227. ## How it works
  228. [![Auto-continue decision flow](docs/auto-continue-workflow.en.svg)](docs/auto-continue-workflow.en.html)
  229. 1. **Triggers.** The engine listens to session events in the host. A `turn/end` with `error`, `max-tokens`, a silent ending, or `completed` (loop mode only) starts the flow. After a host restart, the startup scan checks open and stored sessions every 3 seconds until the scan window ends. The loop guard watches running turns and cancels one that repeats itself.
  230. 2. **Session check.** Nothing is sent while auto-continue is paused globally, the session is Off or paused for an hour, or the session is a subagent and **Resume subagent sessions** is off. A subagent follows its main conversation's mode unless it has its own, and never runs the autonomous loop or the loop guard.
  231. 3. **End reason.** Manual Stop and policy blocks (`blocked`) are left alone, and so are permanent errors. Everything else recoverable goes to recovery. A normal completion only continues in Autonomous loop mode, which skips the cooldown and the consecutive limit but respects `loopMaxIterations`.
  232. 4. **Retry budget.** Recovery stops at **Max consecutive**. Inside the cooldown, the send is deferred rather than dropped. The cooldown is multiplied by the backoff factor after each failure, up to the maximum.
  233. 5. **Grace period.** The engine waits `graceMs`. A new turn or a message from you cancels the send.
  234. 6. **Offline hold.** For network errors, the host checks for a non-loopback network interface and one resolvable public name. While offline it waits and re-checks every `offlineCheckMs`, then goes through grace and cooldown again. With `HTTP(S)_PROXY` or `ALL_PROXY` set, only interfaces are checked.
  235. 7. **Send.** The engine picks the text for the reason, appends the idempotency-guard note, and sends it with `agent.followup` using the session's preset and model. If user turns are already queued, the continue message is moved ahead of them while their order is kept. With `resumeGoals` on, a goal the restart disarmed is re-armed.
  236. **Child sessions.** Outside of **Resume subagent sessions**, subagent and team-member sessions are never resumed directly. With the setting on, a failed child is recovered in two steps: the engine first asks the host to cold-resume the disposed child from its persisted session, delivering the continuation to the child itself, so the main conversation is not woken; when the host cannot resume it (no persistence, no live parent, or a child that is not continuable), the failure is handed to the main conversation as one message, at most once per five minutes. That hand-off stays silent while the main conversation is recovering itself, because any user message cancels its queued continuation. If the main conversation has no live agent at that moment, the hand-off is kept until it is live again. A manual **Resume now** also cold-resumes a disposed child. After a restart, with **Wake child sessions after restart** on, the startup scan collects children a restart interrupted (at most 8 child logs per pass) and sends their root session one message listing them, once per batch. The root decides whether to continue or wrap up. A root still mid-turn is left to normal recovery, and a root you stopped yourself is never woken.
  237. **Unreadable sessions.** If a session's history cannot be read during the startup scan, that session is skipped and an error is logged; other sessions still recover ([#58](https://github.com/HsiangNianian/dsh-auto-continue/issues/58)). Repair it and restart DSH within the scan window to try again.
  238. **Cold-read budget.** A stored session is judged by its whole log, so the sweep decodes one full history per session. To keep a large profile from exhausting the host heap, one host instance reads at most 32 stored logs, most recently active first. The order comes from the projection checkpoint cache (`timeContext.lastMessageTime`, then `sessionListMetadata.lastPromptAt`), falling back to the session creation time. Each session counts once, even if its read is retried. The order is the same on every start, so sessions past the budget are skipped rather than queued; they are the least recently active ones, and the freshness window (15 minutes by default) has almost always passed for them. A checkpoint can lag behind a log but never lead it, so it only orders the reads: freshness is still decided by the events at the tail of the log.
  239. ## Troubleshooting
  240. | Symptom | What to check |
  241. | --- | --- |
  242. | "Skipping profile bundle" or "incompatible with dsh 0.2.0-rc.1" | Update to plugin 0.12.1 or newer in the profile the app actually uses, then restart |
  243. | Plugin enabled, but no settings fields | Open the main **Plugins** page, not **Settings → Built-in plugins**, and select **General** |
  244. | `/api/auto-continue-bridge` returns 404 | The host component did not load. Check the DSH startup log and `--dump-config`, then reload the page |
  245. | An error was not resumed | Check the global switch and the session mode. Look for `[auto-continue]` log lines: they say whether the error was classified as permanent, the session hit **Max consecutive**, or the retry is held offline |
  246. | Sessions not resumed after a restart | **Scan on host startup** must be on, and the interruption must be newer than the scan window (15 minutes by default) |
  247. | Settings are ignored after migrating | Make sure there is one top-level `- id: auto-continue` entry in `cordis.patch.yml` and no leftover `insert` row; see the migration notes under [Install](#install) |
  248. | Compact composer layout missing on a phone | Restart DSH and reload the remote page after updating the plugin |
  249. ## Privacy and permissions
  250. - The engine runs in the DSH host and reads session events and history through DSH services. No third-party service is contacted and no credentials are stored.
  251. - Continue messages go through `agent.followup`; the loop guard may call `agent.cancel` first. A resumed agent keeps the session's existing tools and permissions.
  252. - The offline check reads the local network interfaces and does a DNS lookup of `api.deepseek.com`, `www.baidu.com` and `one.one.one.one`. It opens no connection and sends no request.
  253. - Settings are saved through DSH's settings API to the active profile (or `~/.dsh/settings.yaml` on older hosts). Retry counters, cooldowns, one-hour pauses and statistics are kept in memory only.
  254. - Browser notifications are opt-in. Permission is requested only when you turn them on and save.
  255. ## Development
  256. Use Node.js 22.
  257. ```bash
  258. npm ci
  259. npm run typecheck
  260. npm run build
  261. npm test
  262. ```
  263. `npm run test:runtime` runs the settings, startup-recovery and restart tests against published DSH packages. Install the pinned fixtures first:
  264. ```bash
  265. for v in 0.1.7 0.2.0 0.2.0-rc.2 0.2.1 0.2.1-rc.2; do npm ci --prefix "tests/fixtures/dsh-$v"; done
  266. npm run test:runtime
  267. ```
  268. The runtime tests drive real DSH services with a deterministic model adapter; they make no requests to a model provider. CI also checks that the committed `lib/` matches a fresh build and runs [dsh-plugin-check](https://github.com/omdsh-dev/dsh-plugin-check).
  269. The banners and social preview are generated by `npm run docs:assets`; the workflow map is an [Archify](https://github.com/tt-a1i/archify) export (`docs/auto-continue-workflow.*`, sources in `*.archify.json`) (render the PNG with `rsvg-convert -w 1280 -h 640 docs/social-preview.svg -o docs/social-preview.png`). See [docs/screenshots/README.md](docs/screenshots/README.md) for how the screenshots are captured.
  270. ## Links
  271. - Repository: [github.com/HsiangNianian/dsh-auto-continue](https://github.com/HsiangNianian/dsh-auto-continue)
  272. - npm: [dsh-client-auto-continue](https://www.npmjs.com/package/dsh-client-auto-continue)
  273. - DeepSeek Harness: [github.com/deepseek-ai/deepseek-harness](https://github.com/deepseek-ai/deepseek-harness)
  274. - dsh-plugin-check: [github.com/omdsh-dev/dsh-plugin-check](https://github.com/omdsh-dev/dsh-plugin-check)
  275. - LINUX DO: [linux.do](https://linux.do)
  276. [![GitStock chart for HsiangNianian/dsh-auto-continue](https://gitstock.org/HsiangNianian/dsh-auto-continue/stock.svg)](https://gitstock.org/HsiangNianian/dsh-auto-continue)
  277. ## License
  278. [MIT](LICENSE) © Hsiang Nianian

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.