DeepSeek Harness Plugin Hub

Plugin HMR Not Working

Understand DSH's four HMR modes, choose the right one, and troubleshoot hot-reload failures.

Four HMR modes

DSH plugins support four hot-reload modes, declared in the dsh.hub.compatibility.hmr field:

full — the plugin can be applied and disposed without restarting the host process. This is the highest level of HMR and requires the plugin to correctly implement apply and dispose lifecycle hooks.

config — configuration changes take effect by recomposing config layers without fully unloading the plugin.

refresh — a web/client refresh is required to see changes.

restart — a DSH process restart is required to load changes. This is the lowest compatibility mode.

Choosing the right mode

If your plugin only modifies configuration, config mode is sufficient. If it has UI components, refresh is usually needed. Only use full when the plugin fully implements runtime hooks.

Declaring a higher HMR mode than actually supported leads to stale updates or inconsistent state.

json
{
  "dsh": {
    "hub": {
      "compatibility": {
        "hmr": "refresh"
      }
    }
  }
}

Troubleshooting HMR failures

Check whether the declared HMR mode matches actual behavior. If full is declared but dispose isn't properly implemented, old instances may not be cleaned up.

Verify there are no entry ID conflicts in the Cordis patch. When multiple plugins register the same ID, the later one overrides the earlier.

Check DSH logs for HMR-related events to confirm changes are being detected.