dsh-Shutdown-Guard: A Task-Completion Shutdown Guard for the DeepSeek Harness Sidebar
ltayshark0637/dsh-shutdown-guard
A DSH plugin that adds an auto-shutdown card to the DeepSeek Harness sidebar, gating shutdown behind multiple checks, blocking states, three visual styles, and AFK auto-takeover.
dsh-Shutdown-Guard is a DSH plugin that adds a shutdown card to the DeepSeek Harness sidebar, sitting below the Skills Center and above the session list. It targets long agent runs where you want the machine off when work ends but cannot safely assume it is done: background jobs may still run, a session may have errored, the agent may await your answer, or you may have stopped a task midway. Five gates block each of those cases and the shutdown command is issued only when it is genuinely safe, with Warning Tape, Radar, and Terminal looks and six runtime states that update in real time.
How to Install
dsh plugin --profile <your-profile> add dsh-shutdown-guardReplace --profile with the profile name you actually run (see ls ~/.dsh/profiles/): usually web in the browser UI, desktop or desktop-NNN in the desktop app.
- Category
- UI & Experience
- Platform
- DSH Plugin
- Author
- ltayshark0637
- Distribution
- Plugin
dsh-shutdown-guard Key Features
dsh-shutdown-guard Repo Summary
What Does It Do?
Shutdown Guard is a DSH plugin for DeepSeek Harness that adds an "auto shutdown when all tasks finish" card to the sidebar, placed below the Skills Center and above the session list. It solves the problem of long agent runs where you want the machine to power off when the work is done, but "task finished" does not mean "safe to shut down": background jobs may still be running, a session may have errored, the agent may be waiting for your answer, or you may have stopped a task midway. The plugin blocks each of those cases and only issues the shutdown command when it is genuinely safe, updating in real time with task state.
Core Features
- Five shutdown gates: armed, no countdown already running, all root sessions idle, no running or stopping background jobs, and no session errors in the current batch; if any gate fails, no shutdown happens and the reason is written to the card and settings page.
- Three switchable looks: Warning Tape (large status text with scrolling red-yellow stripes), Radar (concentric circles with a scanning beam, sessions and jobs shown as dots), and Terminal (command-line summary with six condition indicator lights); switching takes effect immediately without a restart.
- Six runtime states: off, standby, waiting for jobs, countdown, dispatched, and blocked; the countdown can be cancelled at any time and the plugin stays armed afterwards.
- Tiered blocked states: halted needs a human to click "disarm and retry", while waiting retries automatically per failure type and injects a "continue the original plan" instruction.
- AFK takeover: answers agent questions automatically without selecting any option for you, asks the agent to investigate and continue on session errors, and never triggers shutdown when you stop a task midway.
- Theme adaptation and event log: the card picks light or dark colors from the host surface brightness, or you can lock dark, light, or Claude Style palettes; the settings page shows recent events and why the last shutdown did not happen.
How to Use This Plugin?
After enabling it in DSH, the card appears in the sidebar; click arm to enter standby, and the machine will shut down once all tasks finish. To preview behavior first, open the author's interactive demo page: the Learn tab lets you switch between the three looks, and the Try tab gives you a random scenario where you can arm, cancel, and disarm by hand and watch it reach shutdown or a block. In daily use, switch looks in settings, toggle blockOnJobs and onlyOnSuccess, and configure retry pacing per failure type; keep AFK takeover on when you are away so agent questions get a reply asking it to finish the assigned work, summarize, and persist results.
How to Troubleshoot This Plugin?
When the card enters a blocked state, read its color and reason text first: gray-blue halted means insufficient quota, invalid credentials, context overflow, unsupported capability, or a full disk, and needs a human to fix it and click "disarm and retry"; gray-green waiting means rate limiting, 5xx, network interruption, empty response, timeout, or image unload, and the plugin retries automatically per policy. If tasks finish but no shutdown occurs, open the settings page and check the event log and the "why the last shutdown did not happen" entry, then verify the five gates one by one.
This page is an independent rewrite of the plugin's official README — for authoritative documentation and the latest changes, refer to the source: ltayshark0637/dsh-shutdown-guard. The plugin is third-party code that runs on your machine once installed; inclusion does not imply endorsement — please review the source before installing.
DSH Plugin FAQ
