Introduction¶
When running long conversations or batch tasks in DeepSeek Harness (DSH), you often wait until the Agent finishes before leaving your workstation. If you want to “shut down once this round truly ends,” manually watching the interface and then clicking the system shutdown button is both tedious and prone to accidental shutdowns while sub-agents are still running. The community plugin dsh-auto-shutdown (maintainer 873360545) adds a toggle in Settings → General: when enabled, the local machine schedules a shutdown when the next root session conversation completes, and a native Windows countdown dialog appears with a one-click cancel option. The plugin only supports Windows, requires DeepSeek Harness ≥ 0.2.1; the current package version is 0.3.0, licensed under MIT. The DSH ecosystem emphasizes “everything is a plugin,” with plugin directories hosted on community sites such as SkillHub, and has no official affiliation with DeepSeek / HF (Huanzhang).
What Is This¶
dsh-auto-shutdown is a DSH plugin categorized as “client-side”: the Host side listens for turn-end events, while the Client side renders the toggle and configuration options in the general settings. It does not replace system power policies; rather, after you explicitly enable the toggle, it chains “conversation end → delayed shutdown → optional cancellation” into a reproducible path.
Core Features¶
- One-click toggle in settings: labeled “Power off after the conversation finishes” (for English interfaces), bound to the Host configuration form; changes take effect without restarting the Harness.
- One-time trigger: before scheduling a shutdown, it writes
enabledback tofalse, so a restart of the Harness will not cause a sudden shutdown due to residual configuration. - Native countdown dialog: by default, a WinForms window pops up before shutdown, allowing you to click “Cancel shutdown” to execute
shutdown /a; you can also executeshutdown /ain any terminal to cancel. - Root session only: only the turn end of the root Agent can trigger it; sub-agent / team member turns are ignored; if other agents are still running, it waits until the next turn boundary.
- Configurable delay and popup:
delaySecondscontrols the number of seconds forshutdown.exe /s /t; whenpopupisfalse, the dialog can be suppressed (shutdown can still be canceled viashutdown /a).
In terms of implementation, the Host (lib/index.js) filters for the root Agent on agent/turn-stopping, performs a one-time latch, writes the configuration back, and spawns shutdown.exe; the cancellation window is launched by lib/popup.js and assets/notify.ps1 (PowerShell 5.1), with the text passed via argv to keep the script ASCII-only and avoid non-UTF-8 code pages corrupting Chinese characters.
Installation and Activation¶
Run one of the official installation commands in PowerShell:
dsh plugin add github:873360545/dsh-auto-shutdown
Or install a pre-built package from a GitHub Release:
dsh plugin add https://github.com/873360545/dsh-auto-shutdown/releases/latest/download/dsh-auto-shutdown.tgz
After installation, restart the Harness (restarting the Host is sufficient), and you should see the plugin entry auto-shutdown in the profile.
Typical Usage¶
- Open Settings → General, find “Power off after the conversation finishes,” and enable the toggle.
- End a conversation normally. At the end of that round, the plugin will: automatically turn the toggle off; execute
shutdown.exe /s /t <delaySeconds>; ifpopupistrue, a countdown dialog appears. - In the dialog:
- Click Cancel shutdown → runsshutdown /a, the machine stays on;
- Click Continue shutdown, close the window, or let the countdown reach zero → shutdown proceeds as scheduled.
Configuration Options¶
The following fields can be modified in real time on both the settings page and the plugin page, without requiring a restart:
| Field | Default | Description |
|---|---|---|
enabled |
false |
Master switch; automatically written back to false before scheduling a shutdown to ensure it only triggers once. |
delaySeconds |
60 |
Shutdown delay in seconds (5–86400), consistent with the popup countdown. |
popup |
true |
Whether to display the cancel shutdown dialog. |
Use Cases and Considerations¶
Suitable for: Users on Windows who want automatic shutdown after finishing a round of root conversation with DSH, but do not want to keep “scheduled shutdown” enabled all the time; scenarios where a few dozen seconds of buffer are needed before leaving, and the ability to easily reverse the action is desired.
Important notes:
- The plugin runs with the permissions of the user owning the current DSH Host process;
shutdown /s /tis available for logged-in users, and the README states that no administrator privileges are required. Before installation, it is still recommended to read the GitHub repository source code and the MIT license to confirm that the behavior complies with your environment policies. - The popup logic only executes
shutdown /a; it will not schedule another shutdown on its own. - Debugging: set
DSH_AUTO_SHUTDOWN_DRYRUN=1in the Host environment variables to only log the commands that would be executed without actually shutting down; setDSH_AUTO_SHUTDOWN_POPUP_LOG=<file>to append popup user actions to a log file.
Conclusion¶
dsh-auto-shutdown binds “conversation end” and “machine shutdown” into a reversible one-time action, with simple configuration and a safe cancellation path by default. Directory page: SkillHub - dsh-auto-shutdown; source code and full documentation: GitHub - 873360545/dsh-auto-shutdown.