Introduction¶
DSH’s plugin mechanism allows splitting different runtime capabilities into independent plugins. dsh-turn-watchdog handles one specific scenario: a live session that has not generated turn/end for a long time during the middle of a turn, where the user might be in a waiting state. This plugin does not fix sessions nor interrupt turns; instead, it performs a relatively narrow task: periodically scanning live sessions and reporting potentially stuck sessions that have not produced turn/end for a long time.
What is it¶
dsh-turn-watchdog is a DeepSeek Harness (DSH) plugin, maintained by Equinox7379, licensed under MIT. It targets DSH’s live sessions, providing read-only stuck observation: it identifies sessions where the last event was not a normal end and the idle time exceeds a threshold, and provides prompt warnings and a status query entry point.
Core Features¶
Scanning and Judgment¶
The plugin periodically scans live sessions. The conditions for judging a session as “potentially stuck” are:
- The last event is not
turn/endorsession/end-seed; - The idle time exceeds
thresholdMinutes.
thresholdMinutes defaults to 10 and can be configured in the profile patch config. Subagent sessions are excluded during scanning.
Alerts and Queries¶
When potentially stuck sessions exist, the plugin injects warning text into the prompt context for the AI and user to reference. This text is a synchronous pure text concatenation without template variables; it is not injected if there are no potentially stuck sessions.
The plugin also provides a turn_watchdog_status query tool. The parameter refresh defaults to true, indicating an immediate rescan.
Operational Boundaries¶
- Read-only: does not rewrite session events, does not interrupt turns, does not restart services.
- Zero dependencies, no custom session events, no HTTP routes.
Installation and Enablement¶
The plugin runs with the current dsh process permissions; you should check the source code and license before installation. The following command comes from verified sources, using a local link path:
dsh plugin --profile web add link:/path/to/dsh-turn-watchdog
# Restart dsh web
Replace link:/path/to/dsh-turn-watchdog with the actual local path. Verified sources do not list other installation methods.
Typical Usage¶
After enabling, you can query using turn_watchdog_status or simply ask “which sessions are stuck”. The returned result contains thresholdMinutes and a stuck list.
Example:
{ "thresholdMinutes": 10,
"stuck": [ { "sessionId": "…", "cwd": "E:\\surdet", "lastEventType": "step/start", "idleMinutes": 12 } ] }
In the example, thresholdMinutes is 10, and the stuck list item contains sessionId, cwd, lastEventType, idleMinutes. Here lastEventType is step/start and idleMinutes is 12, which meets the reporting condition of “the last event is not turn/end and the idle time exceeds the threshold”.
Use Cases and Notes¶
Suitable for DSH use cases where observing whether live sessions have stalled is needed, helping to discover states where “the session has not explicitly ended, but has been idle for a long time without turn/end”. It is not a fault recovery tool: it does not cancel turns, restart services, or rewrite session events.
Usage Notes:
- Legitimate long turns might be listed; need to judge based on
lastEventType. thresholdMinutesdefaults to10; needs to be configured based on actual turn duration.- The plugin runs with the current dsh process permissions; check the source code and license before installation.
Conclusion¶
dsh-turn-watchdog provides a lightweight, read-only observation point for live sessions: periodic scanning, alerting potentially stuck sessions, and providing status queries.
GitHub Address: https://github.com/Equinox7379/dsh-turn-watchdog
The community directory page URL is not explicitly listed in the verified sources; this article does not list uncertain URLs.