dsh-agent-loop-guard
Run the following command in DeepSeek Harness:
dsh plugin install GooDAnDReaDY/dsh-agent-loop-guard
Paste the following prompt into your AI chat to install this plugin:
Run dsh plugin install GooDAnDReaDY/dsh-agent-loop-guard in your DeepSeek Harness terminal to install the plugin; the source code is hosted at https://github.com/GooDAnDReaDY/dsh-agent-loop-guard .
About this plugin
Autonomous AI coding agents that hit tool failures, ambiguous instructions, or hallucination loops can easily spin into infinite retry cycles — re-reading the same directory, editing identical lines, or echoing the same streaming text across turns — burning through token budgets and locking execution threads without ever completing the user goal. dsh-agent-loop-guard is a native DeepSeek Harness runtime plugin that intercepts these spirals before they run out of control, steering the agent into a graceful text-only answer when progress stalls. Three core capabilities drive the plugin: a progress-aware tool-call guard that uses epoch-based state tracking to distinguish productive iteration from stagnant repetition and blocks a call only when no new evidence appears; a real-time assistant output stream guard that detects repeated lines and multi-line block repetitions and cleanly cancels runaway generation while preserving session history; and an Answer-Only graceful fallback that issues structured DSH denials guiding the model to explain the bottleneck in prose rather than terminating abruptly. All diagnostic logs automatically redact Bearer tokens, passwords, and secret query parameters, making the plugin safe to enable in production and enterprise environments. It is designed for teams running DeepSeek Harness workspaces where long autonomous coding sessions regularly consume API credits on unproductive loops, and for operators who need a fail-closed safety net without modifying the Harness core.
Use Cases
- When autonomous coding agents enter infinite read-edit retry loops
- When assistant output streams repeat identical lines or blocks across turns
- When production workspaces need protection against unproductive API credit burn
Best For
- Workspace administrators running DeepSeek Harness
- DevOps teams managing autonomous agent sessions
- Operations teams requiring enterprise-grade log redaction and compliance
Related Plugins
A network security red-team benchmark plugin for DeepSeek-V4.1/Flash featuring dual-layer kernel injection and zero-tool architecture for controlled model safety assessment.
A security red-team prompt plugin for DeepSeek-V4 that uses code-formal mapping and zero-trigger system prompts to enable unconditional output, intended for authorized testing and research only.
Adds an Auto approval mode on the official workspace-write sandbox, classifying semantic risks, asking when ambiguous, and denying destructive operations.
Undo/rollback system for DSH: config & plugin snapshots, one-click undo/redo/restore, message-level revert, secret masking, safe mode, and offline WebUI/GUI/CLI rescue tools for when DSH won't start.