vlln/dsh-loop: Adding timed loop capability to DSH

Preface

In plugin-based agent environments like DSH, some tasks require sending a prompt back to the current agent at fixed intervals—for example, periodically checking status, following up on incomplete tasks, or allowing the model to continuously adjust across multiple rounds. vlln/dsh-loop addresses this scenario: it provides a /loop command, a loop tool, and an active status bar at the top of the chat page, while supporting multiple concurrent loops within a single session.

Below, we cover its features, installation, typical usage, and edge cases to be aware of.

Plugin Positioning

vlln/dsh-loop is a DSH scheduled-loop plugin, maintained by vlln, licensed under MIT. It is delivered via the dsh.bundle and dshClient channels, tagged as 0 patch.

It is suitable for tasks that require “periodically handing a prompt to the current agent for processing.” Loops exist only within the current harness process: they disappear when the process exits and are not persisted across restarts. This aligns with Claude Code’s /loop semantics.

Core Capabilities

loop Tool

The loop tool is designed for the model side and supports the following actions:

  • start: Starts a new loop
  • stop: Stops a specified loop or all loops
  • status: Checks status
  • list: Lists loops in the current session

The model can invoke the loop tool in each round, adjusting loop parameters based on the current state.

/loop Command

The following commands are available on the user side:

/loop [interval] <prompt>
/loop list
/loop stop <id>
/loop stop

Where:

  • /loop [interval] <prompt>: Starts a new loop
  • /loop list: Lists loops in the current session
  • /loop stop <id>: Stops the loop with the specified id
  • /loop stop: Stops all loops in the current session

Active Status Bar

The status bar is located in the dock slot above the input box on the chat page:

  • With a single loop, it displays the prompt, interval, and next run time
  • With multiple loops, it collapses into a count bar; click to expand the list

Multiple loops can run concurrently within a single session.

Installation and Activation

First, verify that the environment meets the requirements declared in package.json: Node.js >=22.19.0 and DSH >=0.1.0-rc.5.

Install from the git source:

dsh plugin --profile web add "github:vlln/dsh-loop#main"

This command adds the main branch of vlln/dsh-loop to the web profile.

If using the npm source, the example from the documentation is:

dsh plugin --profile web add @vlln/dsh-loop@0.3.0

Note: The README recommends installing @vlln/dsh-loop@0.3.0 from the npm source, while the version in package.json is 0.3.1. There is a version discrepancy in the documentation; verify the target source before actually installing.

After installation, restart web for it to take effect, since bundles are combined at startup. You can then disable/enable it in the Plugins panel on the settings page, which takes effect at runtime and persists.

Typical Usage

User Side

The following examples illustrate the basic flow from starting to stopping.

Start a loop with a 5m interval, delivering the prompt check PRs on the deploy branch:

/loop 5m check PRs on the deploy branch

View which loops exist in the current session and their ids:

/loop list

Stop the loop with the specified id:

/loop stop loop-1

Stop all loops in the current session:

/loop stop

Model Side

The model can initiate or check loops via the loop tool.

Have the model start a loop with a 2m interval and prompt fix flaky test:

loop action=start prompt="fix flaky test" interval="2m"

Check loop status:

loop action=status

Stop the specified loop:

loop action=stop loop_id="loop-2"

Applicable Scenarios and Considerations

Suitable for:

  • Developers who need scheduled polling or periodic task follow-up in DSH web sessions
  • Users who want the model to invoke the loop tool in each round and adjust loop parameters based on the current state

Notes:

  • Loops are process-local: after the current DSH harness process exits, loops disappear; do not use this in tasks that require persistence across restarts
  • The plugin runs with the current dsh process’s permissions. Review the source code, license, and installation source before installing
  • The community directory is a standalone site; the dshfind directory page mentioned here is not an official app store of DeepSeek or 幻方

Links

  • GitHub: https://github.com/vlln/dsh-loop
  • Plugin directory page: https://dshfind.com/en/plugins/vlln/dsh-loop?ref=badge
羽毛球分组比赛记分
小程序二维码

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

Xiaoye