Blog

DeepSeek Harness vs OpenCode: Which Open-Source Agent Should You Pick? | TeamoRouter

Quick Answer

deepseek harness vs opencode is a clash of two completely different open-source philosophies: dsh pushes "everything is a plugin" to its extreme; OpenCode pushes "minimalism" to its extreme. Which one you pick comes down to whether you want a framework you can rebuild, or a terminal agent that works out of the box.

  • DeepSeek Harness (dsh): DeepSeek's open-source agent harness (What Is DeepSeek Harness). Everything is a plugin; 54 npm packages; model adapter / tool registry / session log / agent loop are all replaceable from configuration; a running agent can even define a new plugin on the spot to modify itself.
  • OpenCode: open-source, written in Rust, terminal-first, multi-model coding agent. One opencode.json configures a provider and it talks to any model — install and go.
  • Cost: both are model-agnostic. Pointed at DeepSeek V4, both start around $0.14 / $0.28 (per million input/output tokens), and a single TeamoRouter key feeds both.

One-line verdict: want deep customization and to build your agent as a framework — pick dsh; want minimal, out-of-the-box, and full control of a light tool — pick OpenCode. For the four-way comparison see DeepSeek Harness vs Claude Code / Codex / OpenCode; this post is a head-to-head of just the two.

The Differences at a Glance

Dimension DeepSeek Harness (dsh) OpenCode
Positioning Open-source agent framework (harness) Open-source terminal agent
Architecture philosophy Everything is a plugin (Cordis) Minimal modularity
Implementation TypeScript (~591K lines) Rust
Default model DeepSeek V4 family Any (multi-model)
Install npx @deepseek-ai/dsh web One-command global install
Config Env vars + plugins opencode.json provider
Customization Extreme (swap any seam) High (providers / tools)
Ecosystem 54 packages + Python SDK + ACP Multi-model providers, active community
Onboarding Medium (built for framework developers) Low (install and go)
Cost DeepSeek V4 from ~$0.14/$0.28 Follows the model; V4 is the same $0.14/$0.28
Status Developer preview (interfaces change) Stable and usable

Architecture Philosophy: Everything Is a Plugin vs Minimal Modularity

This is the deepest divergence between the two.

dsh: no privileged kernel, and the agent can rebuild itself

dsh's foundation is a plugin framework vendored from Cordis. Its most counterintuitive design: there is no privileged kernel to patch — the filesystem, shell, model adapter, session log, even the agent loop itself are all plugins. Unload one and its side effects are undone; any service can be swapped wholesale from configuration.

The wilder part is its self-referential toolset: cordis_define / cordis_run / cordis_stop / cordis_undefine. In plain terms, a running agent can define a new Cordis plugin on the spot, inject it into the live runtime, and the tools it registers are immediately visible to the model. Use the framework → define the framework inside the framework → change your own toolset → keep going. Almost no other project exposes that kind of meta-programming loop to the model in full.

Pair that with the "session log is the single source of truth" runtime invariant, and fork / resume / context compression / replay are all derived from the log — everything the model sees is rebuilt from it. That's also the technical source of the "dsh saves tokens" claims.

OpenCode: minimal modularity, install and go

OpenCode takes the opposite road: no heavy harness layer — just "an agent in a terminal," done cleanly. Rust-based, terminal-first, multi-model. Configuration is a single opencode.json — set the provider, fill in the base URL and key, restart, and you can switch between models.

It can be customized too (custom providers, add tools as needed), but the way you customize is "config," not "write a plugin and mount it into the runtime." For most people that's actually a strength: there's no framework abstraction to learn — once installed, it is just a tool.

In one sentence: dsh sells "the framework can be rewritten," OpenCode sells "the tool is simple enough."

Onboarding and Install

OpenCode is easier to get started with. One command installs it globally; launch it and type natural-language instructions straight into the terminal — the agent reads the repo, edits files, runs commands. To bring your own model, add an OpenAI-compatible provider to opencode.json. There's essentially no learning curve.

dsh has a higher bar. Installation itself is easy:

bash
npx @deepseek-ai/dsh web

One command starts the web UI at http://127.0.0.1:3080. But to actually unlock the "everything is a plugin" power, you need to understand Cordis's plugin model, inject dependency declarations, and event dispatch modes — it's designed for developers who want to build their own agent. If you just want to use it out of the box, dsh's framework abstraction is extra baggage.

Customization

  • dsh: swap any seam. Want the agent to have only terminal + file ops and no network? Done. Want Bash / PTY / LSP moved wholesale into a remote sandbox? Change one provider declaration. Want a tool that calls your internal system's API? Mount a plugin. Want to replace the behavior of the whole agent loop? Log, context, and tool registry are all replaceable from configuration. That's a depth OpenCode can't chase.
  • OpenCode: config-level customization. Switching providers, adding models, and tuning agent behavior all happen in opencode.json. That's enough for the vast majority of scenarios, but you can't reach the "inject a plugin into the live runtime to rebuild itself" tier.

Ecosystem

dsh rides on DeepSeek's engineering investment: 20K+ stars in the first hour, 28K–31K by day one; 12,293 commits, 54 npm packages, ~591K lines of TypeScript, 1,386 agent dev notes. The tool catalog covers bash / run_code / terminal_* (PTY) / edit / read / write / glob / grep (bundled ripgrep) / subagent / goal / todo / schedule / job / skill / lsp / web_fetch / session_search / ask_user, plus a Python SDK (deepseek_harness) and ACP / JSON-RPC interfaces — it doesn't lock you into its own UI.

OpenCode's ecosystem is centered on "multi-model": one tool that talks to any provider, an active community, and drop-in configuration. It doesn't offer a plugin catalog as big as dsh's, but it wins on simplicity and zero vendor dependency.

Cost

Both are model-agnostic, so cost follows the model. Hook both to DeepSeek V4 Flash ($0.14/$0.28 per million tokens) and they run at the same low price; hook both to flagship Claude / GPT and they cost the same as anything else.

The difference is in defaults and optimization direction:

  • dsh treats DeepSeek V4 as a first-class citizen and builds the whole architecture around token economics (single-source session log, spill storage that writes oversized tool output to disk and hands the model only a locator). Its strategic bet: an agent framework cheap enough to actually run at scale.
  • OpenCode doesn't favor any model — cost is entirely determined by the provider you choose.

For teams running agents all day, dsh + DeepSeek V4 Flash is usually the cheapest combo; OpenCode pointed at the same V4 reaches the same price.

How to Choose, by Who You Are

  • Want deep customization and to build your own agent framework: pick dsh. You can trim the capability surface, swap providers, write plugins, even let the agent rebuild itself — at the price of a learning curve and a developer-preview status.
  • Want minimal, out-of-the-box, and full control of a lightweight tool: pick OpenCode. Install and go, clean config, no framework abstraction.
  • Cost-sensitive, high-frequency agent use: either works — point at DeepSeek V4 Flash; dsh is more aggressive on token economics.
  • Care about long-term stability: OpenCode is the steadier choice; dsh is explicitly developer preview, interfaces will change, and we wouldn't build production dependencies on it.

Feed Both from One Key

Both speak the OpenAI-compatible protocol, so one TeamoRouter key feeds both — unified billing, no separate signups or top-ups:

bash
# dsh: environment variables
export DEEPSEEK_BASE_URL="https://api.teamorouter.cn/v1"
export DEEPSEEK_API_KEY="sk-teamo-your-key"

# OpenCode: provider in opencode.json
# {
#   "provider": {
#     "teamorouter": {
#       "options": {
#         "baseURL": "https://api.teamorouter.cn/v1",
#         "apiKey": "sk-teamo-your-key"
#       },
#       "models": {
#         "deepseek-v4-flash": { "name": "DeepSeek V4 Flash" },
#         "deepseek-v4-pro": { "name": "DeepSeek V4 Pro" }
#       }
#     }
#   }
# }

That way you can do everyday quick work in OpenCode and hand the heavy, deeply customized tasks to dsh — all sharing the same sk-teamo- key and the same bill. Full dsh wiring in Connect DeepSeek Harness to TeamoRouter; the standalone OpenCode intro is What Is OpenCode.

FAQ

Are dsh and OpenCode competitors?

Their positioning overlaps but they don't conflict. OpenCode is a "minimal terminal agent"; dsh is an "everything-is-a-plugin agent framework." You can live your daily life in OpenCode, or treat dsh as a framework and build your own agent — or install both and pick per task.

Can OpenCode be customized like dsh?

At the config level, yes — providers, models, tools. At the "inject a plugin into the live runtime" depth, no. If you want an agent that can rebuild itself on the spot, only dsh does that.

Is dsh production-ready?

Still developer preview — interfaces will change. Fine for personal development, learning agent architecture, and cheap agent runs, but we wouldn't build production that depends on specific API details.

Both pointed at DeepSeek V4 — who saves more tokens?

dsh's single-source session log plus spill disk-offload saves more in long sessions and oversized tool output. OpenCode doesn't do that kind of optimization. At the same price ($0.14/$0.28), which one saves tokens depends on your task shape.

To benchmark both open-source agents cheaply, grab a key at TeamoRouter, hook up both dsh and OpenCode, and compare as you go.

Ready to connect?Log in · top up · create an API key — three steps to start.
DeepSeek Harness vs OpenCode: Which Open-Source Agent Should You Pick? | TeamoRouter · TeamoRouter