Introduction¶
DeepSeek Harness (DSH) needs to reliably restore task state after restarts or crashes. The existing dsh-restart Host service handles shutting down and restarting DSH, but orchestrating the resumption of in-flight Sessions requires additional robustness. This plugin adds a controlled “restart and resume” flow by tracking in-flight top-level Sessions, refreshing them before ledger commits, and safely committing auditable continuation turns.
What It Is¶
This is a DSH plugin maintained by Harzva. It adds a controlled flow for restarting and resuming in-flight tasks. It relies on the existing dsh-restart Host service while managing the persistent recovery ledger and restart logic.
Core Features¶
- Controlled Flow: Adds a controlled flow for restarting and resuming in-flight tasks.
- Selective Resume: Resumes in-flight tasks or performs restart-only actions with explicit confirmation.
- Integration: Fails closed if capability checks for the existing
dsh-restartHost service fail. - State Management: Refreshes Sessions before commit and uses a private, versioned recovery ledger.
- Crash Recovery: Automatic crash recovery for registered, interrupted top-level Sessions, with stable intent/RPC origins and bounded concurrency.
- Evidence Checks: Real-time and cold Session evidence checks.
Prerequisites and Installation¶
This plugin requires the following environment:
* DSH 0.1.1-rc.2
* Cordis 4.0.1
* Node.js 22+
The target profile must already have dsh-restart@0.3.1 mounted. This plugin is not installed into production profiles by the release process.
Install it into an ephemeral or explicitly approved profile:
dsh plugin --profile web add https://github.com/Harzva/dsh-restart-autoresume/releases/download/v0.1.0-alpha.1/harzva-dsh-restart-autoresume-0.1.0-alpha.1.tgz --ignore-scripts
Configuration¶
The plugin contributes a loader line dsh-restart-autoresume to the profile. Configure that line in the profile patch layer:
- id: dsh-restart-autoresume
config:
autoResumeCrash: true
maxAttempts: 3
claimTtlMs: 30000
intentTtlMs: 86400000
recoveryConcurrency: 1
startupSettleMs: 1000
restartDelayMs: 250
Disabling and Removal¶
To disable all Host and Client behavior after installation:
- id: dsh-restart-autoresume
disabled: true
To fully remove the package dependency:
dsh plugin --profile web remove @harzva/dsh-restart-autoresume
Notes and Limitations¶
- The initial release does not directly resume subagents; their parent top-level Session may coordinate new subagents after recovery.
- DSH’s atomic write contract provides locked replacement, but does not claim full directory
fsyncdurability. - Orphaned ledger locks are an operator remediation item.
- The temporary Phase 6 process restart tool is test infrastructure, not a production dependency.