Preface¶
DeepSeek Harness (dsh for short) is an open-source agent runtime developed by DeepSeek, whose core philosophy is “Everything is a plugin”: models, tools, skills, sessions, sandboxes, and loops can all be replaced with composable plugins. In the official presets:
- Minimal only provides two tools, making the first-round inference cleaner;
- Standard has a wider range of tools, suitable for actual code modification, but the same model is very sensitive to the “list of tools visible in the API”.
The community evaluation repository xiaobright/modeltest published a set of personal evaluation figures on DeepSeek V4 Pro with reasoningEffort=max Project2:
- Standard scored 91, and let me appeared 208 times;
- Minimal scored 99 / 96 in two rounds, with let me appearing 0 times.
Sticking to the Minimal preset can preserve the reasoning trajectory, but it will lose the more than 20 subsequent tools. The practice of “anchoring to the minimal directory in the first round, and releasing the full directory after the first actual tool call” was made into a DSH preset by xiaobright/dsh-anchored-standard.
The pi-anchored-tool-for-dspro ported this two-stage approach to the pi coding agent, and it was included in the “Models and Providers” category by the community plugin directory. This directory is not the official app store of DeepSeek / Fangyuan, and has no subordinate relationship with the official repository. Below we will introduce it based on cross-verified information from the directory page, GitHub source code, and npm package.
What is this¶
pi-anchored-tool-for-dspro is maintained by dbydd under the MIT license, and its main language is TypeScript. The one-sentence description on the community directory page is: A pi extension for DeepSeek V4 Pro — the first request only exposes shell and read, the session records the first tool call before restoring the full directory, and rewrites the system prompt injected by the harness into the DSH minimal mode persona, which runs through the entire session.
The repository’s package.json clearly states that it is a pi extension: pi.extensions points to ./src/index.ts, and the peerDependency is @earendil-works/pi-coding-agent. The README also notes that “it is not officially affiliated with or endorsed by DeepSeek or the pi project”. The directory lists it as a DSH plugin, with the installation command given as dsh plugin add github:dbydd/pi-anchored-tool-for-dspro. When loading from source code, the host is pi’s ExtensionAPI, with the hook mounted on before_provider_request, modifying the serialized payload about to be sent to the model instead of DSH’s system-prompt/assemble workflow.
As of 2026-08-18, both the directory details page and GitHub API show 6 stars. The latest commit on the GitHub main branch is 0a114d8 (2026-08-15), and the package.json version is 0.2.0; the npm package has been updated to 0.4.0. The directory installation command pulls from the GitHub repository, installing version 0.2.0 on main; pi install pi-anchored-tool-for-dspro pulls from npm, installing version 0.4.0. Below we will first explain the two-stage anchoring according to the directory + GitHub main branch, and separately note the routing capabilities added in version 0.4.0.
What problem does it solve¶
V4 Pro selects the execution trajectory based on two factors at the same time: the visible tool directory in the API, and the persona in the system prompt. The Project2 table from modeltest (the author stated that this is a personal evaluation, not a public benchmark) is sorted as follows:
- Standard: Score 91, let me 208 times, with 25 full tools
- PTC: Score 92, let me 194 times, with only the run_code tool
- Minimal: Score 99 / 96, let me 0 / 0 times, with 2 tools
- Anchored Standard: Score 98 / 99, let me 1 / 0 times, first 2 tools, then all 25 tools are released
The pattern is straightforward: too many tools in the first round will easily lead the model into the Standard trajectory; keeping only shell + file reading in the first round is closer to the Minimal trajectory. The persona is also very sensitive. The persona in the DSH minimal preset is:
You are a helpful software engineer assistant.
The repository writes this string as the constant MINIMAL_SYSTEM_PROMPT, and notes that rewriting it will revert the We need reasoning style back to standard-like. So the plugin’s strategy is: keep the persona unchanged for the entire session, only upgrade the tool directory once.
The README also lists the boundaries: this is an experimental prompt conditional patch, not a guarantee of correctness; the evaluation is personal results, not a universal conclusion; the plugin does not send network requests or have telemetry.
How the two-stage workflow runs¶
The src/index.ts on GitHub main does two things.
-
Narrow the tool directory only on the first request. When targeting the configured model and there are no persisted tool calls in the session, filter
payload.toolstobootstrapTools, which default tobashandread. Pi’s shell tool name is uniformlybash, unlike DSH which selects betweenbash/pwshbased on the platform. Once atoolResultappears in the session entry, ortoolCallis included in the assistant message, the filter stops and the full directory is released as-is. -
Rewrite the persona every round. As long as
minimalSystemPromptis true (default true), each request will replace the first system prompt in the payload with the DSH Minimal persona mentioned above. For OpenAI-compatible formats, modifymessages[0](eithersystemordeveloperrole); for Anthropic formats, modify the top-levelpayload.systemstring. Non-string system content will not be modified.
The stage is not stored in memory, but scanned from sessionManager.buildContextEntries(). So the stage persists after /resume or /reload. The parts aligned with DSH’s behavior include:
- The persona takes effect permanently, only the tool directory switches stages
- If the first reply does not call a tool, the session will not advance to the next stage
- Failed tool execution will still advance the stage (because there is already a persisted tool call)
- The tool directory only changes once per session
When there is a configuration error, it chooses fail-safe: if the names in bootstrapTools are not in the current directory, a warning will be issued and the filtering will be skipped, and the tools will not be stripped silently. The models default to an empty array, meaning no models will be anchored, which is a safe default value — you must configure the target models after installation.
Installation and activation¶
The command given on the community directory page, to be run in the DeepSeek Harness terminal:
dsh plugin add github:dbydd/pi-anchored-tool-for-dspro
For reproducible installations, pin the commit. The current main branch head is 0a114d8733ef2deb17a4a7bbf801c08af03eba7b:
dsh plugin add github:dbydd/pi-anchored-tool-for-dspro#0a114d8733ef2deb17a4a7bbf801c08af03eba7b
The original warning on the directory page reads: The plugin runs with the permissions of the current dsh process, and may execute code during installation. Please check the source code repository and license before installing.
The actual activation path documented in the repository README is for pi. The package has been published on npm, so you can directly use:
pi install pi-anchored-tool-for-dspro
Or use the git package in ~/.pi/agent/settings.json. The README example pins the tag v0.1.0, which corresponds to an earlier version, not 0.2.0 on main or 0.4.0 on npm:
{ "packages": ["git:github.com/dbydd/pi-anchored-tool-for-dspro@v0.1.0"] }
You can also copy the src/ directory of the repository into ~/.pi/agent/extensions/anchored-tools/. After installation, run /reload in pi.
Configuration and verification¶
The configuration is written under the top-level key anchoredTools in pi’s settings.json, and the override rules are the same as pi’s own settings: the global ~/.pi/agent/settings.json serves as the base, and the trusted project’s .pi/settings.json performs a deep merge — nested objects are merged recursively, arrays are replaced entirely without concatenation, and the project-side configuration takes precedence. The configuration is re-read on each request, and changes take effect immediately.
The global example given in GitHub main (0.2.0):
// ~/.pi/agent/settings.json
{
"anchoredTools": {
"enabled": true,
"models": ["deepseek-v4-pro"],
"bootstrapTools": ["bash", "read"],
"minimalSystemPrompt": true,
"notify": true
}
}
The meanings of the fields according to the README:
- enabled: Master switch
- models: Glob pattern, matching either provider/modelId or bare modelId; patterns with / will only match forms with a provider prefix, e.g. "deepseek/*", "*/deepseek-v4-pro"; an empty array means no models will be anchored
- bootstrapTools: Tools exposed in the first round, must be a subset of the current directory’s tools
- minimalSystemPrompt: Whether to rewrite the system prompt to the DSH Minimal persona; the persona text is intentionally not configurable
- notify: Show a one-time TUI prompt when the session advances to the promoted stage
Project-level configurations can replace the array entirely. The override example in the README changes the target model to claude-*, and expands the bootstrap tools to bash, read, ffgrep, fffind:
// .pi/settings.json
{
"anchoredTools": {
"models": ["claude-*"],
"bootstrapTools": ["bash", "read", "ffgrep", "fffind"],
"minimalSystemPrompt": false,
"notify": false
}
}
Use the slash command /anchored-tools for verification. GitHub main (0.2.0) will report the current model, whether it hits the target, the stage (bootstrap or promoted), and the minimal system prompt switch. The console will print a log line when the system prompt is first rewritten.
What’s new in npm 0.4.0¶
The latest npm version is 0.4.0, released at 2026-08-15T08:05:38Z, and its README has two additional sections compared to GitHub main. These two sections are not in the current GitHub source tree, and cannot be installed via dsh plugin add github:…; they are only available when installing via pi install or from the npm package.
The first section is Router, ported from yjh051108/dsh-router-standard. It is recommended to bind it to deepseek-v4-flash: it routes the first user message to spec / weak / react ( mixed will not be automatically selected), injects the corresponding persona and core first-round tools, and releases the full directory after the first tool call. When both the anchor list and routing rules are matched, routing takes priority. The additional command is /anchored-route.
The second section is extensionlessLaunchers, which defaults to false. When enabled, the plugin will inject JavaScript into child pi processes launched with --no-extensions (modifying NODE_OPTIONS, argv, and child_process), so that anchoring/routing can also run in those child processes. The README marks this as code injection, and requires reading the full instructions before enabling. Keep the default off when you do not need to cover child processes.
Applicable scenarios and notes¶
It is suitable for users who are already using pi and mainly use DeepSeek V4 Pro: they want the first-round reasoning to be close to the Minimal preset, but do not want to lose the full tool directory later. If you only want to use the official Cordis presets on the DSH side, you should directly refer to the upstream dsh-anchored-standard, and do not treat this pi extension as the same bundle.
Please note the following before using:
1. The plugin runs with the permissions of the current dsh / pi process, and may execute code during installation and loading. Please review the source code and MIT license first.
2. Not writing the models configuration is equivalent to not enabling the plugin. Simply reloading without modifying the configuration will not change the behavior.
3. Do not rewrite the persona yourself. Changing the wording in the evaluation will destroy the target reasoning style, and the source code also makes this sentence an unconfigurable constant.
4. If the model does not call a tool in the first round, the session will stay in the bootstrap directory. This is by design, not a bug.
5. The scores of 91 / 99 / 98 from Project2 come from a personal evaluation repository, and the author himself stated that “it is not a public benchmark”. Do not present them as official scores.
6. GitHub main is version 0.2.0, npm is version 0.4.0, and the git tag is still stuck at v0.1.0. Follow the README corresponding to the installation path you choose, and do not mix the router fields from 0.4.0 with the 0.2.0 source code.
7. The community directory deepseek-harness-plugin.com is an independent website. Being included in the “Models and Providers” category only means that the directory crawled this repository, and does not represent official certification by DeepSeek.
Summary¶
pi-anchored-tool-for-dspro does a very narrow set of things: it moves the DSH-verified workflow of “first minimal tools, then full directory, and Minimal persona throughout” to pi’s request payload, specifically targeting DeepSeek V4 Pro’s conditional sensitivity to tool lists and system prompts. The directory page installation command is:
dsh plugin add github:dbydd/pi-anchored-tool-for-dspro
The installation method that is closer to the repository instructions in pi is pi install pi-anchored-tool-for-dspro, then set anchoredTools.models to ["deepseek-v4-pro"], and use /anchored-tools to check the stage.
Directory page: https://deepseek-harness-plugin.com/zh-CN/plugins/pi-anchored-tool-for-dspro/
GitHub: https://github.com/dbydd/pi-anchored-tool-for-dspro