dsh-repeat-stop
文件与数据 活跃维护

dsh-repeat-stop

173787247/dsh-repeat-stop

支持自定义连续相同工具调用的触发次数阈值,达到设定连续次数后立即强制中断后续重复调用,避免无效循环消耗资源,配置灵活,无需改动原有逻辑即可快速接入现有工作流。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
44 KB
仓库大小
3 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:173787247/dsh-repeat-stop
git clone https://github.com/173787247/dsh-repeat-stop.git
git clone git@github.com:173787247/dsh-repeat-stop.git
README.md master

dsh-repeat-stop

DeepSeek Harness plugin: hard-stop consecutive identical tool calls.

Official repeat-tool-reminder only advises (default at 3 / 5 / 8) and never blocks. After a streak of the same tool with the same arguments, this plugin denies the next call so the agent cannot spin in place.

默认:连续 6 次相同调用可以执行,第 7 次被拦。换参数、换工具、或用户再发一条消息都会清零计数。

Install

dsh plugin --profile web add github:173787247/dsh-repeat-stop
# or a local checkout:
dsh plugin --profile web add /absolute/path/to/dsh-repeat-stop

Restart dsh web. No new tool appears. When it fires, Trajectory shows a tool error starting with dsh-repeat-stop: blocked.

Counting happens in the synchronous tool guard, so a single turn that fires the same concurrent-safe call many times (for example net_doctor) is still capped.

Topics

On GitHub, add dsh-plugin.

Config

Override the whole row in the profile cordis.patch.yml:

- id: dsh-repeat-stop
  name: dsh-repeat-stop
  config:
    enabled: true
    threshold: 6
    exclude:
      - job_output
      - job_list
      - job_kill
Key Default Meaning
enabled true Set false to disable.
threshold 6 How many identical calls may run; the next one is blocked. Integer >= 2.
exclude job_output, job_list, job_kill Tool-name wildcards that never count or block.
include (empty) If set, only these names are tracked.

A real user message resets the streak (same as the official reminder). Denied repeats still count, so hammering the same call stays blocked until the arguments change or the user speaks.