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_kill to 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 / provider parameters.
  • 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 dsh kernel, it supports codex, claude, and codebuddy.

Installation and Enablement

This plugin is a pure ESM package and is installed by mounting the package directory.

  1. 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’s node_modules must 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"
  1. Add to the configuration file
    Add the package to the dsh.profile.bundles list 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) and approval_policy: never.
  • CodeBuddy engine: Requires installation; the default model is hy3 (can be overridden via config.codebuddyModel / $CODEBUDDY_MODEL).
  • Claude engine: The continuable feature depends on the official Anthropic API. If the Claude CLI is configured with a custom backend (for example, an AnthropicBaseURL pointing to a third-party/local endpoint), sessionId + persistSession may hang or become unavailable. Reliable resumption requires AnthropicBaseURL to 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.