nuwa-skill
alchaincyf
你想蒸馏的下一个员工,何必是同事。蒸馏任何人的思维方式——心智模型、决策启发式、表达DNA。Distill how anyone thinks.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:erdholion/dsh-loop-guard
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Result-aware stuck-loop guard for DeepSeek Harness: advisory nudges plus a monotonic hard stop.
A stage that repeats the same tool call and keeps getting the same result is stuck — it burns steps (and tokens) without producing new information. This plugin ports a guard that ran for weeks in front of a multi-harness LLM gateway, where the two-stage design measurably turned aborted agentic runs into completed ones (the pattern follows OpenHands' StuckDetector lineage).
The key design decision is that only repeats with identical results count. Requiring result identity whitelists legitimate repeats for free, with no tool-name configuration:
@deepseek-ai/dsh-repeat-tool-reminderThe official base bundle already ships an advisory repeat detector. This plugin is complementary, not a replacement:
| repeat-tool-reminder (official) | dsh-loop-guard | |
|---|---|---|
| Chain identity | tool name + arguments | tool name + arguments + result |
| Progressing poll loops | trigger reminders (unless excluded by pattern) | transparent, never trigger |
| Enforcement | never — advisory only, by design | denies further identical calls at the hard threshold |
| A model that ignores reminders | loops until the turn/budget dies | stopped, with corrective feedback it can act on |
Running both is fine: the reminder nudges early on argument-identical repeats; this guard only engages when the loop is provably sterile (identical results), and it is the only one of the two that can end it. The denial is a normal error result — the session survives and the model gets corrective feedback, which matters for frontends that treat provider-level 4xx errors as fatal.
dsh plugin --profile <name> add github:erdholion/dsh-loop-guard
Or from a local checkout: dsh plugin --profile <name> add ./dsh-loop-guard.
Per agent, the guard tracks the run length of consecutive tool calls with identical (name, canonically key-sorted arguments) and identical result content.
softThreshold, default 4): each further identical repeat injects a plugin-sourced notice after the tool result telling the model the calls are identical, that repeating will be denied at the hard threshold, and to act on what it already knows.hardThreshold, default 8): a monotonic tool guard denies the next identical call with corrective feedback. Non-identical calls are unaffected; the chain freezes while denials repeat, so the guard stays engaged until the model changes its action.source.kind === 'user') resets the chain — repetition across a user message is not a loop. The guard's own injected notices are plugin-sourced and do not reset anything.- id: loop-guard
name: dsh-loop-guard
config:
softThreshold: 4 # 0 disables nudges
hardThreshold: 8 # 0 disables denial; must exceed softThreshold
resultHashChars: 4000 # serialized-result prefix that participates in the hash
Invalid config (non-integer, negative, hard ≤ soft) throws at plugin load — a misconfigured guard fails loud, never silently.
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: agent。