During the use of DeepSeek Harness (dsh), you often need to interject a “side question” (for example: “What was that function name again?”) while executing the main task. If you ask directly in the main conversation, the model will process the message, consume tokens, and pollute the context window.

The dsh-btw plugin provides a /btw command for asking context-aware questions without interfering with the main conversation. The answer is rendered directly in the UI and consumes no tokens or prefix cache from the main session.

Core Features

  • /btw side command: Provides the /btw slash command, dedicated to non-core conversational questions.
  • Isolated execution: The question and answer do not become model messages in the main session. The main session log only records command/run and command/done pairs, with token usage of 0.
  • Context awareness: By default, it uses the fork provider as a one-shot subagent, inheriting the context of completed turns from the main session.
  • Direct UI rendering: The visible text blocks from the subagent are returned and displayed directly in the user interface.
  • Resource protection: The prefix cache of the main session remains untouched.

Installation and Enablement

Before installing, ensure DeepSeek Harness (npx @deepseek-ai/dsh) is installed and the runtime environment meets Node.js >= 20.

NPM provides prebuilt versions, so no build permissions are required for installation:

dsh plugin --profile web add dsh-btw

Install via GitHub

Installing from GitHub requires running the package’s prepare build script. For pnpm >= 10, you need to allow builds in the configuration file:

  1. Add the following to pnpm-workspace.yaml:
    allowBuilds:
      dsh-btw: true
  1. Re-run the installation command:
    dsh plugin --profile web add github:<your-github-name>/dsh-btw

Configuration Requirements

After installation, the cordis.patch.yml file must contain the configuration block for this plugin; otherwise, plugin loading will abort due to unknown keys.

Typical Usage

In the main conversation, enter /btw followed by your question:

/btw what's the difference between Drop and DropImpl again?

The plugin launches a one-shot subagent to answer the question. The result is displayed directly in the UI, while the main conversation flow remains unchanged.

Configuration Options

Add a config block to the plugin entry in cordis.patch.yml:

- insert:
    - id: btw
      name: dsh-btw
      config:
        provider: fork   # fork (默认) | spawn
        persona: terse   # 可选的子代理人设
Configuration Default Description
provider fork fork injects the prefix of completed main-session turns into the subagent, enabling context-aware answers; spawn starts a fully isolated subagent.
persona — Optional persona applied to the subagent (must be supported by the fork/spawn provider).

Notes

  • Runtime permissions: The plugin runs with the permissions of the current dsh process. Before installing from GitHub, please review the source code and license.
  • Node version: Node.js >= 20 is required.
  • Prebuilt dependencies: Installing the prebuilt version via NPM does not require build permissions.

Summary

dsh-btw addresses context pollution and token waste when handling side queries in DSH. By using a one-shot subagent mechanism, it ensures the main session remains clean and efficient.

  • Plugin directory: https://www.skillhub.cn/plugins/136155330/dsh-btw
  • Source code: https://github.com/136155330/dsh-btw