DeepSeek Harness · Beyond the Source

Finale: Five Engineering Views — What Should We Copy?

Five harnesses’ design-philosophy master table, plus a minimum copy list and a scale-trap list.

Course goalThis is the last lesson in the series. After it you can answer three questions: where the five harnesses stand on source of truth, extension, and safety; which five DSH mechanisms you can copy without its framework; and which designs look tempting but you must not touch without a dedicated team.
Interactive demo · Design-decision buffet

Play first, then the lecture. Below are the main mechanisms from the whole series as checkable cards — each tagged with the problem it solves and its prerequisite mechanisms. Pick what your project needs like ordering dishes; the right side builds your architecture list live: missing deps go red, scale traps warn whether you can afford them. Hit Play for a typical foot-gun-then-fix walkthrough.

Your architecture list
No mechanisms checked yet.
Check freely, or hit Play for a typical flow.
Five engineering views · one master table

The series dissects DSH, but every lesson compares with others. For the finale, put all five on one table. Three dimensions: source of truth (where the authoritative copy of conversation state lives), extension model (how third parties add capability), safety reliance (what keeps you from blowing up).

Source of truth
Extension model
Safety reliance
Stance in one line
DSH
append-only event log (zstd-compressed JSONL); recover, fork, search, and replay share one copy
Everything Is a Plugin: 219 packages, 49 groups, out-of-tree bundle install
Mechanism layer: runtime asserts, type boundaries, provenance auth, monotone proofs
Runtime first — provability beats shipping speed
Claude Code
JSONL session files (post-hoc recording), for recovery and inspection
hooks + MCP + subagents and plugins
Permission confirm dialogs + production monitoring feedback (circuit-breaker thresholds from real billing data)
Product monolith; data-driven stop-loss
Grok Build
In-memory dialogue primary, async disk secondary; disk failure does not interrupt the conversation
70+ crates composed statically (local-snapshot count), shaped at compile time
Rust type system + confirmation flows; templates fixed at compile time
Performance and static determinism first
Codex CLI
JSONL session rollout files
MCP-first external capability
Tiered approval modes + OS-level sandbox (Seatbelt / Landlock)
Sandbox first — distrust the execution environment by default
OpenCode
Session data in local files
Provider abstraction + plugins; multi-model access
Permission confirmation first
Open-source TUI first — swappable models are the #1 need
DSH, Claude Code (restored source + official materials), and Grok Build columns are line-checked against local repos; Codex CLI and OpenCode columns are from public materials, not line-checked — verify before you choose. For Grok’s finale evidence compare, see Grok Build vs Claude Code evidence compare.

After the table, remember one thing: none of the five is right or wrong — only stance. Claude Code’s circuit-breaker numbers come from real bills; Grok’s static composition buys compile-time certainty; Codex writes distrust into the OS layer; OpenCode puts swappable models first. DSH’s peculiarity is ranking provability above “nice to use” — a runtime stance, and the root of its doc and test bulk.

Minimum copy list · five pieces you can ship without Cordis

The series covered ~30 mechanisms; most bind to DSH’s plugin framework. Five are pure ideas you can take and use:

  1. Event-log source of truth. Conversation state lives in one append-only event sequence; the message array is always derived from it. One JSONL file plus a fold function is the minimal build — recovery and replay come free (details in Model-visible ⟺ logged).
  2. Three input semantics. Messages users send while the agent works get three explicit fates — queue, interject, interrupt — as interface semantics. Without this layer, input timing is Schrödinger’s state.
  3. Dual-path compaction. Active pressure probing and passive overflow recovery hang separately — different events, conditions, failure semantics (see Compaction Dual Paths).
  4. Provenance auth. Every chunk entering context carries a source tag; high-privilege ops only trust trustworthy sources. Instructions hidden in tool results cannot impersonate the user.
  5. Monotone Guard. Dangerous releases like retry and recovery always demand monotonically increasing evidence (generation numbers, counters) — never a plugin’s word alone.

What the five share: they are interface-semantics decisions, independent of language or framework. A weekend builds the rough cut; the rest is polish.

Scale-trap list · three tempting things not to copy

Conversely, three things DSH piled up with dedicated-team headcount — individuals and small teams will go sideways if they copy:

  1. A 219-package plugin tree. Everything Is a Plugin means every capability splits into Service Definition, Provider, and Consumer roles, with README, tests, and doc pairing. DSH has 49 package groups and 268 READMEs. For the same need in your project, a plugins folder plus conventions is enough.
  2. Bilingual three-file doc pairing. Each doc is English, Chinese, plus a .i18n.yaml recording both blob hashes — change one side without reconfirming the pair and CI goes red. Beautiful discipline; cost starts at 2× per doc change.
  3. Per-file 100% coverage gate. Every source file needs 100% line coverage. DSH’s own proposed note (2026-06-11-mutation-testing) admits coverage only proves code ran. Without AI-scale test writing capacity, the gate just pushes “runs but never asserts” fake tests.
Copy mechanisms, not the framework

The five copyables are interface semantics; the three traps are infrastructure. Test: does the design still hold if you delete the framework? If yes, copy it.

Scale is cost — and a team’s self-proof

18k lines of docs, 684 active and archived notes, per-file coverage gates — keeping them requires AI capacity plus someone owning the gates. What it proves is investment more than necessity.

What’s unfinished is honest too

DSH puts unfinished work in black and white: pre-release posture, no format compatibility promise, MCP bridges only one capability, no interactive TUI. To judge a project’s maturity, see if it dares publish that table.

What DSH itself hasn’t finished · in black and white

The finale doesn’t hype the hero. DSH is a developer preview; section 2 at the top of root AGENTS.md states the pre-release stance:

Remove this section at the first tagged release. With no external consumers, prefer the correct foundation over compatibility shims: rename or repackage freely and update every reference together. Backends reject old on-disk formats. SQLite uses monotonic SCHEMA_VERSION; dsh-session keeps SESSION_FORMAT_VERSION at 0 with no compatibility promise.
(Roughly: remove this section at the first tagged release. With no external consumers, prefer the correct foundation over compatibility shims; backends reject old on-disk formats; session format version stays at 0 with no compatibility promise.) Source: deepseek-harness-master repo root AGENTS.md lines 5–7, verified on 2026-08-13

On MCP, only tools are bridged; Resources and Prompts are explicitly deferred — packages/mcp/mcp-client/README.md line 111: “Tools are the only bridged MCP capability — Resources and Prompts have no harness consumer and are deferred.” Product entry points are only Web UI and headless (apps/ has just cli and web) — no interactive TUI like Claude Code or Grok Build. These three aren’t black marks; they’re trade-offs: don’t pour the second floor before the foundation sets.

Minimal mode · harness as a model measuring instrument

One last piece that’s easy to skip — and best explains DSH’s motive. Its four product modes are four preset config files; minimal mode’s core config is just these lines:

apps/cli/config/agent-presets/minimal/agent.cordis.ymllines 1–13
# The `minimal` agent preset: a fixed-prompt, two-tool coding-agent composition.
#
# The persona is the complete system prompt, so global identity, Web orientation,
# tool guidance, and later assembly listeners cannot add prompt text. Runtime
# context snapshots are suppressed for this preset, and the model composes only
# persistent `bash` and `str_replace_editor`. Context compaction is absent.

- id: persona
  name: '@deepseek-ai/dsh-persona'
  config:
    text: You are a helpful software engineer assistant.
    complete: true
    includeRuntimeContext: false
Source snapshot note: Based on the local deepseek-harness-master repo; verified against apps/cli/config/agent-presets/minimal/agent.cordis.yml, verified on 2026-08-13. Code blocks keep the original source text.

Read what this config does: the System Prompt is one sentence and marked complete — no plugin can add text; runtime context is suppressed; tools are only bash and str_replace_editor; no compaction. Every harness-side variable is wrung to the minimum. Root BENCHMARK.md recommends running this minimal variant via the Python SDK for benchmarks, with an independent workspace and session per task.

That explains one motive for DeepSeek building a harness: a model vendor needs a standardized, reproducible, compaction-free measuring instrument for its own models — and happened to ship a general runtime. Anthropic built Claude Code so the model serves the product; half of DeepSeek’s DSH is to measure the model itself. Different stance, different engineering view. Looking ahead, agentic RL training and model eval will only grow hungrier for replayable, provable harnesses — likely where DSH’s heavy-mechanism path pays off first.

The control group’s finales corroborate: Grok series Engineering retrospective & evidence boundary and Coding Agent design workbench answer the same questions from a Rust monolith angle — read both sides and the five engineering views line up.

Classroom Exercise
01

Architecture-review your own project with the buffet

Go back to the top demo and check against your real project: mark what you already have, leave gaps empty. Read the red warnings on the right — find at least one missing-dep combo (e.g. retry logic with no monotone evidence). Then answer: how little code to fill the gap? If more than a week, you should copy a lower layer first.

Takeaway: Five harnesses — no right or wrong, only stance: product monolith, static composition, sandbox-first, multi-model open, provable runtime. Copy mechanisms, not frameworks: event-log source of truth, three input semantics, dual-path compaction, provenance auth, monotone Guard — take all five; 219-package plugin tree, bilingual doc pairing, per-file full coverage — don’t touch without a dedicated team. One test: a design worth copying still holds after you delete the framework.