Back to home@mill413

dsh-session-resume

Continue interrupted DeepSeek Harness tasks with one click.

Stars
0
Language
TypeScript
Created
Sep 6, 2026
Updated
Sep 6, 2026
GitHub repo

Introduction

dsh-session-resume

An interrupted task, one Continue button.

A DeepSeek Harness plugin that adds a Continue button above the message input when a task was interrupted by a process exit. Reopen the session and choose when to pick up the work—no need to type a continuation prompt.

中文说明

What to expect

  1. DSH exits during a task, for example after a crash, OOM kill, or mid-task restart.
  2. Restart DSH and open the original session. Once the host repairs its log, an interruption notice appears above the input.
  3. Click Continue. The plugin sends continuation guidance ahead of messages already waiting in the queue.
  4. The notice disappears when a new turn starts.

The interface follows DSH's Chinese or English language setting. Nothing resumes automatically, and there are no configuration options.

Install

Declared compatibility: DSH 0.1.2-alpha.5. Other versions need separate verification.

The plugin has a host package and a Web UI package. Install both into the same profile, using the DSH CLI for that installation. These examples use web.

From a local checkout

Build the plugin as described under Development, then install using actual absolute paths:

dsh plugin --profile web add /path/to/dsh-session-resume/packages/session-resume
dsh plugin --profile web add /path/to/dsh-session-resume/packages/ui-session-resume

From npm

After the first release is published, install matching versions of both packages:

dsh plugin --profile web add @mill413/dsh-session-resume@0.1.1
dsh plugin --profile web add @mill413/dsh-client-ui-session-resume@0.1.1

After installation, restart the DSH Web process and refresh the page. Do not edit the profile's cordis.patch.yml manually; the install commands apply the packages' own bundle declarations.

Scope and safety

  • Only turns marked interrupted by the host are eligible. Manual cancellation, token limits, ordinary errors, and blocked states do not show the button.
  • This is not checkpoint recovery. It asks the model to continue using the existing conversation. It does not restore process memory or guarantee exact replay from the interruption point.
  • The plugin does not retry tools itself. Its guidance tells the model to retry only read-only or idempotent operations directly, check external state before other retries, and avoid repeating completed steps. This is model guidance, not a transaction rollback or an exactly-once guarantee.
  • It does not replace goal recovery. A session with queued background work but no interrupted turn is outside its detection scope.

No Continue button?

Check that both packages are installed in the active profile, then restart Web and refresh the page. The button appears only after the host loads the session and identifies an interrupted turn awaiting continuation. No button on a completed or manually cancelled session is expected.

If clicking returns an error, check whether the session is loaded or a new turn has already started elsewhere. The host rechecks the session before sending the continuation.

Development

No Harness source checkout is required. Development dependencies come from npm, with the DSH SDK pinned to 0.1.2-alpha.5. Only the local Typert protocol source needed by the generator remains in this repository. Installation, development, and CI do not modify or deploy Harness itself.

Use Node.js 24 to match CI, and pnpm 11.3.0 as declared in packageManager. Run from the plugin repository root:

npm install --global pnpm@11.3.0  # skip if this version is already installed
pnpm install --frozen-lockfile
node --test scripts/release.test.mjs
npm test
npm run build
node scripts/pack-release.mjs

The final command validates the package contents and writes two tarballs to dist/; it does not publish them.

When changing dependencies, run pnpm install and commit the updated pnpm-lock.yaml. CI uses the frozen lockfile to prevent implicit dependency changes.

DirectoryResponsibility
packages/session-resumeInterruption projection, resume action, model-facing guidance
packages/ui-session-resumeContinue button and Chinese/English UI copy
packages/typert-protocolTypert protocol source required by the build
buildClient bundling configuration

Implementation in brief

The sessionResume projection records the interrupted turn from a turn/end event with reason.kind === 'interrupted', then clears it on the next turn/start.

On click, the host rechecks the log, prepends safety guidance to next-turn, and sends a short continuation lead through agent.steer() to wake the agent. Both messages are plugin-origin notice messages, visible to the model and recorded in the session log—not disguised manual input.

License

MIT. Extracted Harness build support is attributed in third-party notices.