Introduction

In DSH’s (DeepSeek Harness) plugin-based ecosystem, handling complex tasks, a single Agent often struggles to balance exploration, editing, verification, and testing. If file system tools are exposed indiscriminately, context usage can quickly inflate, and model scheduling easily becomes chaotic. dsh-solo-agent is a plugin that addresses this issue. It injects a solo preset into the user’s agent-presets and optimizes context usage and model scheduling through strict permission control and a closed-loop scheduling mechanism.

Plugin Purpose

  • Name: dsh-solo-agent
  • Author: TheHeartFickle
  • Category: Model Inference
  • License: MIT

This is a DSH plugin whose core functionality is injecting a solo preset into the user’s agent-presets. It isolates the tool permissions of the main Agent from those of subagents to implement closed-loop scheduling, thereby controlling context size without sacrificing task complexity.

Core Design

The Solo Main Agent as Orchestrator

The Solo main Agent is a pure orchestrator and does not include file system (shell/fs) or content editing tools. In the model-visible tool catalog, tools such as bash, pwsh, read, write, edit, glob, grep, and str_replace_editor are hidden.

The Solo main Agent retains only essential tools: ask_user_question, todo_write, skill, and the 4 front-facing subagent tools. File system and shell tools are mounted by solo-bootstrap.mjs at the preset layer and are available only to subagents.

Closed-Loop Scheduling Mechanism

The plugin implements a closed-loop scheduling workflow where different subagents collaborate through division of responsibilities:

  1. subagent_explore: responsible for read-only research, initialized once, and produces target test cases, test commands, and root-cause analysis.
  2. Iteration loop (max 5 rounds):
    • subagent_editor: focuses on code editing and does not self-test.
    • subagent_general: responsible for executing tests and returning raw output.
    • Decision: The Solo main Agent makes decisions based solely on the raw test output returned by subagent_general.
  3. Adversarial Verification: when large changes or high-risk operations occur and tests pass, launch subagent_verify for adversarial verification, returning PASS/FAIL/PARTIAL.

Subagent Minimal Anchoring

The plugin draws on the anchored-standard mechanism to implement minimal anchoring for subagents. This mechanism applies only to subagents with delegationDepth > 0. This means the Solo main Agent itself is not subject to anchoring restrictions, preserving flexibility for global scheduling.

Compaction Features

The plugin enables a set of compaction features by default to optimize context:
* dsh-compaction-basic
* dsh-compaction-tool-result-pruner
* dsh-command-compact

Role Division

The plugin maintains a role registry in lib/roles.js. The responsibilities and tool visibility for each role are as follows:

Role Responsibility Visible Tools Skill
subagent_explore Read-only research, producing target tests / test command / root-cause read, read_image, glob, grep, bash, web_search, web_fetch None
subagent_editor Focus on edits without self-testing read, write, edit, str_replace_editor, glob, grep, bash None
subagent_verify Adversarial verification, returning PASS/FAIL/PARTIAL read, read_image, glob, grep, bash, skill Yes
subagent_general Miscellaneous work / test execution, returning raw output read, write, edit, str_replace_editor, glob, grep, bash, web_search, web_fetch, skill Yes

Project Structure and Typical Usage

The plugin injects the solo preset into the system through configuration in dsh.plugin.json. Its internal structure includes the following key files:

  • dsh.plugin.json: plugin manifest, defining contributes.presets = ["solo"].
  • lib/index.js: responsible for writing or updating ~/.dsh/.agent-presets/solo.
  • templates/solo-bootstrap.mjs: responsible for subagent minimal anchoring logic and main Agent directory filtering.
  • templates/compaction-epoch.mjs: for post-compaction re-anchoring epoch tracking.

Developers can use the following commands to test and package it:

npm test
npm run package:registry

Use Cases and Notes

  • Use Cases: scenarios requiring a highly structured workflow, sensitivity to context size, and tasks that need clear division of responsibilities (exploration-editing-testing-verification).
  • Notes:
    • The Solo main Agent is not affected by anchoring; this is key to its global scheduling.
    • Compaction features depend on external plugins (such as dsh-compaction-basic), so make sure these dependencies are installed.

Summary

dsh-solo-agent provides a rigorous Agent division-of-labor and scheduling solution. By restricting the main Agent’s tool permissions and introducing a closed-loop verification mechanism, it effectively addresses context usage and model scheduling issues. For advanced users who need fine-grained control over agent behavior, this is a DSH plugin worth trying.