ADistanceThereIs/dsh-output-loop-guard ↗★ 0

dsh-output-loop-guard

检测并中止模型输出中的退化重复和无限循环 适合经常遇到模型“复读机”或陷入思维链死循环的用户。

包名
dsh-output-loop-guard
兼容性
待验证
Harness 依赖范围
*
版本
0.1.0
许可证
MIT
最近更新
2026年10月16日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:ADistanceThereIs/dsh-output-loop-guard

Configuration

Override the row in the profile's cordis.patch.yml (a patch replaces the row's whole config, so restate every key you want to keep):

- id: output-loop-guard
  name: dsh-output-loop-guard
  config:
    dryRun: false                 # true = detect and log only, never cancel
    autoContinue: true            # wake the agent with the corrective notice
    maxTripsPerTurn: 2            # auto-continue budget per turn
    windowChars: 1200
    checkEveryChars: 64
    minPeriodRepeats: 6           # repeats required for a multi-line cycle
    singleLineMinRepeats: 40      # reasoning-channel single-line threshold
    singleLineTextMinRepeats: 60  # visible-text single-line threshold (0 = off)
    useDominantGram: true
    dominantGramCoverage: 0.55
    dominantGramMinCount: 24
    useFlatTic: true
    ticMinCount: 48
    ticMinCoverage: 0.25
    verbose: false

Start with dryRun: true if you want to observe detections in your own sessions before letting the guard abort anything.