ZCode → local DSH / agent-run / Cursor ACP
ZCode is a client on this machine. It does not classify seats. Task
shape → model/effort stays in this clone's routing-policy.yaml via
agent-run (or agent-run-dispatch if install.sh detected a PATH conflict).
Cursor Cloud is not a local socket. Do not call api.cursor.com, do not
invent an HTTP gateway, and do not pass --via cloud.
$REPO_ROOT below is the clone of this repository (the directory that
contains routing-policy.yaml and scripts/install.sh).
Pick a channel (in this order)
MCP tool
dsh_delegate— ifdshappears in ZCode's MCP tool list (config fromtemplates/zcode/config.snippet.jsonmerged into~/.zcode/cli/config.jsonor<repo>/.zcode/config.json), call it. One call, one task, committed final answer. This tool spawnsdsh --profile headless(DSH_MCP_PROFILEcan override; do not set it toweb). If the default provider iscursor-acp, the headless profile must already have this clone's adapter and dispatch pack:dsh plugin --profile headless add "$REPO_ROOT/plugins/dsh-llm-cursor-acp" dsh plugin --profile headless add "$REPO_ROOT/plugins/dsh-dispatch-pack"Web-only installs fail with
NO_ADAPTER. Gateway--via dshis the same profile (DSH_GATEWAY_PROFILE, defaultheadless). Prefer./scripts/install.sh, which adds both profiles from this clone.Thin CLI wrapping the same binaries:
node "$REPO_ROOT/gateway/local-gateway.mjs" doctor node "$REPO_ROOT/gateway/local-gateway.mjs" run --via dsh \ --cwd /absolute/repo \ "<complete self-contained task>"Governed seat (when the user named a task shape or asked for agent-run). Do not guess the shape:
node "$REPO_ROOT/gateway/local-gateway.mjs" run --via agent-run \ --task-shape ordinary_bug_fix \ --cwd /absolute/repo \ "<task>"Cursor as worker (official ACP stdio, not HTTP):
node "$REPO_ROOT/gateway/local-gateway.mjs" run --via cursor-acp \ --cwd /absolute/repo \ "<task>"
ZCode is not an ACP client in the Zed sense; prefer MCP or the CLI. The ACP
profile dsh --profile acp is for Zed/JetBrains, not for this session.
What to delegate
- Whole bounded units with repo path, goal, constraints, and a verification command.
- Long-running or parallel work that does not need this ZCode transcript.
What NOT to delegate
- Work that needs this conversation's intermediate state.
- Cursor Cloud / any public HTTP URL as if it were
agent-run. - Interactive approval-heavy loops (headless uses a one-shot policy).
Guardrails
- Verify files/diff after return; never trust the report alone.
- Never put API keys in the task text.
- One task per call. On failure, retry once with a tighter task text, then stop.