INSIGHTS

cli-dispatch: A Plugin That Makes Claude the Boss and DeepSeek the Worker

cli-dispatch is a Claude Code plugin that hands tasks to a DeepSeek worker while Claude Code verifies the result; this post covers setup, commands and safety brakes.

Remzi Binar · 24 June 2026

Update (November 2026): cli-dispatch now works with Gemini (Antigravity), OpenAI Codex, OpenCode, GitHub Copilot and a local Ollama model as well as DeepSeek. This post describes the first, DeepSeek-only version: installation and the command list below are updated, while the ds-* commands in other sections belong to that first version. Current usage is in the README on GitHub.

What It Does

cli-dispatch is a Claude Code plugin that hands a task over to DeepSeek but has Claude Code check the result. You describe a job; the plugin sends it to a DeepSeek worker, and Claude watches the output, verifies it and merges it if needed.

Why? Because having Opus do every job is both expensive and unnecessary. Generating boilerplate, scanning logs, doing a single-file refactor: there is no point in bloating the expensive model's context with these. Put the grunt work on the cheap worker and save the valuable context for architectural decisions.

The golden rule: The question is not “is DeepSeek or Claude better.” The question is who decides which job goes to which model. This plugin leaves that decision to you, but it runs the worker under supervision.

Claude Code’s built-in Agent tool can only call Anthropic models, so you could not use DeepSeek as a subagent. cli-dispatch fills this gap with a portable wrapper (claude-ds) that wraps the Claude CLI around DeepSeek’s Anthropic-compatible API.

How It Works: Orchestrator / Worker

There are two roles, and they do not mix:

  • Orchestrator: Claude Code (Anthropic). Splits the task, watches the worker, verifies the output, owns git/merge.
  • Worker: claude-ds (DeepSeek). Produces/runs the work, isolated and supervised.

The worker runs in a worktree, and its changes stay uncommitted until Claude reviews them and you approve the merge. So DeepSeek is responsible for the code, and you and Claude are responsible for the merge. The boundary is clear.

Prerequisites

  • Claude Code CLI installed ✅
  • ~/.local/bin on PATH ✅
  • DeepSeek API key: platform.deepseek.com/api_keys

Installation (4 Steps)

⚠️ These commands do not run in the terminal; they run inside a Claude Code session. Enter them one at a time, in order, not all at once.

1. Add the marketplace:

/plugin marketplace add rbinar/cli-dispatch

2. Install the plugin:

/plugin install cli-dispatch@cli-dispatch

3. Enable the plugin:

/reload-plugins

4. Run the setup:

/cli-dispatch:setup

Setup asks which backends you want and installs their wrappers. Enter your API keys with /plugin configure cli-dispatch@cli-dispatch; keys never pass through Claude. Check the result with /cli-dispatch:doctor.

Commands

  • /cli-dispatch:setup: Pick backends, install wrappers, run a smoke test
  • /cli-dispatch:run <backend> "<task>" --verify '<cmd>': Hand the task to a worker; the work runs isolated in a worktree and the verify command checks the result
  • /cli-dispatch:ask <backend> "<question>": A one-shot question with no repo changes
  • /cli-dispatch:sessions: List past/active sessions
  • /cli-dispatch:watch <id>: Live session status
  • /cli-dispatch:doctor: Install, key and CLI health check

There are two ways to use it: either type a slash command, or just say in plain language “do this with deepseek” and Claude hands the job to the plugin's dispatch tool.

Safety Belts for the Worker

Letting a worker loose without supervision is risky. That is why the plugin has four brakes:

  • Read-only mode: The worker cannot write files or run bash. Safe for analysis: it only reads, produces and returns.
  • Worktree isolation: Repo work happens in a separate git worktree. Changes stay uncommitted; you review and merge.
  • Timeout safety net: A hung or runaway worker is closed automatically at the time/idle limit. No wasted tokens.
  • Global MCP isolation: The worker does not inherit your MCP servers. DeepSeek cannot reach your local tools or secrets.

🔍 Why is read-only the default reflex? The first time you put a model on a job, you do not know what its output will be. Run it read-only first, read the output and build trust; then grant write access. Granting write access blindly means producing errors while hunting for errors.

Session Tracking (Live Monitoring + Resume)

Every delegated task opens a session folder: ${XDG_CACHE_HOME:-$HOME/.cache}/claude-ds/sessions/<id>/

File Contents status.json Compact summary (state, last tool, tool counts, result preview) progress.log Readable stream (▸ Edit foo.ts, ✓ / ✗) transcript.jsonl Raw stream-json (resume / audit) meta.json Prompt preview, cwd, branch, model, timestamps

💡 For cost-focused monitoring, ds-watch reads only status.json; it does not pull the whole transcript into context. Watching the worker should not itself burn tokens.

If a job stops halfway, you can resume it from the transcript. For anyone who says “analysis first, action later,” being able to see step by step what the worker did is not negotiable.

The ds-runner Subagent

You can package a whole delegation inside an isolated subagent. There are two options:

  • Haiku → pure analysis/generation (no build/test)
  • Sonnet → jobs that need build + test verification

The benefit: the orchestrator’s main context stays clean. All of the worker’s noise runs inside the subagent, and only the result comes back to you.

When to Use and When Not to Use

Use it for Do not use it for Boilerplate, repetitive generation One-line jobs: not worth setting up an orchestrator Log/output scanning, analysis (read-only) Confidential/regulated code (data goes to DeepSeek) Single-file refactors with a clear boundary Broad, multi-file architectural decisions: keep those in Claude Grunt work where you want to cut cost Interactive work where low latency is a must

⚠️ Open data egress deliberately. The prompt and code you send with ds-run go to DeepSeek (an external service). If customer data, PII or regulated code is involved, do not delegate the job. Apply the masking reflex here too.

A Practical Scenario

Scenario: You want to get test coverage for a util file.
You don't want to fill the expensive model's context with it.

/cli-dispatch:ds-run write comprehensive unit tests for src/utils/date.ts

What happens behind the scenes:

  • The plugin sends the task to the claude-ds worker (DeepSeek)
  • The work runs in a worktree: date.test.ts is generated there and not committed
  • You follow cost and progress live with ds-watch <id>
  • Claude verifies the output; you review the diff in the worktree and merge

Opus’s context stayed clean, the tests were generated cheaply, and you stayed in control.

Using It from the Terminal (Without the Plugin)

The CLI tools also work standalone, outside the plugin:

ds-agent --read-only "explain this function"
ds-agent --cwd /tmp/x "generate a file here"
claude-ds-stream --resume <id> -p "continue"

Windows Support

On native Windows (not WSL), the PowerShell variants kick in:

  • ds-setup runs install.ps1: it puts the .ps1 and .cmd wrappers into ~/.local/bin
  • Repo work uses junctions instead of symlinks (no admin needed)
  • Requires PowerShell 5.1+ or pwsh 7+

Troubleshooting

Symptom Likely cause Fix claude-ds: command not found ~/.local/bin is not on PATH Add it to PATH, reload the shell Command “not found” inside Claude Plugin is not enabled /reload-plugins, then try again Worker freezes midway Hit the timeout/idle limit See the state with ds-watch; resume if needed Auth error Key missing/wrong in the config Check the key in ~/.config/claude-ds/config (ds-status) Unexpected bill Web Search / long-running worker Track cost with ds-balance + ds-watch

Summary

cli-dispatch is not an “AI took over the work” story. Quite the opposite: you are the one handing out the work. Claude manages, DeepSeek works, and the worktree/read-only/timeout brakes keep the worker under supervision.

Software is still an engineering job. This plugin just split the hammer in your hand in two: the expensive hammer for architecture, the cheap hammer for grunt work. You are still the one who decides where each one strikes.

Sources

This post was first published on Medium.

Want this working in your business?

Start with a strategy call. Tell us what you need and we will suggest a next step.

Book a Strategy Call