run_dsh
Execute tasks asynchronously with a headless DeepSeek agent inside an isolated sandbox, handling rate-limit retries and timeouts. Supports plan-only mode and custom working directories.
Instructions
Async call DeepSeek DSH CLI (dsh --profile headless) to run a task. Provider-rotatable across the configurable // backends (same agent loop; pick backend via ~/.dsh settings/patch). Runs with cwd = workdir, which is the workspace-write sandbox boundary: it can REALLY write files and run bash/pwsh inside workdir, non-interactive (no approval stall). Non-blocking. Auto-tracks task. NOTE: no resume (session_id is accepted but starts a fresh run, like opencode). Retries on 429/timeout with exponential backoff (default 2, 3 attempts total); set max_retries=0 to disable. Pass a bounded isolated workdir, never the main repo / a sensitive volume.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | ||
| task_id | No | ||
| workdir | No | 隔离工作目录 = workspace-write 沙箱边界。DSH 会在其中写文件/执行工具,务必传受限的独立目录,勿指向主仓库/敏感盘。 | |
| plan_mode | No | Plan 模式:只读调研,强制关 auto,产出方案不落盘 | |
| session_id | No | 仅接受、实际全新运行(DSH 无 --resume) | |
| max_retries | No | Max retries after first attempt on 429/timeout (0-5, default 2). 0 = fail on first error. | |
| timeout_sec | No | ||
| fork_on_fail | No | A 失败自动 fork:真失败时父 superseded + 生成备选子任务给此 agent 承接(仅工作流任务,≤3 上限)。不传不自动 fork。 | |
| retry_max_ms | No | ||
| capture_trace | No | 捕获完整推理 step 流存 task.trace,默认 false | |
| retry_base_ms | No |