dsh-think-zh: Pinning Agent Chinese Reasoning with System Prompts

Preface

In DeepSeek Harness (DSH), the model’s “Thinking” process and the final answer originate from the same generation step; there is no separate “Thinking Language” field in the API. A common practice is to ask questions entirely in Chinese, hoping the reasoning follows suit. However, once English system descriptions, tool outputs, or code errors are mixed into the conversation, the language of reasoning can easily drift back to English.

Below is an introduction to the bundle plugin dsh-think-zh maintained by lance808 (Community Directory Category: Model Reasoning). It injects a high-priority language rule into the system prompt, requiring the Agent to perform internal reasoning in a specified language (Simplified Chinese by default) before answering. It also allows for a one-click switch for the entire profile on the plugin page of Harness Web. The plugin has zero dependencies, requires no build step, is MIT licensed, and currently has 0 stars on GitHub.

What is this

dsh-think-zh is a DSH host plugin: it contributes a section named agent:reasoning-language to the system prompt via ctx.systemPrompt.section() (the bundle line ID remains think-in-chinese, consistent with its identity before the rename, to prevent installed configurations from becoming dead lines that fail to load).

Reasoning content is not a separate request; the only lever that can influence it is the prompt the model sees at the start of that step. This plugin does not read or rewrite the persisted reasoning blocks; it only affects the prompt at generation time. It belongs to prompt-level guidance, not a hard constraint.

Core Features

  1. Default Reasoning Constraint Only: When target: think, the final reply language still follows the user; the reasoning channel is fixed to the configured language.
  2. Optional Reply Constraint: When target: all, both reasoning and reply use the configured language (unless the user explicitly requests a language change).
  3. Verbatim Preservation: When verbatim: true (default), the instruction requires code, commands, paths, URLs, identifiers, and tool arguments to remain in their original form, preventing errors and code from being translated into the thinking process.
  4. Fully Custom Text: When instruction is non-empty, it replaces the built-in instruction generated according to the fields above.
  5. True Disabling: When enabled: false or toggled off in the plugin page, the section is not registered (rather than registering empty text).
  6. Scope: The line is attached to the Host plane, taking effect for all Agents under that profile (including sub-agents, workflows, and forks); per-session toggling is not supported.

The section uses an explicit order: 480, ranking after persona settings but before plan strategies and tool guidance. This prevents language rules from being buried behind thousands of tokens of tool documentation, which would render them ineffective.

Installation and Activation

The plugin loads the local bundle with the current DSH process permissions. Before installation, please review the source code and MIT license on the GitHub Repository.

Method 1: Harness Web

Install the bundle on the Plugins page in Harness Web and use the page toggle to enable or disable it. Changes take effect for all sessions in the entire profile and persist after restart.

Method 2: plugin_manager

For sessions with plugin_manager tool permissions, execute the following on the plugin directory (or the cloned directory):

plugin_manager({ action: "install_bundle", target: "<absolute path to this directory or clone>" })

According to the README, the installation method after fetching source code from GitHub is to clone the repository and then execute the same install_bundle on the clone path (as stated in the source material, there is no dsh plugin add github:... type command).

After installation, you can toggle the think-in-chinese line on the plugin page. Uninstall example:

plugin_manager({ action: "remove_bundle", target: "dsh-think-zh" })

To confirm loading via command line: execute plugin_manager({ action: "list_bundles" }). You should see rows[0].rowId = think-in-chinese with an entryId. Having a rowId without an entryId usually indicates the module is not activated (e.g., import failure).

Note: After locally modifying the bundle’s index.js, uninstalling and reinstalling or disabling and re-enabling on the plugin page will not load the new code (ESM caches modules by file URL). You must restart the Harness process for changes to take effect.

Configuration

User-level configuration is written in cordis.patch.yml (user patch has higher priority and is not lost during upgrades). Example of the default line in the package:

- id: think-in-chinese
  config:
    language: 简体中文          # Language for thinking
    target: think              # think (constraint thinking only) | all (use this language for thinking and reply)
    verbatim: true             # Whether to add the "keep code/commands/paths verbatim" constraint
    enabled: true              # When disabled, the section is not registered at all
    instruction: ''            # When non-empty, completely replaces the built-in instruction text
Field Default Meaning
language 简体中文 Name of the thinking language, can be 繁體中文, English, 日本語, etc.
target think think for reasoning only; all for reasoning and reply.
verbatim true Whether to add the verbatim preservation constraint.
enabled true When off, do not register the section.
instruction '' Full text of custom instruction; if non-empty, replaces auto-generated text.

Field validation occurs during profile loading: target must be only think / all; enabled and verbatim must be boolean values. Unknown fields will report unknown field with the path provided and will not be silently ignored.

Typical Usage and Effectiveness Confirmation

Visual Confirmation

Observe the “Thinking” collapsible area above the reply; the content should be in Chinese (or your configured language).

Quantifying with Session Logs

Reasoning blocks are written to the compressed session log with the reasoning type. The README provides examples for decompressing and calculating the ratio of Chinese characters:

# Log is zstd compressed JSONL
zstd -d -c "$DSH_HOME/sessions/<workspace>/<session-id>/session.v4.jsonl.zstd" > session.jsonl
// Calculate the Chinese character ratio for each reasoning block
const events = readFileSync('session.jsonl', 'utf8').split('\n').filter(Boolean).map(JSON.parse)
for (const e of events) {
  if (e.type !== 'assistant/message') continue
  for (const b of e.data?.message?.content ?? []) {
    if (b.type !== 'reasoning') continue
    const cjk = (b.text.match(/[\u4e00-\u9fff]/g) ?? []).length
    const latin = (b.text.match(/[A-Za-z]/g) ?? []).length
    console.log(e.seq, (cjk / (cjk + latin || 1)).toFixed(3), b.text.slice(0, 40))
  }
}

The author reported in a single-session sample: out of 30 non-empty reasoning blocks, 25 met the Chinese character ratio standard (approx. 83%); long analysis blocks (≥400 characters) were entirely in Chinese, while short decision blocks immediately following tool calls might still drift back to English (often triggered by English tool output). This is a known boundary and cannot be completely eliminated simply by tweaking a sentence or two of text.

Adjusting Behavior

  • To only have thinking in Chinese while replies follow the user’s language: Keep default target: think.
  • To fix replies in Chinese as well: Set target: all.
  • To reinforce language retention after tools return English: You can set a custom instruction targeting scenarios like “restate in the target language first after tool returns” (requires writing the full text yourself).

Use Cases and Notes

Suitable for: Users who long-term use models supporting reasoning channels in DSH, desiring stable reasoning in Chinese (or other configured languages), while needing code, paths, and commands to remain verbatim in their thinking.

Notes:

  • The plugin runs within the DSH host process. Please review the source code and license before installation. The community directory SkillHub Plugin Page and GitHub have no relation to the DeepSeek / High-Flyer official app store. The DSH ecosystem itself is an “everything is a plugin” extension model.
  • The constraint is prompt guidance; individual steps may still reason in other languages.
  • If you only want it to affect a specific type of Agent, you should place the configuration line in the corresponding agent preset, rather than relying on the Host plane global switch.
  • Package version 0.1.0, requires Node ≥ 18. You can run node test.js locally to perform zero-dependency assertions (schema, default text, registration and unloading semantics, etc.).

Conclusion

dsh-think-zh uses a resident, high-priority system prompt section to transform “what language to use for internal reasoning” from a game of chance involving context drift into a configurable, toggleable profile-level strategy. To learn more, submit issues, or view the English README, please visit GitHub: lance808/dsh-think-zh; to browse similar plugins in the community, you can open the SkillHub Directory Page.

羽毛球分组比赛记分
小程序二维码

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

Xiaoye