Introduction¶
In the DSH plugin ecosystem, a common requirement is: wanting to drive a specific session with the local Claude Code CLI without completely replacing the dsh web session interface. Existing approaches often involve running claude separately in the terminal and manually moving output, approvals, and tool results back to dsh web; this approach loses dsh’s session rendering, approval cards, and command panel.
claude-in-dsh targets this scenario: it delegates a session from DeepSeek Harness (dsh web) to be driven by the local Claude Code CLI, while continuing to use dsh’s native session rendering to display transcripts, tool cards, approvals, and the command panel. Below, we introduce its positioning, capabilities, installation method, and notes.
What is it¶
claude-in-dsh is a dsh web plugin maintained by GeekRicardo, licensed under MIT. It is a community plugin within the DSH plugin ecosystem; the community directory is an independent site with no official affiliation to DeepSeek / Huanfang.
Its one-sentence positioning is: delegate a session from dsh web to be driven by the local Claude Code CLI. The agent’s work happens within the local claude, while dsh web is responsible for receiving the stream and displaying the results using dsh’s native UI.
Core Capabilities¶
Session Engine Selection¶
The plugin provides a DSH | Claude Code engine selector, with switching that is mutually exclusive per session. Once a session has been run by DSH or Claude, it continues to belong to that engine; the binding relationship is inferred from session logs and is not lost after restart.
Native Session Rendering¶
Claude’s streams are written as dsh persistent session events, which are then displayed using dsh’s native session rendering for transcripts, tool cards, approvals, and the command panel. Sub-agents (Agent tools) are rendered as nested sub-calls.
Permission Levels and Approvals¶
Upon switching to Claude, the plugin replaces the dsh access mode selector with Claude permission levels. The permission levels include:
manual / acceptEdits / auto / bypassPermissions / plan
Claude’s permission requests (can_use_tool) are bridged to the dsh native approval UI. If Claude’s PermissionRequest hook is configured, it is fully followed.
Question and Plan Review¶
Claude’s AskUserQuestion is delegated to dsh’s question service and displayed using dsh’s native question card. Questions are always asked to a human and are not affected by permission levels.
Claude’s ExitPlanMode is used to review via dsh’s plan review card. Upon approval, it exits plan mode and falls back to the supervisory permission level; when choosing to continue planning, the feedback is sent back to the model as is.
Model, Commands, and Subscription Usage¶
The plugin provides a list of Claude models and reasoning effort selection, and allows switching models via set_model at runtime.
Claude’s slash commands are merged into the dsh command panel; one-time commands like /mcp, /context, /usage are executed out-of-band.
With an official subscription, usage and refresh countdown are displayed below the input box. Usage readings will override dsh-balance seat counts and will automatically restore when switching back to DSH.
Process Management and Catch-up Broadcasting¶
The Claude process is managed by an independent broker (setsid), so hot updates or dsh restarts do not interrupt the running round. During dsh restarts, Claude’s completed output is also broadcast into the transcript.
Only real user speech wakes Claude; notification messages injected by the dsh plugin system do not consume a subscription quota, and the content is carried over with the next real user speech.
Prerequisites¶
Before using, the following conditions must be met:
- Node.js ≥ 20
- pnpm
- dsh web has been started at least once (exists
~/.dsh/profiles/web) - Claude Code CLI is installed and logged in locally (2.1.x)
Installation and Enablement¶
Installation¶
First, execute the official installation command:
curl -fsSL https://raw.githubusercontent.com/GeekRicardo/claude-in-dsh/main/install.sh | bash
After installation, restart dsh web and hard refresh the page. If using pm2, you can execute:
pm2 restart dsh-web
Local Development¶
If using a local workspace directory instead of a GitHub snapshot, you can execute:
bash install.sh --link /path/to/claude-in-dsh --restart
Safe Restart¶
Using pm2 restart directly will interrupt the running round and leave a TOOL_OUTCOME_UNKNOWN red card in the conversation. It is recommended to use the safe restart script provided by the plugin:
bash scripts/safe-restart.sh
It will confirm there are no ongoing Claude rounds before restarting.
Typical Usage¶
Import Local Claude Code Conversation¶
- Open the dsh web workspace
⋯menu. - Select “Import Claude Code Conversation”.
- Select a local Claude session to preview, then continue chatting.
Input While Running¶
When running rounds, you can use different keys to control input:
Ctrl/Cmd+Enter: Interrupt, directly folding into Claude’s current round.- Normal
Enter: Follows dsh’s queue semantics.
After pasting an image in a Claude session, the image is saved as a dsh native attachment and sent to Claude with the next message.
Local Build¶
If you only change code in src/, then execute:
pnpm build
Or execute:
pnpm test
pnpm test will build first, then run bundle smoke tests.
Runtime Locations¶
Here are some common runtime locations for troubleshooting:
/tmp/ccmode/<sessionId>/
~/.cache/ccmode/state.json
RPC is same-origin POST /claude-in-dsh/rpc, limited to loopback + same-origin, intended for the plugin’s client.
Suitable Scenarios and Notes¶
Who is it for¶
Suitable for people who want to switch the dsh web session to be driven by the local Claude Code CLI, while retaining dsh’s native rendering, approvals, command panel, and attachment display.
Notes¶
- The plugin runs with the current dsh process permissions; you should check the source code and license before installing.
- Once the session engine is bound, that session continues to belong to DSH or Claude; do not frequently assume that the capabilities of the two engines are consistent within the same session.
AskUserQuestionalways asks a human and is not affected by permission levels.- Official subscription usage readings will override dsh-balance seat counts and will automatically restore when switching back to DSH.
- When restarting dsh web, prioritize using
scripts/safe-restart.shto avoid interrupting the running round.
Conclusion¶
The value of claude-in-dsh lies in: not needing to manually move things between dsh web and Claude Code CLI, but letting a dsh session be directly driven by the local Claude, while continuing to use dsh’s approvals, questions, command panel, and native rendering.
The directory page can be searched for the plugin name claude-in-dsh in the community directory; the specific URL depends on the actual display on the plugin site. GitHub:
https://github.com/GeekRicardo/claude-in-dsh