DEV Community

Cover image for DeepSeek Harness Setup & Troubleshooting: Node 24.9, PTC Mode, Custom API, and Plugins
boluo
boluo

Posted on

DeepSeek Harness Setup & Troubleshooting: Node 24.9, PTC Mode, Custom API, and Plugins

When I first tried running npx @deepseek-ai/dsh web on my Windows machine to test DeepSeek Harness (dsh 0.2.2-rc.5), my terminal immediately threw an engine mismatch error because my system Node was sitting at v22.22.2. Even after I got the app open, the plugin list looked nearly bare, my first file-writing task failed inside the PowerShell sandbox, and I wasn't sure how to wire in my own OpenAI-compatible API key without breaking ~/.dsh/cordis.patch.yml.

I spent the afternoon working through each of those roadblocks on Windows: getting around the node >=24.9.0 requirement, testing how PTC mode prevents context window blowouts on batch jobs, connecting a unified custom API provider to crunch a 9-row Q3 sales CSV, installing 8 community plugins, and using Creator mode to build a 3,000-line knowledge graph extension from scratch.

If you just installed dsh, here is the biggest takeaway from my run: switching to the right execution mode matters much more than loading up on plugins. Running a 300-file audit in Standard mode will flood your context window with intermediate tool outputs, whereas PTC mode writes a script to process the batch locally and returns only the final summary. And if you only use dsh for quick single-turn coding questions with a single model, stick to the default login—you don't need custom provider patches at all.

Common Scenario or Error What to Do in dsh Why It Happens / What to Watch Out For
CLI fails to start on node < 24.9.0 Install the Desktop App (or upgrade Node LTS and restart terminal) The npm package requires node >=24.9.0, while the Desktop installer bundles its own isolated runtime
PowerShell sandbox write error when saving files Switch bottom-left permissions from Read-Only to Workspace Write Read-Only blocks disk writes; Workspace Write allows file creation inside your project folder without exposing your whole OS
404 POST /v1/chat/completions/chat/completions Set Custom API URL strictly up to /v1 dsh automatically appends /chat/completions to the base URL
PI_AI_ERROR: No API key for provider on startup Keep the apiKeyEnv field inside ~/.dsh/cordis.patch.yml Omitting apiKeyEnv when editing the YAML patch file causes the process to exit immediately
Context window overflows during multi-file checks Switch top-left selector to PTC Mode (PTC模式) Model writes and executes a local program in one pass so intermediate data stays out of chat history
Want to add a new UI button or sidebar view Switch to Creator Mode (创造模式) Includes the plugin-authoring skill; generated and auto-mounted 7 files (3,000+ lines) in ~21 minutes

Environment Pitfalls, Permission Boundaries, and Workspace Privacy

Before installing plugins or changing model configs, it helps to clear the four environment traps I ran into on my first launch.

DeepSeek Harness Main Interface

Main workspace layout: collapsible navigation sidebar on the left, chat composer in the center, and mode, permission, and model controls along the bottom bar.

1. The Node.js 24.9 Threshold: CLI vs. Desktop Installer

DeepSeek Harness offers two installation paths, and they handle Node versions very differently:

  • npm CLI (npx @deepseek-ai/dsh web): Requires node >=24.9.0. By default, it starts a local server on http://127.0.0.1:3080 and opens your browser (pass --no-open if you are running it on a headless server or over SSH). If you upgrade Node on Windows after seeing a version error, you must close and reopen your terminal window so the updated PATH refreshes.
  • Desktop Installer: Bundles its own Node runtime. Because my Windows system was running v22.22.2 and I didn't want to touch my global environment for other projects, I installed the Desktop app and went straight into the main UI.

Also note that dsh displays a Developer Preview notice on first launch. Because plugin IDs and YAML keys can change between preview builds, always check dsh --version first (everything below was tested on 0.2.2-rc.5).

2. Why My First File Write Failed: The Three Permission Tiers

At the bottom left of the input box sits the permission selector:

DeepSeek Harness Three Permission Tiers

The permission menu at the bottom left: Read-Only, Workspace Write, and Full Access.

  • Read-Only (仅可查看): The agent can read files inside the workspace but cannot modify or create anything. When I first asked dsh to generate a markdown report from a CSV file, I forgot the toggle was sitting on Read-Only, and the task immediately threw a PowerShell sandbox write error.
  • Workspace Write (工作区内修改): Allows reading, creating, and editing files strictly inside the active workspace directory. This is the safest default for daily work.
  • Full Access (完全权限): Grants unrestricted read/write access across your entire computer. While it stops confirmation prompts, a single mistyped prompt can alter system directories outside your project. If you ever turn on Full Access, create a dedicated empty folder on your drive first and use that as your workspace boundary.

3. The Workspace Dropdown Privacy Trap

Every conversation in dsh requires selecting a Workspace above the input box, which maps directly to a real directory on your hard drive. When you click the workspace dropdown menu to switch projects, dsh displays the full names of every local folder you have opened in the past. Always collapse the left sidebar before taking screenshots or recording your screen so you don't accidentally publish your local directory structure.

PTC Mode vs. Standard Mode: Why Execution Modes Are Plugins Too

Why do people call DeepSeek Harness an "everything is a plugin" alternative to Claude Code?

In tools like Claude Code, model invocation, built-in tools, and session management are hardcoded into the base layer. DeepSeek Harness is built on top of the Cordis plugin framework. That means the model adapter (llm-pi-ai), context engine, session manager, tool runner, the UI panels, and all four execution modes are mounted as independent Cordis plugins. Because Cordis treats plugin registration as reversible side effects, you can swap modules in and out—and unloading a broken plugin cleanly rolls back every UI button and hook it registered.

Clicking the mode menu at the top left of the composer reveals four presets:

DeepSeek Harness Four Execution Modes

The four execution modes at the top left of the input box.

  1. Standard Mode (标准模式): Enables file read/write, shell commands, web search, skills, and sub-agents. This handles 80% of daily coding and editing.
  2. PTC Mode (PTC模式): The model writes a program to execute a multi-step workflow in a single pass. Intermediate outputs stay inside the execution environment instead of streaming back into the chat context.
  3. Creator Mode (创造模式): Standard mode plus the dedicated plugin-authoring skill for building new dsh extensions.
  4. Minimal Mode (极简模式): Strips the agent down to just the terminal and image reader for raw model benchmarking.

Here is where PTC Mode saves real money: suppose you need to audit 400 configuration files or count every error code across a massive log directory. In Standard mode, the agent reads files one by one in a loop, appending every intermediate file dump into the chat history until the context window overflows. In PTC mode, the agent writes a small script that scans all 400 files locally and only prints the final aggregated table into the conversation.

One practical tip from my testing: because PTC hides intermediate steps inside the script execution, debugging a wrong summary number is harder than in Standard mode. I always test my prompt on 2 or 3 sample files first to verify the calculation logic before unleashing PTC mode on a full directory.

Wiring in Crazyrouter Custom API and Running a 9-Row CSV Benchmark

When I started running multi-model comparisons and background summarization plugins in dsh, I wanted to put DeepSeek, Claude, and GPT under the same bottom-right model selector using a single API key.

Because dsh delegates model calls to the llm-pi-ai plugin (see the official DeepSeek Harness providers documentation for the underlying schema), you can wire in any OpenAI-compatible gateway directly from the settings UI. I connected Crazyrouter and ran a full tool-call verification.

1. Switching to the Custom Model API Tab and Configuring the 5 Fields

Navigate to Settings → Models (设置 → 模型) at the bottom left and click Add Model Provider (添加模型提供商) at the top right. Pay attention to the modal header: it opens on the built-in third-party provider list by default, so you must click the "Custom Model API" (自定义模型API) tab next to it to reveal the custom form.

Enter the Base URL in the API URL field:

https://api.crazyrouter.com/v1
Enter fullscreen mode Exit fullscreen mode

Here is how I filled out the five fields and the two exact error messages I reproduced while testing bad inputs:

  • Provider ID: Use a lowercase string like crazyrouter. Once saved, session history and default model settings bind to this ID permanently; to rename it later, you have to create a new provider and delete the old one.
  • API Protocol: Select OpenAI Chat Completions.
  • API URL: Enter https://api.crazyrouter.com/v1 and do not append /chat/completions. When I tested pasting the full /v1/chat/completions path, dsh immediately threw a 404 error: POST /v1/chat/completions/chat/completions is not valid. Do not append /chat/completions twice.
  • API Key: Paste your key and save (the UI masks it afterward). If you prefer editing ~/.dsh/cordis.patch.yml directly in an editor, never delete the apiKeyEnv key—omitting it causes dsh to fail on startup with PI_AI_ERROR: No API key for provider.
  • Fetching the Model List (GET /models): I entered deepseek-v4.1-flash as an initial model ID and clicked Fetch Available Models (获取可用模型). dsh queried GET /models against the endpoint and pulled 185 available models in one click (including deepseek-v4-pro, glm-5.4, and claude-opus-4-8).

Before typing model IDs by hand, I always verify the exact identifier on the Crazyrouter model pricing catalog. Gateway model IDs (like deepseek-v4.1-flash) don't always match vendor marketing names character for character, and a typo triggers UNKNOWN_MODEL. If you also want to benchmark different AI coding models across dsh, Cursor, or Cline, that catalog lists the context limits and parameters side by side.

2. Verifying the Tool-Calling Loop on a Q3 Sales CSV

To verify that the custom endpoint handles multi-step tool execution—not just plain text chat—I dropped a 9-row sales.csv file (July–September 2026 revenue and order counts for East, North, and South regions) into my workspace. Using deepseek-v4.1-flash and deepseek-v4-pro through the custom provider, I asked dsh to calculate September month-over-month growth, rank Q3 regional revenue, compute average order value (AOV), and write the result to report.md.

With permissions set to Workspace Write, the agent read the CSV, ran the calculation, and wrote report.md in a single pass (15.1K tokens consumed, output speed 103 tok/s). I checked all 9 figures against the raw CSV by hand:

Region Aug Revenue (CNY) Sep Revenue (CNY) Sep vs. Aug MoM Q3 Total Revenue (CNY) Q3 AOV (CNY/Order)
South 1,538,000 1,491,000 -3.06% 4,501,000 (Rank 1) 406.96
East 1,336,000 1,298,000 -2.84% 3,918,000 (Rank 2) 410.26
North 1,045,000 1,012,000 -3.16% 3,039,000 (Rank 3) 407.92
3-Region Total 3,919,000 3,801,000 -3.01% 11,458,000 408.34

In addition to getting the 11,458,000 CNY total revenue and 408.34 CNY/order AOV (across 28,060 orders) right, the model added a self-check note explaining that it divided unrounded totals before rounding to two decimal places. I also tested stripping the compat flags (supportsDeveloperRole and maxTokensField) from cordis.patch.yml, and the endpoint handled dsh's default parameters without issue.

Eight Community Plugins and How I Built a Custom One in 21 Minutes

1. Eight Existing Plugins Grouped by Use Case

You don't need to build everything from scratch. Here are the 8 most practical community plugins, ordered by how I install them to keep the UI clean:

DeepSeek Harness Plugins Screen

The Plugins management page, showing Built-in Configuration and Experimental Plugins.

  1. DSH Market (Install #1 — Plugin Store): Lets you search and one-click install community plugins directly inside the left sidebar.
  2. DSH Context (Install #2 — Token & Cost Monitor): Shows live token usage, cost per turn, and context window saturation so you can spot why a long session is slowing down or losing focus.
  3. DeepSeek Design & Univer Office (Visuals & Office Docs): DeepSeek Design generates web pages, posters, and slides on an interactive canvas; Univer Office creates and exports native .xlsx, .docx, and .pptx files.
  4. Browser Skills & DSH Computer Use Win (Browser & OS Automation): Browser Skills operates your logged-in browser to fill forms or scrape dashboards, while DSH Computer Use Win controls the Windows desktop directly to click buttons and type.
  5. Whale Girl Theme (鲸鱼娘皮肤) & AuraBot (UI Skin & QQ Bot): Reskins the dsh interface or connects a secondary QQ account so your agent can send voice messages, stickers, and images.

If you only want three plugins at the start, install DSH Market → DSH Context → one workflow plugin. Use Route 1 (paste the GitHub repo URL directly into a chat prompt) to let dsh autonomously clone, build, and mount DSH Market (or any brand-new repo not yet indexed in the store). After that, use Route 2 (search inside DSH Market and click Install) for everything else. If a new UI button doesn't appear right after installation, restart the desktop app or Web UI once.

2. Building a Knowledge Graph Plugin in Creator Mode

To see how Creator mode builds a new extension, I started a fresh session, switched the top-left mode selector to Creator Mode, and gave it four strict requirements for a Conversation Knowledge Graph plugin:

  • What to capture: Save the full markdown body of a single AI answer.
  • How to trigger it: Render a "Save to Graph" button at the bottom of every AI response.
  • Where to store it: Write files into a local workspace knowledge folder (no external DB).
  • How to structure it: Run a background queue that distills saved answers into topic pages and connects related pages into an interactive graph.

dsh wrote the code, debugged its own TypeScript build errors in the chat loop, and automatically mounted the finished plugin:

  • Total build duration: ~21 minutes
  • Output: 7 files totaling 3,000+ lines of code
  • Graph result from 2 saved replies: 7 linked topic pages

A new "Knowledge Graph" tab immediately appeared in my left sidebar, and every chat answer gained a save button. After I clicked save on two replies, the background queue distilled them into 7 connected topic pages color-coded into four node types: Orange for raw saved replies, Blue for core concepts, Green for concrete tools/entities, and Red for actions/events. Clicking any node opens its synthesized page and outbound links on the right panel—turning scattered chat history into a reusable local knowledge map.

Appendix: Plain-Text Repository Links for the 8 Plugins

  • DSH Market: https://github.com/2BingLing/dsh-market
  • DSH Context: https://github.com/bowenliang123/dsh-context
  • DeepSeek Design: https://github.com/Devin-AXIS/deepseek-design
  • Browser Skills: https://github.com/Tencent/BrowserSkill
  • DSH Computer Use Win: https://github.com/Yu-tao-Li/dsh-computer-use-win
  • Univer Office: https://github.com/dream-num/dsh-univer-office
  • Whale Girl Theme: https://github.com/Small-tailqwq/dsh-deep-whale
  • AuraBot: https://github.com/aureth-labs/dsh-aurabot-qq

Top comments (0)