DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Loop Guard — DSH Plugin for DeepSeek Harness
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins
L

dsh-loop-guard

Loop Guard

Result-aware stuck-loop guard for DeepSeek Harness: advisory nudges plus a monotonic hard stop. Only repeats with identical results count, so progressing polls and post-edit re-reads never trigger.

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:erdholion/dsh-loop-guard#de00fedba7e2de23f96085526263a6e9a67b33e9
READMECompatibilityVersions

Compatibility and provenance

Loop Guard is published as dsh-loop-guard and currently resolves to version 0.1.0. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
any
Release source
github
Registry updated
8/31/2026

Versions

0.1.0stable
8/31/2026
Latest
0.1.0
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
any
License
MIT
Source
github
GitHub
★ 0
Weekly downloads
0
Last push
8/31/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

README

dsh-loop-guard

Result-aware stuck-loop guard for DeepSeek Harness: advisory nudges plus a monotonic hard stop.

Why

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:

  • polling a job status that progresses → results differ → never triggers
  • re-reading a file after an edit → result differs → never triggers
  • retrying a flaky command that eventually behaves differently → never triggers

How it relates to @deepseek-ai/dsh-repeat-tool-reminder

The official base bundle already ships an advisory repeat detector. This plugin is complementary, not a replacement:

repeat-tool-reminder (official)dsh-loop-guard
Chain identitytool name + argumentstool name + arguments + result
Progressing poll loopstrigger reminders (unless excluded by pattern)transparent, never trigger
Enforcementnever — advisory only, by designdenies further identical calls at the hard threshold
A model that ignores remindersloops until the turn/budget diesstopped, 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.

Install

dsh plugin --profile <name> add github:erdholion/dsh-loop-guard

Or from a local checkout: dsh plugin --profile <name> add ./dsh-loop-guard.

Behavior

Per agent, the guard tracks the run length of consecutive tool calls with identical (name, canonically key-sorted arguments) and identical result content.

  • Soft stage (run ≥ 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.
  • Hard stage (run ≥ 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.
  • Reset: a genuine user interjection (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.

Config

- 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.

License

MIT