# dsh-baton [Health: Active]

**Category:** 🤖 Coding Agents  
**Repository:** https://github.com/JialaoLiu/dsh-baton  
**GitHub Stars:** 99  
**npm Downloads (last month):** 4052  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/dsh-baton

## Description
Pass the baton from Claude Code or Codex to a local DeepSeek Harness. An MCP server that hands off tasks and brings the result back.

## Tools
Capabilities this server exposes over MCP:

- **dsh_list_workspaces** — List the DeepSeek Harness workspaces (project folders): id, path, title and session_count. The id is the workspace_id for dsh_send. Read-only. Needs the dsh-baton-host plugin.
- **dsh_list_sessions** — List Harness sessions, newest first, to find a session_id: session_id, title, cwd, updated_at, running, bridge_runs and model (what its next request uses). No paging: raise limit or narrow it with cwd or query. Read-only. Sessions not in dsh_list_sessions are archived or gone: do not look for them on disk.
- **dsh_list_models** — List the models this DeepSeek Harness can run (provider, model id, name, reasoning efforts) and its default model, to check a name before passing model to dsh_send. Read-only. Needs the dsh-baton-host plugin.
- **dsh_read_session** — Read the last messages of a session (role, time, text and the names of tools called; no tool output), to catch up before continuing it. Read-only.
- **dsh_send** — Send a message to a Harness session and return at once with a run_id; then wait for the reply with dsh_wait (or the wait_command it returns, where offered). session_id continues that session; without it a new session starts in cwd or workspace_id, or, with neither, in the folder this conversation works in (a new cwd is registered first). If the session is busy, mode followup queues the message and steer adds it to the running turn; leave mode out to follow the Harness setting. The message arrives verbatim as a user message (with checks, a short request for a sub-agent review table is appended): make it self-contained (Harness does not see this conversation), in the user's language. For a large task, first turn the request into a concrete spec (goal, modules and the files each owns, level of detail, acceptance criteria) instead of passing the user's words on; send independent parts to separate sessions in parallel, each owning its own files. Review once all parallel parts are back: check their screenshots or test results together, then send back specific fixes for what falls short.
- **dsh_status** — Look once at a run without waiting: state (queued/running/waiting/completed/failed/cancelled/interrupted), recent events, final reply, waiting_on (sub-agents or jobs still working) and human_interjections. Never a way to wait: use dsh_wait.
- **dsh_wait** — Wait for a run sent with dsh_send to end and return its state and final reply. Prefer the background wait_command from dsh_send if your client wakes you when a background command exits: it costs no turns. It also returns at once when the run stops to ask a person: needs_input answer (question and relay; reply with dsh_answer) or harness-ui (an approval only a person can give in Harness). Each call waits up to 50 s; if it returns timed_out: true, call dsh_wait again with the same run_id, without a progress note.
- **dsh_answer** — Answer the questions a waiting run asked (question in dsh_wait or dsh_status). Per question: option numbers or labels in choose, text for a free answer, or skip. Pass reason when the user let you decide. The answer reaches Harness once every question has one (submitted: true; remaining lists the rest); then wait for the run again. If the user already answered in Harness, it reports that there is no open question.
- **dsh_cancel** — Stop everything a session is doing (turn, sub-agents, background jobs, reminders), by run_id or session_id; the session is kept. Messages queued in it are dropped too (removed_from_queue); to drop one queued message use dsh_update_queued. Safe to repeat. Returns still_busy, activity and removed_from_queue.
- **dsh_call** — Call a dsh-baton tool by name, for a tool this conversation does not list (dsh-baton was updated without a restart; the update note names it). Runs the same code as a direct call, so it can do whatever that tool does. An unknown name changes nothing and returns the tools with their input schemas.

## Claude Desktop Quick Installation
No confirmed install details yet, so no config is published. Follow the setup steps in the repository above.

## Documentation

## What dsh-baton does

dsh-baton hands coding work from Claude Code or Codex to a DeepSeek Harness running on the same machine. The task executes in a regular Harness session, where a developer can watch the work and intervene through the Harness interface. After the run finishes, the calling agent can receive the result rather than repeatedly checking the session.

The bridge is useful for large or long-running implementation tasks. A handoff can continue an existing Harness session or create one in a selected workspace or working directory. The returned result can contain the files created, modified, or deleted, the project's test output, and a checklist matching the request's requirements.

## How it works

Install and enable the `dsh-baton-host` plugin from the Plugins area in DeepSeek Harness. Once enabled, it registers the MCP tools for Claude Code and Codex. The Harness installation must be signed in and meet the required minimum version, and the supported desktop platforms are macOS and Windows.

A typical flow is:

1. Discover a workspace, session, or available model.
2. Send a self-contained request with `dsh_send`.
3. Wait for completion with `dsh_wait`, optionally using the returned background wait command.
4. Read status, answer Harness questions, or cancel the run when needed.
5. Continue the same session with a follow-up request.

For bigger jobs, split independent parts across separate sessions and assign each part clear file ownership. When a run pauses for a person, `dsh_wait` reports the question or approval state; `dsh_answer` relays answers for questions that can be answered through the agent.

## Setup and configuration

The normal setup requires no Node.js, terminal installation, or dependency installation. In Harness, open Plugins, add `dsh-baton-host`, install it, and enable it. Codex users must also trust the `dsh-baton: waiting for the Harness run` hook in Codex settings so Codex can be woken when a run ends instead of checking repeatedly.

If Harness cannot register the server, `npx -y dsh-baton-mcp setup` performs the registration and requires Node.js 22.15 or newer. Codex may request approval for MCP calls; unattended `codex exec` runs can add `--approve-for-me`.

## Tools and capabilities

- `dsh_list_workspaces` finds Harness project folders and returns workspace IDs for later sends.
- `dsh_list_sessions` searches recent sessions by limit, working directory, or query.
- `dsh_list_models` shows available providers, model IDs, names, reasoning efforts, and the default model.
- `dsh_read_session` reads recent messages and called-tool names, without tool output.
- `dsh_send` starts a run or continues a session, with queue and steer modes for busy sessions.
- `dsh_status` checks a run without waiting; `dsh_wait` waits for its final state.
- `dsh_answer` responds to questions from a waiting Harness run.
- `dsh_cancel` stops activity and can remove queued messages; `dsh_call` invokes an additionally registered dsh-baton tool by name.

## Limitations and notes

The workspace and model discovery tools require the `dsh-baton-host` plugin. Session listing has no pagination, so use a larger limit or narrow the search. A session absent from the listing should be treated as archived or gone rather than located by inspecting files.

`dsh_wait` waits for up to 50 seconds per call; repeat it with the same run ID after a timeout. `dsh_status` is for inspection only and does not replace waiting. Reading a session returns message text and tool names, but not tool output. Messages sent to Harness must be self-contained because Harness does not receive the surrounding conversation.

_Full upstream README: https://allmcps.com/mcp/dsh-baton/readme_

