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.
- 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 byid;dsh --dump-configsynthesizes 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 viaJSON.stringifybefore 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 sameToolRuntime.executegate — cannot bypass safety. - OS-level sandboxes: Windows
CreateRestrictedToken(fails closed), Linux Landlock/bwrap, macOS Seatbelt (sandbox-local/src/profiles.ts:16-58). - Code/PTC mode: the model only calls
run_codeand orchestrates tools programmatically viaawait 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-inclaude-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. - Fork/resume/replay/telemetry all derive from the same event stream; crash repair synthesizes
TOOL_OUTCOME_UNKNOWNevents; 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).
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
Modes and multi-agent
Observability, recovery, strategy
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.