AI Agent Hub
Back to plugins
🧩

dsh-restart

admin-security Updated 2026.09.16

Run the following command in DeepSeek Harness:

dsh plugin install zhiheng-zhang-Mera/dsh-restart

Paste the following prompt into your AI chat to install this plugin:

Install the plugin in DeepSeek Harness by running dsh plugin install zhiheng-zhang-Mera/dsh-restart; the full source is available at https://github.com/zhiheng-zhang-Mera/dsh-restart .

About this plugin

A DeepSeek Harness instance that has been running for hours or days will eventually need a restart to free memory, flush state, or pick up configuration changes. Killing the process and relaunching it, however, risks interrupting in-flight tasks, piling up duplicate restarts, or spiraling into a crash loop. dsh-restart solves a narrow but critical problem: once an external scheduler has decided that a restart is warranted, how do you execute that restart safely without endangering the host application?

Upon receiving a restart request the plugin performs structural validation, source and priority allow-list checks, acquires an exclusive lock, enforces cooldowns and duplicate-suppression, gates on a checkpoint safety signal from the harness, writes a checksummed ticket to disk, and then requests a graceful shutdown through a port. After the process exits a separate, long-lived supervisor reads the ticket from disk and relaunches the service, while also breaking crash loops and entering safe mode (exit code 3) when repeated failures are detected. Throughout the entire flow dsh-restart never touches the task queue, has no awareness of thermal thresholds or time-of-day windows, and its worst-case outcome is simply that automatic restart is unavailable for this cycle, never that the harness itself goes down.

This plugin is aimed at operators who run DeepSeek Harness in production and already use a health scheduler to decide when a restart is needed but lack a safe, auditable execution layer. dsh-restart slots in as that missing seam: it can be absent without breaking the scheduler or the core runtime, and when present it enforces cooldown, duplicate suppression, checkpoint gating, and ticket-based hand-off so every restart is verifiable on disk and every refusal is explained by a machine-readable code.

Use Cases

  • Routine restart to reclaim memory after long-running sessions
  • Executing a restart already decided by the health scheduler
  • Auto-entering safe mode when repeated restarts fail to relaunch

Best For

  • Engineers operating Harness in production environments
  • Teams that run dsh-health-scheduler but lack a safe execution seam
  • SRE teams that require auditable, bounded restart workflows