Preface¶
DeepSeek Harness (DSH) is an open-source agent orchestration framework that provides real tools, sandboxes, presets, and session history. However, DSH itself runs in a separate process, making it impossible for hosts like Claude Code or Codex to directly schedule its agents. DSH Adapter turns DSH agents into native sub-agents within the host, allowing the host to invoke DSH’s capabilities directly during conversations while preserving DSH’s session management and history.
What Is This¶
DSH Adapter is a DSH plugin maintained by zx-yk. It exposes DSH agents to hosts such as Claude Code / Codex, enabling the host to dispatch tasks to DSH agents and monitor real-time progress in the form of native sub-agents. The plugin operates in Hub-only mode; by default, tasks are completed exclusively within the DSH instance. If DSH is unreachable, a clear error is returned rather than silently falling back to an unavailable runtime.
Core Features¶
1. Native Sub-Agents and Real-Time Progress¶
Sub-agents in the host display the current step, tools in use, and token counts. Claude Code supports a status bar HUD display. Tasks run as sessions within the DSH instance, and upon completion, session details can be viewed in the DSH Web UI.
2. Tiered Routing and a Real Capability Catalog¶
The plugin defines tiers to distinguish capability levels — for example, flash for mechanical work and pro for reasoning. Tiers are not bound to specific models but are resolved by priority:
- The
provider/modelexplicitly specified by the caller; - Bindings stored in the settings page (e.g.,
flash_provider,flash_model, etc.); - Built-in defaults configured in DSH.
When a tier is unbound, the plugin probes DSH’s providers, finds the first binding that supports streaming routing, and persists it. This eliminates hidden fallbacks; the routing logic is transparent and auditable.
3. Hub-Only Execution Mode¶
By default, tasks execute within the DSH instance’s hub. The plugin’s settings page provides execution mode options, configurable timeouts, hub address, vision and image-generation providers, and custom providers.
4. Multimodal Capabilities¶
Text models can gain vision and image-generation capabilities through DSH providers or any OpenAI-compatible endpoint. The plugin provides two tools — describe_image and generate_image — invoked via a configured bridge endpoint.
5. Workboard and Persistent History¶
The DSH Web UI offers Workboard and History tabs that display task success/failure counts, average duration, and failure reasons. Task states, tool calls, assistant text, and more are persisted in the session and viewable in the UI.
Installation and Enablement¶
Install the Plugin¶
Run the following in the DSH command line:
dsh plugin --profile desktop add @zoraxylia/dsh-codex-adapter
After installation, the plugin is added to the DSH profile.
Enable Integration¶
Once installed, open Settings → DSH Adapter in DSH. Install the corresponding integration based on your host:
- Claude Code: Add the marketplace directory and the enabled plugin to
~/.claude/settings.json, configure MCP permissions, and optionally enable the status bar HUD. - Codex: Register
ds-flash/ds-proagent roles in~/.codex/agents, write the prompts, and add a[mcp_servers.dsh-adapter]entry to the global configuration (with a toggle switch). - Antigravity / Grok: Register the MCP server for the respective CLI.
Restart the host client after installation. Codex Desktop and CLI share the ~/.codex directory, so a single installation covers both.
Typical Usage¶
Codex (Desktop or CLI)¶
The Codex desktop has no sub-agent spawn UI, so the plugin registers the MCP server globally at install time, allowing any session to invoke tools directly.
Run a task:
Use dsh_run_worker to fix the failing test in D:/repo, tier pro,
cwd D:/repo, timeout 900. Report the diff and the test output.
Follow a task in real time:
Call dsh_worker_watch on hub-1-… with after=<cursor>, wait_seconds=30,
and tell me each tool call (command included) as it happens.
dsh_worker_watch returns real-time events within the next time slice, including tool names, arguments, result summaries, assistant text, and step boundaries, along with a cursor for the next call. dsh_worker_status also carries the most recent 12 events.
In the CLI, you can use agent roles:
spawn ds-flash to rename the getter in src/config.ts and run the tests
spawn ds-pro to review the migration in db/migrations and list the risks
Claude Code¶
The plugin’s marketplace entry exposes the same tools. You can request a worker directly in conversation, or use the provided commands:
/dsh-status # View real-time tasks, locks, and token usage
/dsh-config # View session-level tier / mode / route settings
Tool List¶
| Tool | Purpose |
|---|---|
dsh_run_worker |
Run a task and block until completion |
dsh_spawn_worker |
Start a task in the background and return a job ID |
dsh_worker_status |
View real-time tasks, current tool, tokens, workspace locks |
dsh_worker_result |
Get the final result of a task, optionally with a wait |
dsh_worker_watch |
Track a running task: new tool calls, arguments, results, and assistant text |
dsh_worker_cancel |
Cancel a task and release its locks |
dsh_worker_config |
Read or modify session tier / mode / route / policy |
dsh_worker_probe |
Test a configured provider/model with a small request |
describe_image / generate_image |
Vision and image generation via a configured bridge endpoint |
Use Cases and Considerations¶
This plugin is suited for developers who need to integrate DSH agents into hosts like Claude Code or Codex, especially in scenarios where preserving DSH’s session management, history, and tool sandboxing is important.
Note: The plugin runs with the permissions of the current DSH process. Before installing, review the source code and license to confirm that its behavior meets your security and compliance requirements.
Conclusion¶
DSH Adapter transforms DSH’s agent capabilities into native sub-agents within the host, providing tiered routing, Hub-only execution, multimodal support, and persistent history. If you use DSH within Claude Code or Codex, this plugin can reduce context switching across tools and make task orchestration more controllable.
- Plugin catalog page: https://www.skillhub.cn/plugins/zx-yk/dsh-codex-adapter
- GitHub repository: https://github.com/zx-yk/dsh-codex-adapter