Introduction

The DeepSeek Harness (DSH) host code is loaded only once when the process starts, and there is no hot-replacement feature. After modifying a plugin, the DSH UI usually only shows a message such as “Changes will take effect on the next startup,” but it does not automatically restart the application, nor does it resume the conversation after a restart. The dsh-self-restart plugin turns this manual process into a single tool call: it restarts DSH by calling a tool and continues executing the task in the same conversation.

Core Features

The plugin provides a set of tools and two sides:
* Host side: Provides the tools dsh_status, dsh_stale_check, dsh_apply, dsh_restart, dsh_ui_reload, and dsh_selfcheck.
* Client side: Adds the missing “Refresh page” entry in the packaged desktop client and provides a host proxy inside the page.

Installation and Enablement

The plugin uses the MIT License. On Windows, install it using the DSH plugin manager:

plugin_manager install_bundle "%USERPROFILE%\.dsh\dsh-plugins\dsh-self-restart"

After installation, the plugin automatically loads the host side and the client side.

Typical Usage

After installation, you can verify it by having the agent call the following workflow:

  1. Check status:
    Call dsh_status to verify whether the host process, window shell process, ports, and plugin settings are normal.

  2. Run a restart check:
    Call dsh_restart with the reason “install check”.

  3. Verify the restart result:
    After the restart completes, call dsh_selfcheck to confirm that the plugin features are working correctly.

Applicable Scenarios and Notes

  • Platform limitation: Available only on the Windows platform.
  • Restart behavior: Calling dsh_restart shuts down and restarts the entire DSH application. This discards any child processes started by DSH (such as shell processes and MCP servers) and unsaved page state, but preserves the conversation logs.
  • Dependency requirements: DSH only loads plugin host code when the process starts. This plugin has no runtime dependencies and no build steps.
  • Build requirement: Requires a DSH build where the host process and window shell process are separated (the desktop edition is one such build).

Conclusion

The plugin solves the pain point of manually restarting DSH after plugin changes and being unable to recover conversation context, by using tool calls. It is suitable for development and debugging scenarios where plugin updates need to take effect immediately.