DeepSeek Harness: From Your Files to the Model
DeepSeek publishes DeepSeek Harness (dsh) 0.2.2-rc.5 under the MIT license, running a local Node loop at 127.0.0.1:3080 with Cordis plugins and strict logs.
By Dillip Chowdary • Dec 03, 2026 • Source: akashtandon.in

At a glance
- Product
- DeepSeek Harness (dsh)
- Version
- 0.2.2-rc.5 (developer preview)
- License
- MIT license
- Web endpoint
- 127.0.0.1:3080 via npx @deepseek-ai/dsh web
- Default permissions
- workspace-write sandbox and ask approval policy
- Plugin framework
- Cordis (202 web profile entries, 99 shared base)
In this post
DeepSeek publishes DeepSeek Harness (dsh) under the MIT license as an open-source developer preview for running AI models on local codebases, according to akashtandon.in's report. Because a model only accepts and returns text without memory or file access, the harness handles context building, session history, tool selection, and permissioned execution. Release 0.2.2-rc.5 on npm works with DeepSeek or third-party model hosts.
This article examines how dsh operates between local files, model hosts, and vendor cloud services, using source code inspection and localhost test runs of dsh 0.2.2-rc.5. It is written for software engineers evaluating open-source harnesses alongside Claude Code and Codex. Readers will learn how dsh chooses files, routes data, logs tool activity, enforces permissions, and loads plugins.
01Three data-flow questions on local code
The design of dsh spans three locations: the user's machine, the model host running inference, and vendor cloud services like search or sign-in. Unlike tools that maintain an index or embeddings, dsh does not choose files on its own. It loads instruction files such as AGENTS.md automatically, while the model requests project files one tool call at a time using grep, glob, and read.
With external hosts like Fireworks, Baseten, or Modal, requests travel directly from your machine to that host without touching DeepSeek. Web searches still route to DeepSeek if a DeepSeek key or sign-in exists, and signing in or submitting feedback also contacts DeepSeek. DeepSeek's API adapter also appends a copy of the session log by default, making its requests larger than other providers.
The loop, file access, shell, and session history all run on the local machine, making the model endpoint the only required remote part. Developers can even point that endpoint to their own server. Codex and Claude Code share this local architecture, then add hosted runs that dsh does not ship.
Note: The report tested dsh 0.2.2-rc.5 in a small project with made-up API keys and a fake localhost server, so byte counts reflect only what dsh sends and nothing about provider responses.
02Local web server and headless modes
Running npx @deepseek-ai/dsh web starts a Node process serving a browser page at 127.0.0.1:3080. The browser tab acts as the client and the Node process acts as the server, with both running locally on the user's machine. Nothing in that client-server split involves a cloud service.
The same Node process also runs without a browser page in other workflows. Developers can execute it as a one-shot headless command or drive it through a TypeScript or Python SDK. Across every mode, the local process manages requests, tools, and session state.
03Session logs, steps, and replay rules
Advertisement
Tech Pulse Daily
Get tomorrow's pulse first
Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.
In dsh, a step is one model request plus its tool calls, while a turn is the run of steps answering one user message. Everything that happens is appended to a session log, and the history sent to the model is computed from that log.
In docs/architecture.md, DeepSeek Harness enforces a strict rule: "Model-visible means logged. Every model request must be reconstructable from the log." That design enables resume, fork, and replay features. It also means the log retains all file contents and command output the model saw.
04Tool calls, sandboxes, and approval policies
Because a model can only reply and cannot open files or run commands, each step includes tools such as read, grep, write, and bash. The model invokes one by returning its name and inputs, like read on src/pricing/discount.js. Then dsh executes the tool and puts the result in the next request.
Since every action passes through dsh, two settings control what it refuses: sandbox mode and approval policy. Sandbox mode limits file edits to none for read-only, workspace-write for project and temporary folders, or danger-full-access for any path. Calls exceeding the sandbox prompt you under ask or auto-reject under never, with new sessions defaulting to workspace-write and ask.
05Cordis plugins, agent instructions, and profiles
Every part of dsh is a plugin managed by the Cordis framework, which loads YAML lists and passes events between modules. Plugins expose an apply setup function receiving a ctx object to provide services, register tools via ctx.tools.register, or subscribe to events via ctx.on. The agent-instructions plugin uses agent/pre-step and tools/result to load AGENTS.md files automatically.
- Plugin loads The apply function registers handlers for agent/pre-step and tools/result before any instruction file is read.
- Pre-step check Before the first step, agent/pre-step fires and the plugin writes unread AGENTS.md files to the session log.
- Tool result After the model calls read, write, or edit, tools/result fires and notes the accessed file.
- Folder scan When the step ends, the plugin checks that file's folder and queues any unseen AGENTS.md file.
Because the agent loop does not track which plugins are listening, disabling agent-instructions in a test run stopped AGENTS.md files from being sent without changing anything else in the requests. Other core plugins connect through the same ctx object and event hooks:
| Plugin | What it does | How it connects |
|---|---|---|
| tool-fs | Adds file tools such as read, write, and edit | Adds to the tool list |
| llm-pi-ai | Sends requests to hosts such as Fireworks | Adds to the model adapters |
| session-log-deepseek | Copies the session log into requests to DeepSeek | Adds a field to those requests |
| session-title | Sets session title via session-title-llm | Event: your message was logged |
| compaction-basic | Summarizes old history when it gets too long | Event: a step is about to start |
Cordis loads named YAML profiles for each runtime mode: web for the browser app, headless for one-shot commands, and sdk or acp for external programs. The web and headless profiles share 99 base entries, with web adding 103 to reach 202 and headless adding 2. Passing --dump-config prints any profile's list without starting a session.
Frequently asked questions
Does dsh index my codebase or use embeddings to pick files?
No. dsh keeps no index and no embeddings; it automatically loads instruction files like AGENTS.md and relies on the model to request project files one tool call at a time using grep, glob, and read.
What happens to data when using Fireworks, Baseten, or Modal with dsh?
Requests go straight from your machine to that inference host without passing through DeepSeek. However, web searches with a DeepSeek key or sign-in, signing in, and submitting feedback still contact DeepSeek, and DeepSeek's own API adapter appends the session log by default.
What are the default sandbox and approval settings in dsh?
New sessions start with the workspace-write sandbox mode, which limits edits to project and temporary folders, and the ask approval policy, which prompts you before running actions beyond that sandbox.
Can dsh run without a browser interface?
Yes. While npx @deepseek-ai/dsh web serves a local UI at 127.0.0.1:3080, the same Node process runs as a one-shot headless command or behind a TypeScript or Python SDK.
Sources
Author
Dillip Chowdary
Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.
Related on Tech Bytes
Advertisement