DSH Plugins Marketplace

DSH Plugins

Plugins

/

Tools & Capabilities

/

dsh-loop-breaker

d

dsh-loop-breaker

Manifest valid

Hard stop for runaway turns: blocks repeated identical tool calls and ends the turn when per-turn step or time budgets are exceeded.

hasBundlePatch

dsh-loop-breaker

硬止损插件:同一工具 + 同一参数反复调用时,直接中断本轮。

为什么需要

2026-09-13 从真实会话日志实测:

  • 单个 turn 最多跑出 337 步
  • 同一条命令被重复调用 120 次 / 85 次
  • dsh 自带的 repeat-tool-reminder 只提醒、不中断
  • dsh-agent-loop 只暴露 maxParallelToolCalls,没有步数上限

结果就是"跑四小时 / 最后只能 /stop"。

实现

用两个上游扩展点:

钩子作用
tools/post-execute(waterfall)计数;超限时返回 {kind:'block', feedback, additionalContexts} 否决该次结果并注入可见说明
agent/pre-step(waterfall)返回 {kind:'reject'} 让下一步不进入 → 本轮结束

判定键是「工具名 + 参数规范化后的 JSON」,所以正常干活(每次不同命令)不会误伤。

配置

- id: loop-breaker
  name: 'dsh-loop-breaker'
  config:
    consecutiveLimit: 4      # 连续重复多少次硬止损
    totalLimit: 12           # 单轮内累计多少次硬止损
    include: []              # 只统计这些工具(空=全部)
    exclude: []              # 排除这些工具
    argumentsPreviewChars: 400

安装

bash /nas/dsh/工具/dsh-loop-breaker/install.sh

装完需要重启一次 dsh web 才会加载(会短暂断开网页,会话不丢):

dsh-restart

卸载

dsh plugin --profile web remove dsh-loop-breaker
rm -rf ~/.dsh/profiles/web/node_modules/dsh-loop-breaker

Comments

Loading…

Similar plugins

dsh-repeat-stop

by 173787247

Hard-stop consecutive identical tool calls after a configurable streak so the agent cannot spin in place.

Security & AuditTools & CapabilitiesDevelopment & InfrastructureManifest valid

★ 2

MIT

JavaScript

Sep 29, 2026

dsh plugin --profile web add dsh-repeat-stop

Dead-loop brake for DSH agent sessions: detects repeated identical tool calls, repeating call sequences, and duplicate text, then reminds the agent or refuses the call before it runs.

Tools & CapabilitiesManifest valid

★ 0

dsh plugin --profile web add dsh-brake

by snailium

Hard break on repeated identical tool calls in DeepSeek Harness (DSH): a synchronous monotonic ctx.tools.guard gate that denies the 2nd identical call per agent. Dependency-free.

Development & InfrastructureTools & CapabilitiesTerminal & ClientsManifest valid

★ 0

MIT

JavaScript

Sep 29, 2026

dsh plugin --profile web add dsh-repeat-tool-breaker

by 173787247

Hard-stops further tool calls after a configurable per-session budget is reached.

Security & AuditTools & CapabilitiesDevelopment & InfrastructureManifest valid

★ 1

MIT

JavaScript

Sep 29, 2026

dsh plugin --profile web add dsh-tool-budget

by J0ss077

Stop. Confirm. Run. A DeepSeek Harness plugin that pauses selected tools and waits for your explicit approval before every execution.

Security & AuditDevelopment & InfrastructureManifest valid

★ 3

↓ 163/wk

MIT

TypeScript

Sep 6, 2026

dsh plugin --profile web add @j0ss077/dsh-always-require-tools-approval

String-matches tool-call input arguments, blocks dangerous tool calls (deny) or allows them with an injected warning (warn), and ships a full rules-management panel.

Security & AuditDevelopment & InfrastructureManifest valid

★ 0

dsh plugin --profile web add @jypjypjypjyp/dsh-guardrail