AI Agent Hub
Back to plugins
🧩

dsh-tool-failure-circuit-breaker

admin-security Updated 2026.08.24

Run the following command in DeepSeek Harness:

dsh plugin install icyaaaww/dsh-tool-failure-circuit-breaker

Paste the following prompt into your AI chat to install this plugin:

In DeepSeek Harness, run dsh plugin install icyaaaww/dsh-tool-failure-circuit-breaker to install the plugin, with source at https://github.com/icyaaaww/dsh-tool-failure-circuit-breaker.

About this plugin

When a model keeps retrying a tool with the exact same arguments after that call has already failed, every additional dispatch burns latency, network I/O, and provider cost without any chance of success. dsh-tool-failure-circuit-breaker closes that loop: once the same tool-and-argument pair has failed a configurable number of times (default 2), the next identical dispatch is denied at the tools/pre-execute stage before it ever reaches the tool body. Unlike the official dsh-repeat-tool-reminder, which advises on every repeated call but never blocks one, this plugin observes only authoritative failure outcomes and records the denial as a normal tool result, keeping replay and model history fully consistent. Until it actually blocks a call, it adds zero schema and zero tokens.

Failure chains are isolated per live agent and keyed on tool name plus canonical JSON arguments, so object key order does not change identity. A successful result, a new user message, or a failed call with different arguments resets the previous circuit. You can exempt specific tools via include or exclude wildcard patterns—handy for polling-style calls whose contract genuinely requires unchanged retries—so the guard only bites where it matters.

Ideal for teams running DeepSeek Harness 0.1.1-rc.2 agents who want a hard ceiling on repeated failed dispatches, and for admins tracking provider spend and end-to-end latency. State is in-memory and resets with the process; near-identical but not exactly matching retries are not detected, so pick it when exact-retry loops are your primary concern.

Use Cases

  • Model repeatedly retries a failed tool call with identical arguments, wasting latency and cost
  • Need a hard cap on repeated failed tool dispatches
  • Reduce wasteful network requests and provider billing, protecting downstream services

Best For

  • Teams running DeepSeek Harness agents who care about repeated failed dispatches
  • Admins and SREs needing circuit-breaker policies for tool calls
  • Developers optimizing agent behavior in cost-sensitive provider environments