DSH Plugins Marketplace

DSH Plugins

Plugins

/

Sessions & Messages

/

dsh-loop-recover

d

dsh-loop-recover

Manifest valid

Loop guard for DeepSeek Harness: detects and stops repeated output mid-stream, prunes and compacts context, then automatically resumes the task without a restart.

UI (client)hasBundlePatch

dsh-loop-recover

dsh-loop-recover

Detects model dead loops and auto-rescues — the task resumes in place.

npm version GitHub stars MIT license GUI configurable
English · 中文


What It Does

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:

  • Detect — 5-layer detector: periodic, n-gram, anchor, char-run, sentence-pool + intent-level tool-query tracking
  • Prune — cuts the repeated suffix mid-stream, leaves a one-line marker so the model knows something was removed
  • Compact — replaces the poisoned context with a checkpoint summary (v4 compaction/* transaction) so the model can't replay the same reasoning
  • Resume — auto-followups the same task with fresh sampling params — no new session, no restart

All inside one agent loop — the model keeps working after rescue.

Install

GUI (recommended)

Open Plugins → Add plugin, search dsh-loop-recover, click Install.

CLI

dsh plugin --profile desktop add dsh-loop-recover
# then restart the app

Configuration

Everything is editable on the plugin page — no YAML needed. 32 fields grouped: Basics / Rescue / Resume / Intent / Detection / Detector (Advanced).

GroupKey fields
Basicsmode (rescue/cut/observe), watch, language, keepLanguage, marker, debugLog
RescuemaxConsecutiveRescues, compactOnRescue, stallCalls
ResumeretryTemperature, retryReasoningEffort, retryRequests
IntentintentEnabled, 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).

Why not other loop plugins

Different tools solve different problems — don't stack them:

PluginWhat it doesConflict
dsh-agent-loop-guardCuts at loop detection, stops turnBoth wrap llm/stream → double-cut, confused state
dsh-client-auto-continueResumes after interruptionTriggers extra resume → two conflicting continuation commands
dsh-session-shiftContext-pressure compaction → new sessionOverlapping rescue → one compacts while the other shifts

Disable them when using this plugin.

How it works

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.

Development

npm test        # 66 unit + integration tests
npm run check   # plugin load smoke

License

MIT · NOTICE for upstream attributions (dsh-compaction helpers adapted).

Comments

Loading…

From the same category

billion-context

by ranxianglei

基本稳定可用 100K tokens is enough. Universal context-compression proxy for ALL AI coding agents,10w上下文足矣

Sessions & MessagesManifest valid

★ 3.6k

↓ 788.3k/wk

MIT

TypeScript

Nov 2, 2026

dsh plugin --profile web add billion-context

A DeepSeek coding agent harness: persistent shell, Ultra subagents, auto approval, Chrome MCP and session telemetry

Sessions & Messages

★ 1k

MIT

JavaScript

Index only — not installable

by Han-1413141

DeepSeek Harness session cost meter plugin: session/daily cost, budget, history, OpenCode Go quota, official & custom-provider balance, Codex-like token heatmap, peak/off-peak pricing with pre-switch

Sessions & MessagesManifest valid

★ 596

↓ 26k/wk

MIT

JavaScript

Nov 1, 2026

dsh plugin --profile web add dsh-cost-meter

by Yuuyuko-uu

DSH 鱼的记忆:给会话一份会淡忘的长期记忆,每条都带时间

Development & InfrastructureMemory & ContextSessions & MessagesManifest valid

★ 451

MIT

JavaScript

Nov 1, 2026

dsh plugin --profile web add dsh-fish-memory

by MichengAI

DSH Archive Manager — 在 DeepSeek Harness 中安全查看、恢复和管理已归档会话 · Safely view, restore, and manage archived sessions in DSH

Sessions & MessagesManifest valid

★ 276

↓ 30.5k/wk

Apache-2.0

JavaScript

Nov 2, 2026

dsh plugin --profile web add @michengai/dsh-archive-manager

by Nwflower

Import 14+ external agent chat histories (Claude Code, Codex, ChatGPT, Cursor, Gemini, Reasonix, opencode, ZCode, Grok Build, OpenClaw, Pi, Hermes, Kimi CLI, DSH) into DeepSeek Harness as resumable se

Sessions & MessagesManifest valid

★ 274

↓ 5k/wk

MIT

JavaScript

Oct 31, 2026

dsh plugin --profile web add dsh-chat-import