Introduction

The core design of DeepSeek Harness (DSH) is “everything is a plugin”. When developing agents that require periodically executed tasks, manually writing scheduling logic is often cumbersome and error-prone. The dsh-loop plugin was created specifically to address this problem. It provides agents with a user-friendly /loop slash command for managing scheduled loop tasks.

Plugin Purpose

This is a DSH plugin maintained by developer XiaoWind. By injecting a command service, it adds a scheduled loop executor to agents. Through this plugin, developers can directly control an Agent’s loop behavior in the Web interface without writing complex scheduling code.

Core Features

The plugin primarily includes the following capabilities:
* Scheduled loop command: Provides the /loop slash command and supports immediately executing the first tick.
* Persistent configuration: Loop configurations are retained after restart and can be resumed with /loop resume.
* Flexible time settings: Supports time units such as ms, s, m, h, and d, and supports combined durations (e.g., 1h30m).
* Manual control: Supports ending the loop via /loop stop or by destroying the Agent.
* Status queries: Provides /loop status and /loop help to view the current running status.

Installation and Activation

Install using the dsh plugin command. Because the plugin depends on the command service, it is only activated in Profiles that include a command adapter (such as the web profile).

dsh plugin --profile web add git+https://github.com/XiaoWind/dsh-loop.git

After installation or update, the Web application must be restarted because the plugin layer is loaded at startup.

Typical Usage

The plugin provides a set of slash commands to control the loop:

Command Effect
/loop 30m Execute once immediately, then run every 30 minutes.
/loop 30m fix the tests Set a loop with a 30-minute interval and the goal of fixing tests.
/loop fix the tests Use the default interval with the goal of fixing tests.
/loop 1h30m Use a combined duration (1 hour 30 minutes).
/loop resume Resume the loop configuration saved before the last restart.
/loop status Display the current running loop status.
/loop stop Stop the current loop.
/loop help Display help information.

The syntax rule is: the first argument is an optional time interval, and the remaining part is the loop goal. If the time interval is omitted, the default interval is used.

Configuration

If no time interval is specified, the plugin uses the default value. You can change this default in the configuration file:

# cordis.patch.yml
- id: loop
  config:
    defaultIntervalMs: 900000

The default interval is 600000 milliseconds (10 minutes).

Notes

  • Runtime environment: The plugin runs with the permissions of the current DSH process. It is recommended to inspect the source code and license before installing.
  • Activation condition: It only takes effect in Profiles configured with a command adapter.
  • File storage: Loop configurations are persisted in the $DSH_HOME/dsh-loop/<sessionId> directory.
  • No automatic completion detection: The plugin does not include automatic completion detection. End the loop manually or by destroying the Agent.
  • Single file: This is a single-file ESM plugin with no build steps.

Summary

dsh-loop addresses the need for periodic agent tasks with a simple command interface. It leverages DSH’s plugin mechanism to make scheduled execution lightweight and easy to manage. The project source code is hosted on GitHub and can be accessed via the link.

  • GitHub: https://github.com/XiaoWind/dsh-loop