dsh-team-mode: Packages team collaboration as an optional mode and uses execution layer guards to restrict Leads from writing code.

Preface

When building multi-agent collaboration in DeepSeek Harness (DSH), two problems commonly arise: (1) Agent Teams capabilities tend to hang off the profile, so every session carries the Team tools and delegation surfaces such as subagent, which makes it easy for the model to pick the wrong path among many; (2) enforcing the “Lead only decides, does not write code” rule via prompts alone is unreliable — the Lead can still call write / edit, so the division of labor easily degrades into a single agent doing everything.

Below we introduce the community plugin dsh-team-mode (maintainer: running-grass, category: workflow). It provides an agent preset called team: when “Team Mode” is explicitly selected in the mode selector, the Lead handles decision-making, dispatch, and acceptance, while concrete reads, writes, and changes are handed to short-lived workers. The Lead’s write / edit calls are rejected at the execution layer rather than merely discouraged by persona.

What Is This

dsh-team-mode is a DSH plugin whose core deliverable is a team agent preset. After installation, when you select “Team Mode” when creating a task:

  • The delegation surface keeps only two paths: workflow (temporary tasks) and spawn_teammate (long-lived teammates that accumulate context); anonymous subagent / subagent_fork no longer appear.
  • The Lead can still use read / glob / grep / bash for read-only exploration and acceptance; write / edit are rejected at the execution layer.
  • Workers are dispatched by the Lead via mechanisms such as agent(), and the model can explicitly specify provider / model at call time.

The plugin is currently version 0.1.0, licensed under MIT, with the runtime entry point at lead-boundary.js, which injects preset configuration into the DSH bundle via cordis.patch.yml.

Directory page: SkillHub - dsh-team-mode
Source code: GitHub - running-grass/dsh-team-mode

Core Features

An Optional Mode, Not a Hard Binding on the Entire Profile

Team-related capabilities are contained in an optional preset. Only sessions that select “Team Mode” follow this persona and delegation rules, avoiding entanglement with the tool surfaces of other modes.

Execution-Layer Boundary (lead-boundary.js)

The plugin registers tools.guard() on each Lead’s Agent context, rejecting Lead calls to write / edit by tool name before the tools actually execute. The README explains: on DSH 0.2.1-alpha.1, testing showed that tools.restrict() cannot reliably hide tools inherited by the agent, so a guard is used instead.

The boundary only takes effect when both of the following conditions are met, avoiding false positives in other modes:

  1. The currently running preset is team (read from agentPresets.composedPreset).
  2. The team roster reports that this agent is the Lead.

Two Dispatch Channels

Scenario Channel Description
Temporary tasks: research, one-off edits, running tests, batch scanning workflow’s agent() A brand-new worker that does not enter the roster and is discarded after completion
Context that needs to accumulate across multiple dispatches spawn_teammate Occupies a roster slot; names are not released after being taken, so it is not suitable for one-off tasks

Built-in Roles (Written Into Worker Prompts)

The Lead simply writes the role name into the worker’s prompt at dispatch time:

Role Purpose
scout Read-only reconnaissance: locate files, answer structural questions
explorer Judgment-driven investigation: compare options, find root causes, assess change risks
builder Execute changes within a given file scope and acceptance method
verifier Adversarial review; must attempt to falsify the result
sweeper Mechanical batch work: renaming, pattern audits, multi-file summaries

Installation and Activation

The official installation command (from the README):

dsh plugin --profile web add github:running-grass/dsh-team-mode

After installation, you must restart DSH (plugin changes require a process restart to load the new JS modules). Then, when creating a new task, select “Team Mode” from the mode selector.

Prerequisites: this mode combines DSH’s experimental Agent Teams capability. The profile must already include @deepseek-ai/dsh-experimental-agent-team-profile (or at least the agent-team and tool-agent-team packages); otherwise, tasks dispatched via Team tools may wait forever for the agentTeams service.

The equivalent manual approach is to add the preset-team snippet shown in the README to $DSH_HOME/profiles/web/cordis.patch.yml (you need to copy the complete plugins list from an existing patch). The Node engine requirement is >=20.

Typical Usage

The README does not provide a fixed one-click example script. The reproducible workflow is:

  1. Install and restart DSH using the command above, and confirm that the profile already has the experimental Agent Teams packages.
  2. Create a new task and select “Team Mode”.
  3. The Lead chooses workflow’s agent() or spawn_teammate according to the nature of the task, and specifies a role name from the table above in the worker prompt (e.g., scout to locate things, builder to make changes, verifier to review).
  4. When cost control is needed, explicitly pass provider / model for the worker inside agent(), while the Lead side can use a higher-capability model for decision-making and acceptance.

Ultimately, the Lead should still verify worker outputs itself via read / grep / bash (within policy-allowed scope).

Suitable Scenarios and Caveats

Suitable for: developers who want multi-agent division of labor in DSH, want a clear separation of responsibilities between Lead and workers, and do not want the entire web profile permanently tied to the Team tool surface.

Known limitations (from the README):

  • The Lead can still see the schemas of the banned tools; the guard only blocks execution. Low-cost models may mistakenly call write / edit first and only see the rejection message afterwards.
  • bash is not a hard boundary: after write / edit are rejected, the Lead may still write files via shell redirection; the persona forbids it, but the mechanism is not fully sealed.
  • The preset’s plugins list is derived from a certain version of DSH’s built-in standard preset. After upstream changes, you need to manually align cordis.patch.yml and run npm test.
  • It depends on @deepseek-ai/dsh-experimental-*, and the contract is not guaranteed to be stable.

Security and trust: the plugin runs with the current DSH process’s privileges. Before installing, please read the GitHub repository source code and the MIT license. SkillHub and similar sites are community directory sites and have no official affiliation with DeepSeek / High-Flyer.

Closing

dsh-team-mode turns Agent Teams into an optional “Team Mode” and enforces “Lead does not write code” via an execution-layer guard, while preserving two clear delegation paths — workflow and spawn_teammate — plus five built-in roles. If you are orchestrating multi-agent workflows in DSH, you can learn more from the directory page or GitHub and install it following the README.

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

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

Xiaoye