DeepSeek Harness Plugin: dsh-loop-brake (Circuit Breaker for Repeated Tool Calls)

`dsh-loop-brake` is a DeepSeek Harness plugin designed to prevent agents from getting stuck in infinite repeated-invocation loops caused by logical flaws. It uses SHA-256 hashing to detect identical tool calls, allows three consecutive calls by default, and trips the circuit breaker on the fourth call while raising a `LoopBrakeError`. The plugin supports a configurable maximum repetition count, captures only exact matches (with parameter keys sorted), and does not interfere with calls that involve timestamps or polling. In addition to operating as a plugin, it provides a standalone API for directly controlling the circuit-breaking logic.

Read More