DSH Plugins Marketplace

DSH Plugins

Plugins

/

Sessions & Messages

/

dsh-boot-resume

d

dsh-boot-resume

Manifest valid

Reads stored sessions at host boot and resumes the one whose last turn a restart interrupted, sending a short follow-up so the work continues.

hasBundlePatch

dsh-boot-resume

Resume the conversation a DSH restart interrupted — so you never have to type "继续" again.

中文说明

The problem

DeepSeek Harness persists every session to disk, so the conversation history survives a restart. The turn that was running does not: on resume, interruptedTurnClosers() appends a synthetic turn/end { reason: { kind: 'interrupted' } } that closes the open turn, and the session then waits for your next message. Restart during work and the agent simply stops mid-thought.

What this does

One check, once per host boot (delayMs after activation):

  1. List the stored sessions of every workspace.
  2. Read the tail of each one and look for an unfinished turn:
    • the last event is turn/start with no turn/end — the process died mid-turn, or
    • the last turn/end carries reason.kind === 'interrupted' — the marker a later resume wrote.
  3. For every session that matches, agents.resume() it (or reuse the already-registered agent) and agent.followup() a short user message — 继续 by default.

Nothing else in DSH is touched: no schema, no patch to core, no extra process.

What it deliberately does NOT resume

Last turn ended withWhy it is skipped
reason.kind === 'user'you pressed Stop — resuming would fight you
reason.kind === 'completed'the turn finished normally
a turn older than maxAgeHoursstale, likely abandoned on purpose

An agent instance that is already running for that session is also skipped, so a UI that reopened the conversation first always wins.

Guards against a crash loop

If the resumed turn crashes the host again, the next boot would resume it again — forever. Two limits stop that:

  • cooldownMinutes — at most one automatic resume per session in that window;
  • maxPerDay — a hard cap per session per 24 hours.

maxResumePerBoot and staggerMs keep a busy machine from starting five model turns at the same instant.

Install

cd "$DSH_HOME/profiles/<profile>"
pnpm add link:/path/to/dsh-boot-resume

then add the package name to dsh.profile.bundles in that profile's package.json and restart the host.

Configuration

All keys are optional; the defaults are shown.

- insert:
    - id: auto-continue
      name: dsh-boot-resume
      inject: [agents]
      config:
        enabled: true
        delayMs: 8000            # wait after boot before checking
        message: 继续             # the follow-up text
        maxAgeHours: 12          # ignore sessions older than this
        cooldownMinutes: 30      # per-session cooldown between resumes
        maxPerDay: 3             # per-session resumes per 24h
        maxCandidates: 8         # newest sessions to inspect
        maxResumePerBoot: 5      # how many sessions may be resumed per boot
        staggerMs: 1500          # spacing between resumes

Observability

Every boot writes one block to $DSH_HOME/auto-continue/auto-continue.log:

[2026-10-21T02:50:55.275Z] 发现未完成轮次 session-9ba505ca…(turn=47, 判定=open, 最后事件 …)
[2026-10-21T02:50:55.383Z] session-9ba505ca…: 已投递「继续」
[2026-10-21T02:51:00.290Z] 启动检查完成:续跑 3 个会话

state.json in the same directory holds the per-session cooldown history (delete it to clear).

How the tail is read

sessionPersistence.open(id, 'read') + a bounded read() starting from the last projected seq (up to 1000 events back), falling back to a full read when the projection cache is missing or the window holds no turn boundary. Sessions are resolved from the workspace registry, so subagent and archived sessions never become candidates.

Requirements

  • DSH host >= 0.2.0-rc.2
  • Host services: agents, plus sessionPersistence and agentDefaultModel when present

License

MIT

Comments

Loading…

Similar plugins

dsh-self-restart

by NecromanAlbert

Any DSH session can request a Desktop restart, then the same persisted session is resumed and followup'd with its mission.

Manifest valid

★ 0

↓ 34/wk

MIT

JavaScript

Aug 26, 2026

dsh plugin --profile web add dsh-self-restart

by flandre2233

Auto-resumes DSH turns interrupted by a host restart

Tools & CapabilitiesDevelopment & InfrastructureSessions & MessagesManifest valid

★ 1

↓ 352/wk

MIT

JavaScript

Sep 24, 2026

dsh plugin --profile web add dsh-recovery-resume

by Harzva

Adds confirmed DSH restart actions and durable automatic continuation for eligible top-level sessions through an existing compatible dsh-restart Host provider.

Terminal & ClientsSessions & MessagesManifest valid

★ 0

MIT

JavaScript

Aug 29, 2026

dsh plugin --profile web add @harzva/dsh-restart-autoresume

by nickkkkkk123123

Auto-wakes the main agent after a DSH service restart: compares last-run timestamps, posts a recovery notice with humanized downtime, and delivers it so interrupted work picks itself back up. Runs on

Development & InfrastructureTerminal & ClientsSessions & MessagesManifest valid

★ 1

MIT

JavaScript

Aug 29, 2026

dsh plugin --profile web add dsh-resume-on-restart

by DWJZ

该仓库暂未提供项目说明。

UI & ExperienceDevelopment & InfrastructureTerminal & ClientsManifest valid

★ 0

MIT

JavaScript

Sep 28, 2026

dsh plugin --profile web add dsh-restart

by edusrez

Wakes the main agent after any DSH restart so interrupted work resumes automatically — adds a restart tool and an optional canary that validates the boot and warns instead of breaking.

Tools & CapabilitiesManifest valid

★ 8

↓ 184/wk

MIT

JavaScript

Sep 22, 2026

dsh plugin --profile web add dsh-smart-restart