Preface

The DeepSeek Harness (DSH) plugin ecosystem emphasizes “everything is a plugin.” When using the official @vectorize-io/hindsight-coding-agents plugin, there are two specific issues on the desktop side: first, the daemon does not start automatically with DSH and must be handled manually in the CLI; second, a black terminal window pops up when it starts.

This plugin works as a bypass patch, taking over the starting and stopping of the daemon and automatically binding it to the DSH lifecycle. It resolves daemon cold-start latency, black-window interference, and installation path limitations, making the local memory feature fully usable on the desktop side.

Core Features

  1. One-click toggle and status indicator
    Provides a “Local Memory” button in the DSH sidebar, displaying daemon status in real time (Not running / Starting / Running / Failed).

  2. Automatic startup and stop on exit
    The plugin automatically starts the daemon within about 40 seconds after DSH starts, without blocking the main interface. It also uses an independent “watchdog” process to monitor the DSH main process; once it detects that DSH has exited, it immediately kills the daemon and releases memory.

  3. Hide the black terminal window
    The plugin automatically applies a “hidden window” patch to the official daemon-start.js (supports self-healing, automatically re-applied after official updates), and hides the terminal window for uv.exe in the background.

  4. Install to another drive
    By using configuration parameters, the daemon (uv cache) and model cache can be installed to any drive letter, avoiding consumption of C drive space.

Installation and Activation

Prerequisites

  • The official @vectorize-io/hindsight-coding-agents plugin is installed.
  • The system has uv installed, with uvx in the system PATH.
  • DEEPSEEK_API_KEY is configured in DSH credentials.

Steps

  1. Copy the plugin repository files to the DSH global plugin directory:
    <DSH_HOME>/profiles/node_modules/dsh-hindsight-local/
  1. Append the mount configuration to the end of <DSH_HOME>/profiles/web/cordis.patch.yml:
    - insert:
        - id: hindsight-local
          name: 'dsh-hindsight-local'
  1. Completely exit and reopen the DSH desktop client.

Usage

After installing and restarting DSH, the daemon automatically enters a standby state.

  1. Automatic readiness: About 40 seconds after DSH starts, the status of the “Local Memory” button in the sidebar changes to “Running”.
  2. Manual control: Click the sidebar button at any time to manually start or stop the daemon.
  3. Safe exit: Directly close the DSH window; the watchdog detects the exit of the main process and automatically cleans up the daemon.

Configuration Parameters

The plugin’s own configuration file is located at <DSH_HOME>/storages/dsh-hindsight-local/config.json:

{
  "installDir": "X:\\hindsight",
  "autoStart": true
}
  • installDir: Specifies the installation directory for the daemon and models. If left empty, the system default location is used; if specified, UV_CACHE_DIR and HF_HOME point to subfolders under this directory, allowing data to be installed to any drive letter.
  • autoStart: Boolean value. Set to true to automatically start the daemon when DSH starts; set to false to rely only on manual toggle.

Notes

  • Resource usage: The local daemon uses about 0.8–1 GB of resident memory, and the initial installation uses about 3 GB of disk space (mainly torch dependencies and model files). Memory is released after turning off the toggle or exiting DSH.
  • Cold start time: The first start requires downloading dependencies and models, taking about 1–3 minutes; subsequent cache hits are ready within about 40 seconds.
  • Black window mechanism: The black window is hidden using ShowWindow(SW_HIDE), but the process is still running in the background. Do not manually click the close button on the black window, otherwise it will kill the daemon.
  • Official updates: Official plugin updates may overwrite daemon-start.js; this plugin’s window patch will be automatically re-applied on the next startup.
  • Key security: DEEPSEEK_API_KEY is only read through the DSH host’s credential service, not written to local files, and not exposed outside the plugin process.

Summary

By using a bypass patch, this plugin improves the local memory lifecycle management of hindsight-coding-agents in the DSH desktop client. It provides practical features such as automatic startup, exit cleanup, window hiding, and installation path configuration, making it suitable for developers who need to use the local memory feature stably.

  • GitHub repository: https://github.com/Hua1Q1nG/dsh-hindsight-local-optimize
  • Plugin directory: https://www.skillhub.cn/plugins/Hua1Q1nG/dsh-hindsight-local-optimize