Preface¶
By default, the DeepSeek Harness subagent / subagent_fork tools force child agents to inherit the parent preset. This plugin replaces that behavior and provides a custom subagent provider whose asynchronous child setup calls agentPresets.mount(childCtx, <preset>), allowing the child agent to fully adopt the target preset’s complete configuration: identity, prompt sections, skill catalog, and tools.
Introduction¶
This is a global DeepSeek Harness plugin that lets you dispatch one-shot subagents from any session, fully mounted on any agent preset. It supports per-call model/provider overrides and provides model availability pre-checks.
Core Features¶
- Runs in the background by default, with parallel dispatch: The call immediately returns a task ID; the conversation can continue with other work or dispatch more subagents in parallel; aborting the conversation does not cancel the subagent (use
job_killto stop it). - Full preset mounting: The subagent runs under the complete configuration of the target preset, not a simple copy of the identity.
- Per-call model/provider overrides: Route the subagent’s LLM calls to a different model from the current session via the
model/providerparameters. - Model availability pre-checks: Invalid models fail fast and return the provider’s candidate list, rather than causing ambiguous subagent failures.
- Official subagent ecosystem: Supports one-shot lifecycle events, UI rows, and traces.
- Idempotent provider registration: Multiple presets can be mounted on the same row; the host flat provider registry does not duplicate.
- External engine support: In addition to the default
dshkernel, it supportscodex,claude, andcodebuddy.
Installation and Enablement¶
This plugin is a pure ESM package and is installed by mounting the package directory.
- Mount the package directory
The plugin statically imports@deepseek-ai/*packages, which are resolved from the package location via Node ESM. A symbolic link to the Harness installation’snode_modulesmust be created in the plugin directory.
Windows (BAT):
mklink /J "<plugin-dir>\node_modules" "<harness>\resources\host\node_modules"
POSIX (Linux/macOS):
ln -s "<harness>/resources/host/node_modules" "<plugin-dir>/node_modules"
- Add to the configuration file
Add the package to thedsh.profile.bundleslist in the configuration file (for example,<dshHome>/profiles/web/package.json).
{
"dependencies": { "dsh-routed-subagent": "link:<plugin-dir>" },
"dsh": { "profile": { "bundles": ["...", "dsh-routed-subagent"] } }
}
The cordis.patch.yml file is inside the package and registers the plugin; when the package is listed in bundles, this layer is applied automatically.
Typical Usage¶
subagent_routed is the main tool.
Background one-shot run (default):
subagent_routed(prompt="Use the dev engineer standard to review this repository", preset="dev", description="dev review")
Fork (inherits completed turns from the current session):
subagent_routed(prompt="Continue the review", preset="dev-reviewer", description="follow-up", fork=true)
Continuable (persists the child agent ID for later resume):
subagent_routed(preset="dev", prompt="Audit this repo", description="audit", continuable=true)
Parameter behavior:
- If preset is invalid/unresolvable: returns an error with a list of available preset IDs.
- model / provider: per-call model/provider overrides (candidates are listed on fast failure).
- max_tokens: output/token limit for the subagent’s LLM calls.
- tool_filter: deny mask on top of preset tools ({ deny: string[] }).
- fork + continuable: supported (a continuable fork seeds the parent’s completed turns).
Notes¶
- Repository: GitHub only; not published to npm.
- Compatibility: Targets DeepSeek Harness rc.7+ (the asynchronous child setup this plugin relies on is a newer Harness behavior).
- Codex engine: Requires login (
codex login) andapproval_policy: never. - CodeBuddy engine: Requires installation; the default model is
hy3(can be overridden viaconfig.codebuddyModel/$CODEBUDDY_MODEL). - Claude engine: The
continuablefeature depends on the official Anthropic API. If the Claude CLI is configured with a custom backend (for example, anAnthropicBaseURLpointing to a third-party/local endpoint),sessionId + persistSessionmay hang or become unavailable. Reliable resumption requiresAnthropicBaseURLto point to the official API.
Conclusion¶
This plugin provides flexible subagent dispatching capabilities for DeepSeek Harness, allowing subagent capabilities to be extended through external engines (such as codex, claude, and codebuddy) while preserving the DSH plugin architecture.
- Directory: bpc-oss/dsh-routed-subagent
- Source code: GitHub