dsh-plan-and-execute: On-Demand Planning and Dual-Model Execution

Preface

In DeepSeek Harness (DSH), a common approach for Agent sessions is to fix a single model to handle comprehension, planning, and code modification. This suffices for simple Q&A; however, as tasks lengthen and steps increase, you either rely on a slower reasoning model throughout or force a fast model to handle everything, lacking the division of “thinking clearly before acting.” The community has seen similar plugin concepts (e.g., the Mids lines), but maintenance and scattered presets can increase switching costs.

dsh-plan-and-execute (UI name P&E) is a workflow plugin for the official DeepSeek Harness Desktop, maintained by Yaaaaaaa233. It merges “Fast” and “Expert” routes into a single preset: simple tasks are executed directly as much as possible, while complex tasks invoke a configurable planning model; execution and planning models (and reasoning levels) can be selected independently. The current package version is 0.3.6, compatible with DSH 0.2.0-rc.2; the README states it is currently verified on macOS Apple Silicon, with other desktop platforms unverified. Users of the legacy Web 0.1.6-alpha.1 should continue using plugin 0.1.9 and must not install this version.

What is this

In one sentence: On-demand planning—the execution model first determines if planning is needed; when required, the planning model generates a scheme, which is then handed back to the execution side for implementation; “Expert” mode places discussion, planning, and acceptance in the main session’s planning model, while implementation is delegated to an execution sub-agent with an independent persona.

The plugin is categorized as a workflow; repository: Yaaaaaaa233/dsh-plan-and-execute, License: MIT. Community directory page: skillhub.cn plugin page (independent site, with no official affiliation with DeepSeek or High-Flyer).

Core Features

Two Operating Modes

Fast: Prioritizes the execution model to handle each user request and determine if planning is needed. When planning is required, it calls mids_plan; the planning model gathers context via read-only tools and calls mids_submit_plan; the next step reverts to the execution model. Even if the planning model only outputs a textual plan, it returns control to the execution model. The execution model implements and verifies within the same session.

Expert: The main session uses the planning model for every turn. The main session can only check, discuss, and dispatch; implementation and command execution are delegated to an execution sub-agent. Dispatch explicitly passes the execution model, reasoning level, and an independent persona. A sub-session is created only after verifying the model, and it does not inherit the planning model’s actual call route. Sub-agents are forbidden from further dispatching. By default, it waits for execution results; independent work can use background sub-agents, tracked via the official send_message, list_agents, and interrupt_agent.

At the start of each turn, the main session reads the saved combination; the current turn’s planning, execution, tool restrictions, and dispatch uniformly use this snapshot. Changing configuration does not clear conversation history.

Default Models and Interface

The default execution route is deepseek-official/deepseek-flash, and the default planning route is mimo/mimo-v2.6-pro; both models must be configured in DSH. The default combination can be modified in Settings → Built-in Plugins → P&E.

P&E mode displays a dedicated status control via the official conversation.input.model slot. The input bar continues to show the model last invoked in the main session; hovering allows viewing the saved combination. Common DeepSeek Flash names display as DS V4.1 F, while custom model display names are preserved.

Context Compression

Session configuration and plugin defaults offer Follow Current Model / Use Planning Model (default is Follow Current Model, consistent with official behavior).

  • Follow Current Model: Uses the model from the most recent actual request to generate summaries.
  • Use Planning Model: Main session auto-compaction and manual /compact use the session’s planning model and selected reasoning level. Saving a new combination takes effect in the next turn; manual compression while idle reads the saved configuration immediately.

Execution sub-agents retain official compression behavior. Auto-compaction calculates trigger thresholds and recent retention budgets based on the smaller context window of the execution and planning models.

Relationship with Legacy Plugins

Starting from 0.3.1, the package name changed from dsh-adaptive-plan to dsh-plan-and-execute. When migrating from Mids·Fast, the original preset ID mids-fast, tool names mids_plan / mids_submit_plan, etc., are retained. If dsh-mids-fast already exists in your Desktop profile, remove the old package first to avoid duplicate preset registration. See the repository’s Migration Guide for detailed steps.

Installation and Activation

The plugin installs to the current desktop profile; reading the repository source and MIT license before installation is recommended. DSH plugins run under Desktop process permissions, consistent with the capabilities granted to the Agent in the Harness.

Launch the official Desktop once to initialize the profile, then fully quit the desktop app, and execute:

dsh plugin --profile desktop add /absolute/path/dsh-plan-and-execute-0.3.6.tgz

On macOS, you can also use the app’s built-in CLI without installing Node or pnpm separately:

"/Applications/DeepSeek Harness.app/Contents/Resources/runtime/cli/bin/dsh" \
  plugin --profile desktop add /absolute/path/dsh-plan-and-execute-0.3.6.tgz

After completion, reopen the desktop app. If you encounter ERR_PNPM_UNEXPECTED_STORE, add --store-dir to the installation command, pointing to the store currently used by the desktop profile. Verify that dsh-plan-and-execute is enabled in the global Plugins page, then fully restart the Desktop.

To remove:

dsh plugin --profile desktop remove dsh-plan-and-execute

After installing, removing, or toggling the entire plugin, a full Desktop restart is the reliable way to apply changes; this version does not promise full hot-reloading.

Typical Usage

  1. Select P&E in the Agent preset of a new session.
  2. A dedicated configuration window appears automatically. Select Fast / Expert, then set the execution model, planning model, and reasoning level respectively.
  3. Click the blue Save as current session configuration to save and close. Restore default configuration only reverts options to user-saved defaults; Set as default configuration saves both the default combination and the current session configuration.
  4. After starting the conversation, click the P&E control in the input bar to modify the execution model, planning model, reasoning level, and operating mode. Saved changes take effect from the next turn; the current running turn and dispatched sub-agents retain their original configuration.

The planning phase prohibits writing files, running commands, and dispatching sub-agents. In Expert mode, the main session is prohibited from directly editing files or running commands; verification is completed by the execution sub-agent, and the main session reviews the results.

Use Cases and Notes

Who it is for: Developers who need to distinguish between “daily execution with fast models” and “breaking down steps with planning models” in Desktop; sessions with long tasks, multi-file changes, or requiring alignment on a plan before action; users willing to isolate execution context via sub-agents in Expert mode.

Limitations (from README):

  • The /model command or direct native API calls can still change native selections; P&E’s actual requests use the current turn’s plugin route snapshot.
  • If the Desktop is restarted during planning, the phase state is lost from memory, and the next request is judged again by the execution model.
  • The Expert main session cannot run commands directly; combination with third-party plugins that also replace the conversation.input.model slot is unverified.
  • Context capacity checks are official estimates and cannot replace precise tokenization by service providers; if the window is insufficient, switch to a planning model with a larger window or compact first.

Conclusion

dsh-plan-and-execute consolidates on-demand planning, dual-model routing, and Fast/Expert workflows into a single Desktop preset, retaining tools and migration paths related to the legacy Mids·Fast. If you are doing multi-step Agent development on Desktop 0.2.0-rc.2, you can obtain the 0.3.6 package from the directory page or GitHub. Install per the README, configure the execution and planning models in the P&E preset, and start chatting.

  • Directory Page: https://www.skillhub.cn/plugins/Yaaaaaaa233/dsh-plan-and-execute
  • GitHub: https://github.com/Yaaaaaaa233/dsh-plan-and-execute
羽毛球分组比赛记分
小程序二维码

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

Xiaoye