跪拜 Guibai
← All articles
AI Programming

DeepSeek Harness Exposes the Agent Assembly Line That Codex Keeps Hidden

By 子昕AI编程 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Most coding agents ship as sealed products; Harness opens the hood on every joint — tool dispatch, permission boundaries, model routing — and gives developers a local, debuggable harness to swap parts or build their own agent assembly. For teams evaluating agent architectures or integrating custom models behind a corporate gateway, that transparency is immediately useful.

Summary

DeepSeek Harness delivers a local coding agent where the model, tool set, permissions, and session presets are all exposed and replaceable. A single `npx` command starts a web UI at localhost:3080; after pointing it at a workspace directory and an API key, the agent reads, edits, and runs commands against that project. Four session presets — Standard, PTC, Minimal, and Creative — are not different models but different tool-and-prompt assemblies. PTC mode, in particular, lets the agent generate and execute TypeScript snippets that loop over tool calls internally, changing how multi-step operations are organized without swapping the underlying model. A built-in trace viewer logs every tool invocation, model response, and context injection, making agent behavior debuggable step by step. Plugins are the composable unit: model adapters, tools, UIs, and workflows all arrive as plugins, and the presets themselves are plugin combinations. Custom model providers plug in via a standard provider interface, though the server must speak the expected protocol. No official desktop app exists yet; community wrappers bundle the CLI and web UI into double-clickable Electron shells. The project remains a fast-moving developer preview, best suited for engineers who want to understand or reshape how an agent is assembled rather than those who just want finished coding tasks.

Takeaways
— Harness starts with `npx @deepseek-ai/dsh web` and serves a local web UI at port 3080; a workspace directory must be selected before the input box activates.
— The four session modes — Standard, PTC, Minimal, Creative — are tool-and-prompt presets, not different models or intelligence levels.
— PTC mode adds a `run_code` entry point so the agent can write and execute TypeScript that loops over tool calls, reducing top-level tool invocations for repetitive tasks.
— In a side-by-side scan of 248 `package.json` files, Standard made 10 top-level tool calls while PTC made 6, though PTC still generated heavy internal tool scheduling and initially included `node_modules`.
— A trace viewer logs every tool call, model output, and context injection chronologically, making it possible to pinpoint where a task stalled.
— Permissions (read-only, workspace-write, danger-full-access) are a separate setting from Plan mode; workspace-write constrains writes but does not sandbox reads or network access.
— Custom model providers require the server to support the expected protocol and authentication method — pasting a URL is not enough.
— Plugins are the composable unit: model adapters, tools, UIs, and workflows all arrive as plugins, and the four presets are plugin combinations.
— No official desktop app exists; community wrappers bundle the CLI and web UI into Electron shells.
— Harness is a developer preview with rapid version changes; it suits tinkerers more than developers who just want finished coding tasks.
Conclusions

Harness reframes the agent as a configurable assembly rather than a finished product, which shifts the developer's relationship from user to integrator — useful for teams that need to audit or constrain agent behavior.

PTC mode is easy to misread as a smarter model; it's actually a dispatch strategy that offloads repetitive tool-calling loops into generated code, a pattern that could reduce token spend on multi-step read-only tasks but doesn't eliminate internal tool chatter.

The requirement to select a workspace before the input box works is a small but telling design choice: Harness treats the agent as a project-scoped tool, not a general-purpose chat window.

Custom provider integration is gated on protocol compatibility, which means corporate gateways and self-hosted models need more than a compatible API surface — they must match the expected request/response contract.

The absence of an official desktop app and the existence of multiple community wrappers suggest the project is prioritizing the framework layer over polished distribution, consistent with a developer preview.

Concepts & terms
Agent = Model + Harness
The formula used by DeepSeek Harness to describe a coding agent: the model provides reasoning and tool-use requests, while the harness provides file I/O, terminal access, permissions, session management, and the UI that executes those requests.
PTC mode (Programmatic Tool Calling)
A Harness preset that gives the agent a `run_code` tool, allowing it to generate and execute TypeScript snippets that internally loop over tool calls, filter results, and return aggregates — changing how multi-step operations are organized without changing the underlying model.
Agent preset
A pre-assembled combination of tools, prompts, and presentation settings that defines what an agent session can do. Harness ships four presets (Standard, PTC, Minimal, Creative), each a different plugin bundle.
Trace viewer
A chronological log in Harness's web UI that records every session event — model output, tool calls, injected context, and execution results — color-coded by type, enabling step-by-step debugging of agent behavior.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗