AI Agent Hub
Back to plugins
⚙️

dsh-self-restart

Workflow Updated 2026.09.03

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