Preface¶
In DeepSeek Harness (DSH), long-running goal sessions usually cannot be automatically resumed after a Harness restart. Simply calling agents.resume() often fails to make the session run again, because model variables, toolsets, and goal drivers are reset after a restart.
dsh-goal-auto is designed to solve this problem. It provides a set of mechanisms that allow users to mark the resume state in the session header and automatically reload agents, mount presets, and reactivate goal drivers when Harness restarts.
What Is This¶
dsh-goal-auto is a session-level automatic resume toggle plugin for DeepSeek Harness (DSH).
- Maintainer: FuWenLianggit
- License: MIT
- Purpose: Resolve the issue of automatic resume of long-running goal sessions after a Harness restart.
Core Features¶
The plugin provides the following core capabilities:
- Session toggle button: Adds a 🔁 toggle button to the action bar in the session header, used to mark the current session.
- Automatic resume logic: After Harness restarts, marked sessions automatically resume running. This includes reloading agents, mounting agent presets, re-arming goals, and keeping goal drivers continuously running.
- HTTP API: Provides interfaces for querying state and manually controlling session resume behavior.
Installation and Enablement¶
To install the plugin, use the officially provided installation command and specify the local repository path:
dsh plugin --profile web add file://<this repo path>
Another approach is to place the plugin files in <DSH_HOME>/plugins/dsh-goal-auto, add a file: or link: dependency in the profile’s package.json, and create a symbolic link under profiles/<name>/node_modules/@huanlin/dsh-goal-auto.
Typical Usage¶
Using the plugin mainly involves marking a session, toggling the resume state, and forcing a resume.
- Mark a session: In the DSH interface, use the 🔁 button in the session header action bar to mark a session that should be automatically resumed.
- Toggle state: Use the HTTP API to toggle the session’s resume flag:
POST /__goal-auto/toggle
This endpoint flips the session flag; if the state is enabled, execution starts immediately.
- Force resume: Use the API to force a resume operation for a specific session (typically used for diagnostics):
POST /__goal-auto/resume-now
Applicable Scenarios and Notes¶
- Watchdog dependency: The plugin only restores sessions when Harness starts; it does not keep the Harness process itself alive. If Harness crashes, hangs, or is terminated, the plugin cannot restart it. An external process watchdog must be deployed to monitor the health of the Harness process (TCP listening and HTTP responses) and bring the process back up if it becomes abnormal.
- State storage: The automatic resume state of sessions is stored in the
<DSH_HOME>/goal-auto-statedirectory. - Compatibility: The plugin depends on
@deepseek-ai/dsh-client-runtimefor client injection and supports the Web platform.
Conclusion¶
dsh-goal-auto fills the gap in DSH for long-running scenarios by addressing the three-layer issues after session restart (model variables, toolsets, and goal drivers).