dsh-safety-restart
Run the following command in DeepSeek Harness:
dsh plugin install Dayi-Z/dsh-safety-restart
Paste the following prompt into your AI chat to install this plugin:
Run dsh plugin install Dayi-Z/dsh-safety-restart in your DeepSeek Harness terminal to install this plugin; full source is available at https://github.com/Dayi-Z/dsh-safety-restart .
About this plugin
Modifying host-half code (index.js, lib/*.js) requires a full process restart to take effect, but until now the agent had no means to trigger one, leaving users to restart manually. A subtler pitfall: recycling only the renderer process does not refresh the route table, so newly added tool calls all return 404, easily misdiagnosed as a routing bug.
dsh-safety-restart turns that restart into a single tool call and enforces four safety gates before the process actually exits: a restart-loop circuit breaker (refuses if the window limit is exceeded), detection of other sessions mid-turn (avoids cutting work in progress), profile bundle table validation (refuses on any unresolved or missing bundle, including the checked:false unknown state), and availability of a reliable relaunch mechanism (never degrades to killing the process). If any gate fails, the plugin refuses with a specific reason rather than forcing through. After restart, it writes a resume marker and delivers a continuation prompt back to the original session so the agent picks up seamlessly where it left off.
Built for Harness developers who frequently modify host-half code and need the agent to reload its environment autonomously within automated workflows. Desktop (Electron app.relaunch) and web/CLI (detached helper with health check) each have a tailored restart path, and every restart or refusal is appended to a JSONL audit log for post-mortem analysis.
Use Cases
- Agent auto-restarts the host process after modifying host-half code
- Automated workflows reload the environment without manual user action
- Pre-restart safety gates prevent restart storms and mid-turn session conflicts
Best For
- Harness developers who frequently modify host-half code
- Engineers building automated agent workflows
- Security admins who need restart audit logs and circuit-breaker tracking
Related Plugins
A network security red-team benchmark plugin for DeepSeek-V4.1/Flash featuring dual-layer kernel injection and zero-tool architecture for controlled model safety assessment.
A security red-team prompt plugin for DeepSeek-V4 that uses code-formal mapping and zero-trigger system prompts to enable unconditional output, intended for authorized testing and research only.
Adds an Auto approval mode on the official workspace-write sandbox, classifying semantic risks, asking when ambiguous, and denying destructive operations.
Undo/rollback system for DSH: config & plugin snapshots, one-click undo/redo/restore, message-level revert, secret masking, safe mode, and offline WebUI/GUI/CLI rescue tools for when DSH won't start.