dsh-agent-teams-optimizer: Configure the actual teammate admission limit for Agent Teams

Preface

When using the official Agent Teams in DeepSeek Harness (DSH), the Lead is subject to the maxMembers constraint on TeamRoster when creating persistent teammates via spawn_teammate. The common configuration in the official agent-team profile is maxMembers: 8; if not overridden in the profile, the underlying TeamService defaults to 16. Relying solely on prompts to instruct the model to “use more teammates” does not raise this hard limit—a ninth teammate with a different name may still fail at the admission check.

dsh-agent-teams-optimizer (maintained by Soulize, GitHub repository Soulize/dsh-agent-teams-optimizer) is an independent DSH plugin used to configure the actual admission limit for Agent Teams teammates: it modifies the value involved in the validation when spawn_teammate creates a new teammate, rather than just changing the model-side wording. The community catalog classifies it as admin-security; you can view the entry on the SkillHub plugin page (the catalog is a community site and has no official affiliation with DeepSeek / High-Flyer).

What is this

The plugin version is 0.1.0 in package.json, licensed under MIT. It depends on the official experimental Agent Teams service (@deepseek-ai/dsh-experimental-agent-team) and requires DSH >=0.2.0-rc.1 and Node.js >=22.19.0. The plugin defaults the limit to 16 and allows configuration to any safe positive integer.

Core Features & Behavior

Below is a description of the behavior consistent with the README and verifiable.

Counting Scope

  • The limit only counts teammates; the Lead is not included.

Cumulative Roster, Not Concurrency

  • This is a cumulative, immutable roster limit, not a limit on “concurrent runs”. Failed or inactive members still occupy slots; increasing the limit is required to accommodate more members with different names. Lowering the limit does not delete historical members.

Scope of Effect

  • It modifies the actual TeamRoster admission field. Both existing teams and subsequent teams in the current Team service will be validated against the new value.
  • It does not change the limits for ordinary Subagents, workflows, or nested delegations.
  • The plugin remains idle when Agent Teams are not enabled; it automatically binds once the official agentTeams service is available.
  • After uninstalling or disabling the plugin, the original roster limit is restored only if no other components have modified the same field.

Relationship with Official Profiles

  • The plugin’s own bundle patch only inserts agent-teams-optimizer and deliberately does not override official Agent Teams configuration lines or other unrelated settings.
  • The official TeamService captures maxMembers when constructing the TeamRoster and has no public runtime setter; modifying the agent-team line in Cordis is the supported way to set the limit at service startup. This plugin provides an editable, hot-updatable UI by conditionally updating the existing roster’s maxMembers—this field is an undocumented internal field, not a stable DSH API. The adapter checks the official service and the writable field shape before changing the value; if future DSH internal structures change, it will log a warning and not pretend the configuration has taken effect. It does not replace spawnTeammate, monkey-patch tool handlers, or tamper with roster history.

Installation & Enablement

  1. Enable the official Agent Teams bundle first.

  2. Install this plugin under the same profile (command from the repository README):

dsh plugin --profile web add "github:Soulize/dsh-agent-teams-optimizer#main"
  1. Restart DSH after adding the plugin.

  2. Open Plugins → dsh-agent-teams-optimizer → agent-teams-optimizer → Configure in Web/Desktop, fill in the desired maxMembers, and save. The option is stored in the current profile; provided the official internal layout remains compatible, the change applies to the currently active Team service without requiring another restart.

If modifying the profile directly, you can add:

- id: agent-teams-optimizer
  config:
    maxMembers: 32

Do not compete for the same limit with the agent-team line in the profile at runtime. If both methods coexist, the optimizer treats the effective value seen at service mount as the restoration baseline. If only a stable, pure configuration is needed, you can use the official agent-team override (the patch replaces config entirely, so other official fields must be preserved):

- id: agent-team
  config:
    maxMembers: 32
    maxTasks: 256
    maxMessageBytes: 65536
    disposalTimeoutMs: 5000

Typical Usage & Verification

Log Confirmation

After the Team service is mounted in a compatible form, look for a line similar to the following in the DSH Host logs:

agent-teams-optimizer: maxMembers=32 (previous=8, official baseline=8, reason=service-mounted)

Functional Verification

Create more than 8 teammates with different names in the same Team; if the 9th creation succeeds, it indicates that the runtime limit has changed, rather than just the prompt level. Increasing the limit does not guarantee that the Lead will necessarily spawn more agents; model behavior is a separate matter.

Development-side Testing

Run the following in the plugin repository directory:

npm test

It uses the Node built-in test runner; the check script in package.json also performs syntax checks on lib/index.js, lib/limit.js, and lib/client.js and runs the tests.

Use Cases & Notes

Suitable For

  • Developers and operators who have enabled official Agent Teams in DSH and need to raise or standardize maxMembers without restarting or when modifying the entire official agent-team config is inconvenient.
  • Those who need to understand the “8 vs 16” difference: the official profile is often 8, while the service default is 16; this plugin defaults to 16 and can be increased as needed.

Must Do Before Installation

  • The plugin runs with current DSH process permissions; before installation, please read the GitHub source code and the MIT license to assess the risks of an admin-security plugin yourself.
  • It depends on undocumented internal fields. After a major DSH upgrade, you should re-check the logs and the “ninth member” test to confirm the adapter is still effective.

Conclusion

Following the steps above, you can adjust the actual teammate roster limit via the UI or the agent-teams-optimizer configuration item while preserving the official Agent Teams configuration lines, and perform runtime verification using logs and the “ninth teammate”. See SkillHub: dsh-agent-teams-optimizer for the entry and description, and GitHub: Soulize/dsh-agent-teams-optimizer for the source code and full README.

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

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

Xiaoye