rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:terry2010/dsh-loop-recover
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Detects model dead loops and auto-rescues — the task resumes in place.
English · 中文
Small local models (Ornith, some Qwen variants, etc.) can collapse into literal token loops (ssssss...) or semantic analysis loops — re-reasoning the same paragraphs forever. Plain loop guards just cut and stop; the task dies.
dsh-loop-recover breaks the full rescue chain:
compaction/* transaction) so the model can't replay the same reasoningAll inside one agent loop — the model keeps working after rescue.
Open Plugins → Add plugin, search dsh-loop-recover, click Install.
dsh plugin --profile desktop add dsh-loop-recover
# then restart the app
Everything is editable on the plugin page — no YAML needed. 32 fields grouped: Basics / Rescue / Resume / Intent / Detection / Detector (Advanced).
| Group | Key fields |
|---|---|
| Basics | mode (rescue/cut/observe), watch, language, keepLanguage, marker, debugLog |
| Rescue | maxConsecutiveRescues, maxTotalRescues (lifetime cap, never resets), compactOnRescue, stallCalls |
| Resume | retryTemperature, retryReasoningEffort, retryRequests |
| Intent | intentEnabled, intentNoveltyThreshold, intentConfirmCount |
Modes — rescue (cut+prune+compact+resume, default), cut (prune only, no resume), observe (log only, zero intervention — use this to evaluate thresholds on your workload first).
Different tools solve different problems — don't stack them:
| Plugin | What it does | Conflict |
|---|---|---|
dsh-agent-loop-guard |
Cuts at loop detection, stops turn | Both wrap llm/stream → double-cut, confused state |
dsh-client-auto-continue |
Resumes after interruption | Triggers extra resume → two conflicting continuation commands |
dsh-session-shift |
Context-pressure compaction → new session | Overlapping rescue → one compacts while the other shifts |
Disable them when using this plugin.
llm/stream (agent calls only)
↓ StreamLoopDetector — watches reasoning & text blocks
loop hit → cut repeated suffix → rewrite block-end → finish: stop
↓ commitLoopCompaction — v4 transaction, old context → checkpoint
↓ followup() — resume same task, fresh sampling params
Non-agent requests (title/summary generation) pass through untouched.
Reasoning blocks use relaxed thresholds (sentence-pool ≥8, n-gram ≥4): template verdicts in methodical enumerations are normal style, not loops; text blocks keep the defaults.
npm test # 84 unit + integration tests
npm run check # plugin load smoke
MIT · NOTICE for upstream attributions (dsh-compaction helpers adapted).
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: llm、deepseek-harness。