dsh-loop-breaker: DSH Streaming Repetition Circuit Breaker
The DSH (DeepSeek Harness) plugin `dsh-loop-breaker` is designed to resolve the model's "degenerate repetition" issue. Unlike the previous approach that only detects turn boundaries, it hooks into the `llm/stream` event to intercept repetitive behavior in real time within streaming output. The plugin supports detecting multiple repetition patterns, and upon a match, it immediately cancels the underlying HTTP request (stopping billing) and injects a corrective prompt. It also features an L0 sanitization mechanism to prevent repetitive content from contaminating the session history. With simple installation and flexible configuration, it effectively prevents runaway token consumption caused by repetition.
Read More