Introduction¶
DeepSeek Harness (DSH) adopts a plugin-based architecture and aims to decompose complex tasks. When performing coding tasks locally, directly invoking a Claude Code subscription requires handling SDK integration, permission management, and state synchronization. The dsh-claude-code plugin solves this problem. It uses the official Claude Agent SDK to delegate self-contained coding subtasks to the local Claude Code subscription for execution and returns the results to DSH. DSH acts as the Leader, and Claude Code acts as the Worker.
Core Capabilities¶
This plugin does not extract OAuth tokens. It uses the official Claude Agent SDK to ensure compliant use of the subscription.
- Built-in Skill: Provides the
claude-code-delegationskill, which appears in the skill directory immediately after installation. - Memory and asynchronous tasks: Supports cross-turn memory with
resume(by passingsessionId) and supports asynchronous background tasks withrun_in_background. - Monitoring dashboard: Includes a built-in Web monitoring dashboard for viewing subscription quota, task lists, and real-time output.
- Tools and controls: Includes the built-in
claude_code_usagetool for viewing quota, and supports structured output, cost caps, and custom subagents.
Installation and Activation¶
Install it using the official DSH command:
dsh plugin --profile web add dsh-claude-code
After installation, DSH must be restarted to load components such as the Web monitoring dashboard.
Configuration Options¶
The plugin supports multiple configuration options. The following are common options:
| Field | Default | Description |
|---|---|---|
model |
sonnet |
Claude model alias or full id |
permissionMode |
acceptEdits |
Permission mode; acceptEdits automatically allows edits |
maxTurns |
100 |
Maximum turns per task |
timeoutMs |
600000 |
Collaboration timeout (milliseconds) |
thinkingMode |
Not set | Thinking mode; recommended replacement for the legacy parameter maxThinkingTokens |
proxy |
Not set | Proxy configuration, used to resolve Anthropic 403 issues |
If you need to resolve Anthropic 403 issues, set proxy in the configuration. It is recommended to use thinkingMode instead of the legacy maxThinkingTokens parameter.
Tool Usage¶
The plugin provides the following tools for DSH to invoke:
claude_code¶
Delegates coding tasks to the local Claude Code.
Parameters:
* task (required): Task description.
* cwd: Working directory; defaults to the DSH cwd.
* run_in_background: When set to true, the task becomes a background task and immediately returns jobId.
* resume: Passes back the previous sessionId to preserve context.
Return: Final result text + sessionId + token usage, etc.
claude_code_usage¶
Views the local Claude subscription quota.
Return: 5-hour/7-day window percentages, reset time, subscription tier, and other data.
Usage Examples¶
1. Foreground task execution
{ "task": "修复 src/parser.ts 里 parse() 对空输入的崩溃", "cwd": "/path/to/repo" }
2. Background asynchronous execution
{ "task": "把 src/ 全量迁移到新的 logger API", "run_in_background": true }
3. Multi-turn iteration
// 第二轮传入上次的 sessionId
{ "task": "上一步的修复里你漏了边界情况 X,补上", "resume": "abc-123" }
Notes¶
- Local cache: Uses local cache (
~/.claude.) and does not read sensitive account information. - Background task dependency: Background tasks require
dsh-tool-jobsto be installed; otherwise an error is reported. - Task history: Tasks exist only within the current DSH process; the most recent 20 are retained per session.
- Web panel: After adding the Web panel to an already installed plugin, DSH must be restarted.
- Network issues: Configure
proxyto resolve Anthropic 403 issues. - Parameter change:
maxThinkingTokensis a legacy parameter; it is recommended to usethinkingModeinstead.
Conclusion¶
This plugin uses the official SDK to integrate local Claude Code subscription capabilities into DSH. It is suitable for coding scenarios that require local execution and controllable costs. More details can be found on the project homepage.
- Project homepage: https://github.com/zhangjunjesse/dsh-claude-code
- Plugin directory: https://www.skillhub.cn/plugins/zhangjunjesse/dsh-claude-code