English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

DeepSeek Harness Deep Dive: Everything Is a Plugin, Even the Agent Loop

Forum topic · QianXun · 2026-08-14

Summary

A code-level research review of DeepSeek Harness (dsh), an open-source, plugin-centric Agent runtime foundation released by DeepSeek (v0.1.0-rc.5, MIT license, TypeScript/Node.js). The author verified claims against the actual source in a local clone, supplemented by InfoQ coverage and external analyses. Key findings: dsh is built on the Cordis plugin meta-framework (from the Koishi ecosystem); model adapters, tools, sandboxing, UI, and even the agent loop are replaceable plugins assembled from YAML presets into four modes (Standard, Code/PTC, Minimal, Creator). Notable verified mechanisms include an append-only session-event log as the single source of truth with runtime-enforced invariants, a waterfall middleware pipeline for tool calls, OS-level sandboxes (Windows restricted tokens, Linux Landlock/bwrap, macOS Seatbelt), and a unified SubagentProvider interface that can delegate to Claude Code, Codex, ACP, or a dsh SDK runtime. The review corrects several overstated external claims: Creator mode cannot hot-swap its own harness at runtime, dynamic package activation on the host half needs no approval, and long-term memory/adaptive compression remain roadmap items. Multi-agent orchestration is a hierarchical Supervisor-Worker pattern, not a swarm. Risks include breaking changes ahead, no external PRs accepted, and a strategy read as commoditize-your-complement for DeepSeek models.

DeepSeek Harness Deep Research: Everything Is a Plugin, Even the Agent Loop

> Source: forum research post on github.com/deepseek-ai/deepseek-harness (v0.1.0-rc.5, MIT), verified against a local clone (deepseek-harness-research) with code-level citations (file:line), cross-checked against InfoQ and third-party breakdowns.

Key points

  • Positioning: dsh is an open-source Agent runtime foundation (plugin-centric / "concrete-harness"), not a fixed-features Coding Agent. Built on the Cordis plugin meta-framework from the Koishi/cordiverse ecosystem, grounded in the paper *A Programming Paradigm for Spatiotemporal Composability*. 49-package monorepo, ~1,981 TS files, Node ≥ 22.19, MIT licensed, no external PRs accepted for now. Launch: npx @deepseek-ai/dsh web → http://127.0.0.1:3080.
  • Model-agnostic: default DeepSeek, with providers for Anthropic, OpenAI, Bedrock, Vertex, Azure, and any OpenAI-compatible endpoint.
  • Fact corrections vs. external coverage

    | Common claim | Verified reality | | --- | --- | | "Four modes = Standard/PTC/Minimal/Creator" | Internal names Standard / Code (publicly "PTC") / Minimal / Creator; each is a cordis.yml preset combo, not separate systems (apps/cli/config/agent-presets/*) | | "Creator mode lets the agent rewrite its own harness" | Half-true: cordis_* tools allow in-memory, immutable, non-persistent package activation (lost on restart); persistent authoring writes new presets to disk but requires restart — no runtime hot-swap (tool-cordis/src/index.ts:148-379) | | "No privileged core" | Holds structurally (whitelist facade, denyContext), but the host-half node:vm sandbox itself admits "is not containment"; a de-facto semantic kernel exists (ctx.* services, agent/* events, SessionEvent) | | "Memory compression/conflict cleanup/path reuse/Plan validation are next" | Only compaction is implemented (CompactionEngine + BasicCompactionEngine); long-term memory, ACP, causal-graph retrieval have no code or doc traces — roadmap, not reality |

    Architecture

  • Everything is a plugin in a Cordis Context microkernel: model adapters, tool registry, session log, sandbox/permissions, and even the Agent Loop register as services/events/effects, assembled by a cordis.yml.
  • Four-layer config synthesis: bundle → profile patch → home patch → --patch, last-write-wins by id; dsh --dump-config synthesizes without booting (apps/cli/src/dump-config.ts:30-52).
  • Session log as single source of truth: Turns/Steps are events; deriveMessages() is a pure projection, and an invariant compares the outgoing request with the log-rebuilt messages via JSON.stringify before every dispatch — "model-visible means logged" is machine-enforced (agent-loop/src/invariant.ts:39-52).
  • Waterfall middleware pipeline: tools/pre-execute → execute → post-execute → result; hooks, approvals, timeouts, and sandbox reminders all hook the same chain, and PTC sub-calls go through the same ToolRuntime.execute gate — cannot bypass safety.
  • OS-level sandboxes: Windows CreateRestrictedToken (fails closed), Linux Landlock/bwrap, macOS Seatbelt (sandbox-local/src/profiles.ts:16-58).
  • Modes and multi-agent

  • Code/PTC mode: the model only calls run_code and orchestrates tools programmatically via await tools.name(args), collapsing multi-round tool calls into one.
  • Creator mode: seven cordis_* tools; pure host-half dynamic package activation requires no approval (a security floor worth noting).
  • Modes lock once a session starts (agent-preset-locked); only blank sessions can switch.
  • Subagent seam with six providers: spawn/fork (in-process, on by default), plus opt-in claude-code, codex, acp, dsh-sdk — dsh can delegate to competitor agents through one uniform interface.
  • Orchestration verdict: hierarchical Supervisor–Worker with maxDepth:3; repo-wide grep finds no swarm/peer-to-peer/negotiation primitives. "Architecturally novel, paradigm-wise not a breakthrough" is confirmed at code level.
  • Observability, recovery, strategy

  • Fork/resume/replay/telemetry all derive from the same event stream; crash repair synthesizes TOOL_OUTCOME_UNKNOWN events; auto-continuation deliberately requires a human-authorized resume.
  • Comparison frame: dsh (concrete-harness, replaceable loop) vs. Anthropic Managed Agents (meta-harness, interface-defined); the real competition is over the ecosystem's stability layer — whose event semantics become the industry default.
  • Strategy read: "Commoditize Your Complement" — a free, generic harness drives demand toward the best model. But MIT + generic seams let competitors plug in for free, and DeepSeek raised V4-Pro API pricing ~4.6× days after release (razor-and-blades).

Risks

1. Interface stability: the de-facto semantic kernel must freeze; README warns of breaking changes. 2. Dependency/version churn across 49 packages. 3. Performance overhead of waterfall middleware and per-event log projection. 4. Debugging complexity across plugins. 5. Ecosystem governance: no external PRs, quality unproven.

Bottom line: v0.1 is a design blueprint — the most radical "everything is a plugin" Agent runtime to date, code-verified in its core claims, but its success hinges on whether "replaceability" matures into a stable standard that third parties actually build on.

Tags

#deepseek-harness#agent-runtime#plugin-architecture#cordis#multi-agent-orchestration#open-source#observability#sandboxing

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/178633474