dsh-retry-guard: Observing or Pausing the Next Step After the Same Tool Error Recurs Three Times

Introduction

When running agents in DeepSeek Harness (DSH), the model sometimes repeatedly submits the same set of invalid tool calls: missing parameters, failed edit validations, empty or non-existent tool names, expired MCP sessions, etc. The Harness returns these errors to the model per turn, but the conversation may continue, leading to multiple retry rounds of the same error, which wastes requests and makes timely intervention difficult.

The community plugin dsh-retry-guard (Maintainer: sjh9714, Category: Workflow) targets tool errors where the tool name, arguments, and failure content are completely identical for three consecutive times. By default, it only observes and prompts at the end of the turn; the optional Pause mode prevents the next model step from starting after the third failure, allowing you to inspect the original failure in the Trajectory, fix the cause, and then issue a new command in Chat. The following sections cover its positioning, capabilities, installation, and configuration.

What is this

dsh-retry-guard is an unofficial community plugin for DSH Web (MIT licensed, not endorsed by DeepSeek). In short: it observes identical tool failures and optionally pauses before the Harness’s next model step.

  • Package Name: dsh-retry-guard (published on npm; the alpha tag corresponds to the current pre-release; the version example in the materials is 0.1.0-alpha.2)
  • Supported Targets: DSH Web 0.2.0-rc.2, Node.js 24
  • No separate account, API Key, or network connection is required to run the plugin logic; however, access to the npm registry is needed when installing dependencies.

The DSH ecosystem emphasizes “everything is a plugin”; the SkillHub directory page and the GitHub repository are community-maintained and have no official affiliation with DeepSeek or High-Flyer.

Core Features

Trigger Conditions (Within the same agent and same turn)

Three consecutive failures must satisfy all the following conditions simultaneously (see the “Behavior” section in the README):

  • Same tool name
  • Arguments are consistent (JSON content after recursive key sorting)
  • Failure content is completely identical
  • “Failure” refers to DSH marking the tool result as isError: true (boundary cases such as ordinary Bash exit code 1 not falling under this are detailed in the repository documentation).

If there is a successful call in between, the count resets (e.g., MCP session errors behave this way in the bounded experiments mentioned in the materials).

Two Modes

Mode After the 3rd consecutive identical tool error
Observe (Default) Work continues; a Retry Guard notification appears at the end of the turn.
Pause (Requires manual enablement and saving) The next model step is not started; the notification includes the failed tool, count, time, and raw event/call references.

The plugin only identifies repeated errors and prompts or pauses; it will not automatically analyze or fix the cause. After fixing, you need to send a new command in Chat; failed calls will not be automatically replayed.

Maintainer’s Bounded Experiments (Non-production session statistics)

The maintainer conducted bounded experiments on DSH 0.2.0-rc.2 (2026-10-02) against failure modes found in seven public discussions (scripted model, real validators/agent loop, no API Key). The README table summary shows that in scenarios such as missing run_code descriptions, invalid Edits, empty tool names, and consecutive MCP session errors, Pause often reduces identical repeated calls from approximately 6 times to 3 times; Observe retains the 6 calls with an additional notification. Limitations such as failures with changed arguments each time, pure text loops, or old reports regarding Bash permissions not being reproduced or included in detection in the current version can be found in reported-cases.md.

Installation and Enablement

Prerequisites: DSH Web 0.2.0-rc.2 is already installed locally, running on Node.js 24. The published package contains pre-built JavaScript; no git clone or local compilation is required.

Install via DSH Web Interface

  1. Open Plugins → Add plugin, enter the package name below in Package name or address, and click Install.
  2. After installation, click Enable now (installing files alone does not enable the plugin).
  3. In Plugins, open the dsh-retry-guard bundle and enter its dsh-retry-guard component (Configure).
  4. Keep the default Observe; to block repeated failures, select Pause and click Save settings.
  5. Proceed with normal conversation; no separate command is needed to invoke Retry Guard.

Package name (from the source material):

dsh-retry-guard@alpha

To pin a specific version, the material provides the following example:

dsh-retry-guard@0.1.0-alpha.2

Terminal Installation

After installing via CLI, restart DSH Web, then open Configure to set the mode as described above:

dsh plugin --profile web add dsh-retry-guard@alpha

Note: You must install and activate the bundle via the DSH plugin manager; running npm install in an unrelated project will not take effect in DSH. DSH 0.2.0-rc.2 will not automatically update installed plugins; to switch versions, you must uninstall the old bundle, install the target version, and confirm the saved mode.

Local tgz Alternative

The early v0.1.0-alpha.1 archive is still available. After downloading the .tgz and SHA256SUMS, execute the following in the download directory:

dsh plugin --profile web add ./dsh-retry-guard-0.1.0-alpha.1.tgz

Typical Usage and Remediation Flow

No additional API is required after installation and enablement. When a tool returns the same error three times consecutively (e.g., the same validation failure due to missing parameters):

  1. Observe: Pay attention to the Retry Guard notification at the end of the turn; the conversation will continue.
  2. Pause: The next model step will not start after the third failure; note the tool name and record reference in the notification.
  3. View the original failure in the Trajectory (see the repository’s demo.md for a walkthrough; there is currently no one-click jump from the notification).
  4. Fix the root cause (arguments, edit content, MCP session, tool availability, etc.), then send a new user command in Chat to continue.

In the deterministic fixture provided by the maintainer: Observe results in 6 tool calls / 7 model requests; Pause results in 3 / 3, followed by one successful call after the remediation command—this is merely a fixture count and cannot be generalized as a promise of token savings. The demo GIF and 20-second recording use intentionally failing local tools and a scripted model, with no API Key required.

Use Cases and Considerations

More Suitable For

  • Developing or debugging agents on DSH Web 0.2.0-rc.2, where you frequently encounter completely identical tool errors being retried consecutively.
  • Users who wish to observe repeated failures first (default) and then enable Pause to forcefully halt steps after confirming the pattern.

Not Suitable For or Requires Alternative Solutions

  • Scenarios where arguments or text change with each failure, successful searches are repeated, ordinary Bash non-zero exits occur, only assistant text loops exist, or tool markup appears in ordinary text without generating native tool results (see reported-cases.md for descriptions of 12 scenario types).

Security and Trust

  • The plugin runs under the permissions of the current DSH process; before installation, it is recommended to read the GitHub source code and the MIT license to judge whether to include it in your workflow.
  • This is a community plugin maintained independently; installing dependencies requires registry access, but running the guard itself does not mandate external network access.

Conclusion

dsh-retry-guard turns “three consecutive identical tool errors” from silent retries into an observable, optionally stoppable checkpoint, making it suitable for controlling invalid tool loops in DSH agent workflows. Directory and Documentation:

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye