ChatGPTClaudeGrok / X / CursorGemini

dsh-subagent-model-policy: A DSH plugin for managing subagent model selection in DeepSeek Harness

chenmudx/dsh-subagent-model-policy

Models & ReasoningVerified
Listed on 2026-11-09
Page last updated 2026-11-11

A DSH plugin that manages session-scoped subagent model selection policies, candidate model pools, concurrency and recursion limits, and records actual response evidence.

dsh-subagent-model-policy is a DSH plugin for DeepSeek Harness that addresses uncontrolled model choice and unbounded concurrency or recursion when delegating subagents. Within a single session it maintains a policy library, a candidate model pool and session-level concurrency and depth limits, while recording the policy used at creation together with real response evidence. Fixed-model, Agent self-select and the read-only follow-parent semantics each have clear boundaries, and the pool only lists host-allowed candidates so ticking them never expands authorization. Enabling it leaves the main model, other sessions' model choices and host authorization untouched, which suits developers who need fine-grained control over subagent behavior.

How to Install

install
npmdsh plugin --profile <your-profile> add @lienze/dsh-subagent-model-policy

Replace --profile with the profile name you actually run (see ls ~/.dsh/profiles/): usually web in the browser UI, desktop or desktop-NNN in the desktop app.

Category
Models & Reasoning
Platform
DSH Plugin
Author
chenmudx
Distribution
Plugin

dsh-subagent-model-policy Key Features

Fixed-model and agent-choice policiesSession-scoped candidate model poolConcurrency and recursion limitsRecords real response routing evidencePolicy and delegation tools
Listed on dsh-plugin.org

dsh-subagent-model-policy Repo Summary

What Does It Do?

Subagent Model Policy is a DSH plugin for DeepSeek Harness that manages subagent model selection per session, maintained by ChenMuDX under the MIT license and disabled by default. It solves the problem of uncontrolled model choice, unbounded concurrency and recursion when delegating subagents: inside a single session it manages a policy library, a candidate model pool and session-level concurrency/depth limits, and records the policy used at creation plus real response evidence. Enabling it does not change the main model, other sessions' model choices, or host authorization.

Core Features

  • Three policy semantics: fixed model uses only the selected model and errors instead of silently substituting; Agent self-select picks from the session pool subset and must state an exact provider/model; the legacy follow-parent policy is kept read-only.
  • Model pool management: lists only candidates the host currently allows, ticking them never expands host authorization, and refresh removes stale candidates and cleans stale policy references.
  • Session-level limits: concurrent subagent count and maximum recursion depth are shared session settings that do not change when switching policies, and real delegation is bounded by both host and session limits.
  • Execution evidence: distinguishes actual response routing from planned request routing and pending state; subagent self-reports and request config never replace real response evidence.
  • Agent tools: subagent_policy reads policies, model notes and injection previews; delegate_with_policy creates local fresh/fork subagents and returns the child session id.

How to Use This Plugin?

After enabling it in DSH, open the panel from the policy button in the session title bar or the same-named tab in the right sidebar, which has three pages: policy selection, model pool and execution insights. Tick candidates and set session concurrency and recursion limits in the model pool, then turn on and save a policy on the policy page; once an active policy is saved, new content takes effect on the next main-agent model call. When delegating, self-select mode requires an exact provider/model plus a one-line rationale; native entries such as subagent only perform admission checks, so switch to delegate_with_policy when they cannot specify a target model. Disabling a policy does not delete it, change the main model, or terminate subagents already created.

How to Troubleshoot This Plugin?

Delegation errors under a fixed-model policy usually mean the target model does not match the selected one; the plugin never silently substitutes, so adjust the policy or switch to self-select mode. A rejected candidate removal means that candidate is referenced by an active policy, so adjust or disable the policy first. Writes rejected while saving an active policy, enabling a policy or saving limits usually mean host capacity could not be read; keep the active content as prompted and retry. A rejected native entry usually means that entry cannot specify a target model, so use delegate_with_policy instead.

This page is an independent rewrite of the plugin's official README — for authoritative documentation and the latest changes, refer to the source: chenmudx/dsh-subagent-model-policy. The plugin is third-party code that runs on your machine once installed; inclusion does not imply endorsement — please review the source before installing.

Install, update, and uninstall this plugin in the Plugin Market of DeepSeek Harness's DSH Plugin Hub
ChatGPTClaudeGrok / X / CursorGemini

DSH Plugin FAQ