dsh-self-restart
Run the following command in DeepSeek Harness:
dsh plugin install jiang12345-code/dsh-self-restart
Paste the following prompt into your AI chat to install this plugin:
Install this plugin in DeepSeek Harness by running dsh plugin install jiang12345-code/dsh-self-restart; full source code is available at https://github.com/jiang12345-code/dsh-self-restart
About this plugin
DSH's host runs in-process, so any plugin or configuration change requires a full restart to take effect. The catch: the DSH process almost always runs under elevated privileges, where a normal Stop-Process call silently fails—nothing gets killed, nothing gets restarted, and you are left wondering what went wrong.
dsh-self-restart turns the entire elevated-kill, port-release check, service relaunch, and liveness-probe pipeline into a single callable routine. It registers a one-shot Windows scheduled task at HIGHEST level to perform a taskkill /F /T tree kill, polls until the port is actually released, then relaunches the service and probes for recovery. On the front-end, a lightweight client pings the host every four seconds; two consecutive misses trigger a full-screen overlay, and the page reloads itself the moment the host answers again—most users never notice the restart happened. Beyond the restart itself, the plugin handles the after-shock: before killing the process it auto-discovers running agents, recently active session logs, and in-flight background jobs, writing them into a task ledger; after the service comes back, those tasks resume one by one with a staggered delay and a checkpoint-preamble to prevent blind re-execution. A business-activity gate further distinguishes genuine user interruptions from the plugin's own self-check noise, preventing the same session from being re-triggered in a loop.
Built for Windows-based DSH users who adjust plugins or configs often and want a near-zero-friction restart experience where in-flight work picks up automatically.
Use Cases
- Restarting DSH in-process after plugin or config changes
- Killing an elevated process that silently resists normal termination
- Auto-resuming in-flight agent sessions and background jobs after restart
Best For
- Windows users who frequently tweak DSH plugins or configs
- Agent-workflow users who need in-flight sessions auto-resumed after restart
- DSH users who want a zero-touch restart with automatic front-end recovery
Related Plugins
A method pack that makes AI coding agents plan against your real baseline, prove completion with fresh evidence, and reduce reworks and unsafe changes.
Turns the DeepSeek Harness session into a captain that builds a durable sub-agent team, splits goals into dependency-aware tasks, and coordinates work via direct messages and a live Web UI.
Gives coding agents design judgment, letting Claude Code, Cursor, and 70+ agents generate and iterate high-quality UI, presentations, and graphics right from the terminal.
Run the Pi ecosystem's plugins on DeepSeek Harness, unmodified, via a compatibility layer that implements Pi's public extension ABI on DSH's native services.