dsh-circuit-breaker
Run the following command in DeepSeek Harness:
dsh plugin install pricklywiggles/dsh-circuit-breaker
Paste the following prompt into your AI chat to install this plugin:
Run dsh plugin install pricklywiggles/dsh-circuit-breaker in DeepSeek Harness to install the plugin, source at https://github.com/pricklywiggles/dsh-circuit-breaker, then restart your profile to activate it.
About this plugin
Running local models as agents, subagents can fall into degenerate repetition loops. The same search fires five hundred or a thousand times, every call succeeds and returns results, no error ever triggers an alert. Telling the model to stop only locks it deeper into the pattern, because repetition is a self-reinforcing attractor and instructions simply do not land once the state is established.
dsh-circuit-breaker puts the guard in code, outside the model, and never asks the model for its opinion. It registers a tool-call guard with two denial tiers: the same tool with the same significant arguments repeated past a threshold (default 6) inside a sliding window, and a lifetime call cap per agent object (default 300). Denials are monotonic; nothing downstream can re-allow a refused call. Denied calls are not counted toward the window, so the breaker cannot latch permanently. A model that can still read the denial text stops and reports back to the user. A truly degenerate model sees every call blocked before execution, consuming no inference slots and performing no real actions.
Built for anyone running local-model agents under DeepSeek Harness, especially unattended subagents. Model-agnostic: it inspects the pattern of tool calls, not model internals, so it works the same way behind any local or hosted model. Configuration is applied through a patch layer with no build step, plain ESM out of the box. The optional incident log appends one JSON line per first denial per agent, carrying the agent UUID, so a parent or supervisor can detect a tripped child, interrupt it, re-dispatch once, and record a gap on a second trip.
Use Cases
- Subagents repeating the same search or tool call hundreds of times with no errors
- Unattended background subagents falling into degenerate loops after long runs
- Needing a hard call limit that does not rely on the model following instructions
Best For
- Developers running local-model agents under DeepSeek Harness
- Operators managing multiple subagents and preventing resource leaks
- Engineers building safety guardrails for unattended agent workflows
Related Plugins
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.
Packages all 87 SKILL.md files from upstream reverse-skill as a DeepSeek Harness plugin that auto-registers them for authorized reverse engineering, penetration testing, and security research.