Introduction

When developing agents with DeepSeek Harness (DSH), balancing compute cost and output quality is a common need. Using an expensive model throughout can make the cost too high, while using a cheap model throughout may reduce quality. The dsh-escalation-advisor plugin provides a middle ground: it runs the cheaper model in most cases and borrows a stronger DSH model only when necessary for “consulting” or “escalation.” The consultation process runs as a visible DSH sub-session, rather than a hidden LLM request, making debugging and auditing easier.

What It Is

dsh-escalation-advisor is a DSH-specific plugin maintained by zhangqian98 and released under the MIT License. By creating visible sub-sessions in the task tree, it allows users to inspect consultation records, tool calls, token usage, and final results. The plugin supports three operating modes and allows different override policies to be configured for different agent types (the main agent and local subagents).

Core Features

Three Operating Modes

The plugin supports the following three modes:
* manual: Provides only the consult_advisor interface, with no automatic consultation.
* escalate: The default mode, providing manual consultation and deterministic stuck/failure scoring.
* continuous: Performs shadow review at natural turn boundaries.

Override Policies

Override policies can be configured independently for the main agent and local DSH subagents:
* Manual: Enabled for both the main agent and local subagents.
* Automatic Escalation: Enabled for both the main agent and local subagents.
* Continuous Review: Enabled by default for the main agent and disabled by default for local subagents.

Completion Review

Completion Review is an independent trigger that runs when an agent is preparing final delivery. It checks whether the task is ready (objectives, success criteria, changed files, etc.) and guides the agent through concern/blocker. This feature is disabled by default.

Advisor Profiles

The plugin supports configuring named Advisor Profiles, including ID, label, model routing, and tool policy. When an agent consults, it selects a Profile. That Profile is locked after the first consultation, and subsequent attempts to switch profiles or remove tool permissions are rejected.

Session Override

Versioned advisor/policy records can be set through the UI header panel or the command line, including mode presets, timeouts, tool allow/deny lists, trigger switches, and so on. Unset items follow the global defaults.

Installation and Enablement

Before installing, confirm the DSH version. The plugin supports DSH 0.1.2-rc.1, 0.1.5-alpha.2, and 0.1.5-rc.1. CI checks Node.js version 22.19+.

Install using npm:

dsh plugin --profile web add dsh-escalation-advisor@0.1.0-alpha.29
dsh web

Alternatively, install from GitHub source:

dsh plugin --profile web add github:zhangqian98/dsh-escalation-advisor#v0.1.0-alpha.29

After installation, configure the strong model routing in Settings → Plugins → DSH Escalation Advisor. The plugin stores only provider/model routing IDs and reuses the authentication credentials already configured in DSH Models.

Typical Usage

Manage Policies

Use the following commands in the session to manage policies and triggers:
* /advisor catalog: View or configure Advisor Profiles.
* /advisor-trigger <trigger> <on|off|inherit>: Toggle the state of triggers such as manual, automatic escalation, or completion review.
* /advisor-tool <tool> <on|off|inherit>: Control allow/deny policies for tools.

Configure Profiles

Configure Advisor Profiles in global settings, specifying ID, label, model routing, and tool policy. When calling consult_advisor, the agent specifies which Profile to use through the advisor_profile parameter.

Use Cases and Notes

This plugin is suitable for developers who need fine-grained control over cost and quality in DSH environments. The plugin runs with the permissions of the current DSH process; before installing, check the source code and license (MIT). Notes:
* Sub-session exclusion: Advisor sub-sessions themselves are not subject to manual consultation, escalation scoring, or continuous review, preventing recursive consultation.
* Default settings: Completion Review and local-subagent continuous review are disabled by default to prevent amplified strong-model calls.
* Historical compatibility: When upgrading to 0.1.5-rc.1, it is recommended to back up first and run the included maintenance script scripts/patch-dsh-history.mjs to handle history from older versions.

In Short

dsh-escalation-advisor helps DSH users improve output quality while keeping costs under control by providing a visible and configurable second-opinion mechanism. For more details, refer to the GitHub repository.