citydirector/dsh-loop-rescue ↗★ 0

dsh-loop-rescue

DSH plugin that cuts model repetition loops mid-stream, prunes the loop out of the committed message, and resumes automatically. 适合经常遇到模型推理或文本无限重复输出,需要自动剪枝并恢复会话的用户。

패키지
dsh-loop-rescue
호환성
미검증
Harness peer 범위
>=0.1.7-alpha.1 <0.3.0
Cordis peer 범위
^4.0.2
버전
0.1.0
라이선스
MIT
최근 업데이트
2026. 10. 17.

설치

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:citydirector/dsh-loop-rescue

Configuration

The defaults work as they are. To change them, write to the profile's cordis.patch.yml:

- set:
    - id: loop-rescue
      config:
        mode: rescue              # rescue: cut + prune + resume | cut: cut + prune | observe: log only
        watch: both               # both | reasoning | text
        marker: true              # leave a "〔N chars of repeated reasoning removed〕" line where it pruned
        maxConsecutiveRescues: 3  # cap on back-to-back rescues; one normal call resets it
        stallCalls: 3             # nudge after this many reasoning-only calls with no output; 0 = off
        stallMinReasoningChars: 1024
        retryTemperature: 1.0     # temperature for the resume request; unset = unchanged
        retryReasoningEffort: low # reasoning effort for the resume request; unset = unchanged
        retryRequests: 1          # how many requests after a resume use the two settings above
        language: auto            # auto | zh | en
        detector:                 # detection thresholds; rarely need changing
          poolWindow: 30
          poolMinCoverage: 0.75
          cycleMinChars: 600

Consider running mode: observe for a day or two first, check that every loop-rescue: ... loop detected line in the log is a real loop, then switch to rescue.