dsh-baton
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DSH_BIN | No | Harness CLI for headless mode | the dsh inside the macOS app, else PATH |
| DSH_HOME | No | Harness data folder (headless session reads) | ~/.dsh |
| DSH_BATON_HOME | No | Socket and headless run records | ~/.dsh-baton |
| DSH_BATON_SOCKET | No | Plugin socket path (must match on both sides); on Windows mapped to a per-user named pipe | $DSH_BATON_HOME/host.sock |
| DSH_BATON_WAIT_S | No | How long one dsh_wait call waits; set it only if you raised the client's tool timeout, and keep it below that | 270 for Codex, else 50 |
| DSH_BATON_ACCOUNT | No | 0 uses the API-key route in headless mode | 1 |
| DSH_BATON_BACKEND | No | auto, host or headless | auto |
| DSH_BATON_PATCHES | No | Extra headless --patch overlays, :-separated | empty |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Hands tasks to a local DeepSeek Harness and brings the results back: start with dsh_send.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| dsh_list_workspacesA | 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_sessionsA | 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_modelsA | 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_sessionA | 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_sendA | Hand a task to DeepSeek Harness, or continue a session: returns at once with a run_id and a hint saying how to wait for the reply; follow it. Call it directly, no need to list anything first. A new session starts in the folder this conversation works in, or in cwd or workspace_id (a new cwd is registered first); session_id continues that session. Without session_id, a task for a folder where this conversation already has an idle Harness session continues that session, so it keeps the earlier context (continued_session in the result says so; new_session: true starts a fresh one); a busy session is never reused, so parts sent in parallel still get a session each. message arrives verbatim as a user message, and Harness does not see this conversation: make it self-contained, in the user's language, the full, explicit spec, asking for tests that cover each requirement. Keep a leading /goal (it sets a Harness goal) and the user's goal text as written. For a large task, write a concrete spec (goal, modules and the files each owns, level of detail, acceptance criteria) rather than passing the user's words on, and send independent parts to separate sessions in parallel, each owning its own files; wait for them together as each send's hint says, review each as it returns and send its fixes at once. With checks, a short request for a sub-agent review table is appended. To a busy session, mode followup queues the message and steer adds it to the running turn; left out, the Harness setting decides. |
| dsh_statusA | Look once at a run or a session without waiting. A run (run_id): state, recent events, final reply, waiting_on (sub-agents or jobs still working) and human_interjections. A session (session_id): busy, activity, its Harness goal (phase, rounds, whether Harness goes on with it), needs_input, and its last turn's reply. Never a way to wait: use dsh_wait. |
| dsh_waitA | 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. For a run a background wait_command already waits for, dsh_wait returns at once without waiting: do not call it for that run. It also returns at once when the run stops to ask a person: needs_input answer (reply with dsh_answer) or harness-ui (an approval in the Harness window). 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. Parallel runs: all ids in run_ids, never one by one; returns once any ends or asks (ended; the rest in still_running); then wait again with the rest plus your fixes. A run in a session with a Harness goal is followed on until the goal stops, with every round since the run began. With session_id instead of run_id it follows that session's Harness goal (see until) without sending anything; it also returns when Harness needs a person or will not go on by itself. Pass back the cursor each result gives. |
| dsh_answerA | Submit the user's answer to the questions a waiting run asked (needs_input in dsh_wait or dsh_status). Ask the user (your own question tool, or a message), your recommendation first if you have one, and submit their answer. Per question: choose (option numbers or labels), text (an answer in words), or skip. It reaches Harness once every question has an answer (submitted: true; remaining lists the rest); then wait again. If the user already answered in Harness, it says there is no open question. |
| dsh_cancelA | 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 (via dsh_call). Safe to repeat. Returns still_busy, activity and removed_from_queue. |
| dsh_callA | Call a dsh-baton tool this conversation does not list, by name: dsh_update_queued (change a queued message), dsh_list_runs, dsh_session_activity, dsh_create_workspace, dsh_rename_session, dsh_rename_workspace, or one an update added. Same code as a direct call. An unknown name changes nothing and lists every tool with its schema. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 10 tools
Each tool has a clear role: send, wait, status, answer, cancel, read, and three list tools map to distinct actions. The main fuzzy boundary is dsh_status vs dsh_wait (both inspect a run/session) and dsh_call vs direct calls, but the descriptions explicitly resolve both ("Never a way to wait: use dsh_wait"). dsh_send doing double duty as create-or-continue is explained but still adds cognitive load.
All tools share the dsh_ prefix and snake_case with a verb_noun shape (dsh_send, dsh_list_sessions, dsh_read_session, dsh_answer). Minor deviation: dsh_status and dsh_wait drop the object noun, so they read slightly differently from the rest. Overall highly predictable.
Ten exposed tools is a well-scoped surface for session orchestration, with read-only listers separated from mutating actions. However, seven more operations (dsh_list_runs, dsh_create_workspace, dsh_update_queued, etc.) are reachable only through the dsh_call escape hatch, so the true surface is larger than the count implies.
The core lifecycle is covered: dispatch, wait, poll, answer questions, cancel, read history, and enumerate sessions/workspaces/models. Gaps exist for queued-message editing, workspace/session creation and renaming, and run listing, but these are deliberately delegated to dsh_call rather than missing outright. No hard dead ends.