run

A command that gives a task to a separate worker program and prints a short result. It uses a fixed runner instead of another language model to manage the delegation.

In plain words
What is it for?
Sending a prompt to a supported worker backend and checking the result with a machine-run command.
Why use it?
It handles mechanical delegation without spending model tokens on supervision. Optional verification can check whether the worker completed the task correctly.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/rbinar/cli-dispatch/run
Clone the repo
git clone --depth 1 https://github.com/rbinar/cli-dispatch
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,683 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00022 $0.01683
Opus 5 $0.00011 $0.00842
Sonnet 5 $0.00004 $0.00337
Haiku 4.5 $0.00002 $0.00168

Measured yesterday against content hash fa035806eca0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

run scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/cli-dispatch/commands/run.md · 108 lines

How it starts

The opening of the file, as written. The whole thing — 108 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Run cli-dispatch worker: $ARGUMENTS

Launch a worker via cli-dispatch-run (the deterministic no-LLM runner from 3.34.0) and print a compact verdict summary — no babysitter, zero LLM tokens spent on orchestration. Best for mechanical delegations with a machine-checkable --verify command.

# $ARGUMENTS is substituted TEXTUALLY into this script before bash parses it, so the
# user's quoting survives as real shell quoting — do NOT wrap this in eval (nested
# double quotes would split the prompt). Verified with a stub-binary harness.
set -- $ARGUMENTS
BACKEND="${1:-}"; PROMPT="${2:-}"; shift 2 2>/dev/null || true
case "$BACKEND" in ds|ag|cx|oc|cp) ;; *)
  echo "usage: /cli-dispatch:run <backend> \"<prompt>\" [--verify '<cmd>'] [--cleanup-if-clean] [more flags]"
  echo "backend: ds | ag | cx | oc | cp     tip: /cli-dispatch:setup to install backends"
  exit 1 ;; esac
if [ -z "$PROMPT" ]; then
  echo "usage: /cli-dispatch:run <backend> \"<prompt>\" [flags]"
  echo "tip: prompt is required"
  exit 1
fi
RUNNER=(cli-dispatch-run)
if ! command -v cli-dispatch-run >/dev/null 2>&1; then
  # Issue #150: a plugin upgrade refreshes the versioned cache dir ONLY — it never re-runs
  # install.sh, so ~/.local/bin keeps whatever the last /cli-dispatch:setup installed and any
  # binary introduced since (cli-dispatch-run itself, originally) is absent from PATH with
  # nothing on screen explaining why. Fall back to the plugin's own copy so the documented
  # zero-token flow still runs, but name the cause so the install gets fixed once.
  PLUGIN_ROOT="$(bash "${CLAUDE_PLUGIN_ROOT}/scripts/resolve-plugin-root.sh" "${CLAUDE_PLUGIN_ROOT}" 2>/dev/null || true)"
  if [ -n "$PLUGIN_ROOT" ] && [ -f "$PLUGIN_ROOT/scripts/cli-dispatch-run" ]; then
    RUNNER=(bash "$PLUGIN_ROOT/scripts/cli-dispatch-run")
    echo "cli-dispatch-run is not on PATH — using the plugin's own copy: $PLUGIN_ROOT/scripts/cli-dispatch-run"
    echo "Cause: upgrading the plugin refreshes the plugin cache only; ~/.local/bin still has the wrappers your last setup installed."
    echo "Fix it once with /cli-dispatch:setup — this fallback also uses whatever is in ~/.local/share, which may be stale."
  else
    echo "cli-dispatch-run not found on PATH, and no plugin copy is usable."
    echo "If you just upgraded the plugin this is expected: the upgrade never re-runs install.sh."
    echo "Fix: re-run /cli-dispatch:setup (or scripts/install.sh) to reinstall the wrappers."
    echo "Fallback: use /cli-dispatch:${BACKEND}-run, or call ${BACKEND}-agent directly."
    exit 1
  fi
fi
RC=0
"${RUNNER[@]}" --backend "$BACKEND" --cwd "$PWD" --prompt "$PROMPT" "$@" || RC=$?
SESSIONS_ROOT="${CLI_DISPATCH_SESSIONS_DIR:-}"
[ -z "$SESSIONS_ROOT" ] && [ -d "$HOME/.cache/cli-dispatch/sessions" ] && SESSIONS_ROOT="$HOME/.cache/cli-dispatch/sessions"
[ -z "$SESSIONS_ROOT" ] && SESSIONS_ROOT="$HOME/.cache/claude-ds/sessions"
# Newest session dir that actually carries a verdict.json (this run's, unless none was written).
SESSION_DIR=""
for d in $(ls -dt "$SESSIONS_ROOT"/*/ 2>/dev/null | head -5); do
  [ -f "$d/verdict.json" ] && { SESSION_DIR="${d%/}"; break; }
done
if [ -n "$SESSION_DIR" ]; then
  node -e '
    const {readFileSync} = require("fs");
    const exit = process.argv[2];
    let v;
    try { v = JSON.parse(readFileSync(process.argv[1], "utf8")) }
    catch (e) { console.log("exit: " + exit + "  (verdict.json unreadable: " + e.message + ")"); process.exit(0) }
    if (v.error) { console.log("exit: " + exit + "  verdict error: " + v.error); process.exit(0) }
    const verify = v.verify ? (v.verify.exitCode === 0 ? "pass" : "FAIL (exit " + v.verify.exitCode + ")") : "n/a";
    const diff = v.diffstat || (v.changedFiles ? v.changedFiles.length + " file(s)" : "n/a");
    console.log("exit: " + exit + "  session: " + (v.sessionId || "?") + "  state: " + (v.state || "?") + "  verify: " + verify);
    console.log("diff: " + String(diff).trim());
    if (v.stranded) console.log("STRANDED changes in worktree: " + v.worktree);
    console.log("patch: " + (v.diffPatchPath || "n/a"));
  ' "$SESSION_DIR/verdict.json" "$RC"
else
  echo "exit: $RC  (no verdict.json found)"
fi
exit $RC

Read the full file on GitHub · 108 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 108 lines · 22 tokens per session scan A fa035806eca0

Subscribe to this mod's changes

run is a command published in the GitHub repository rbinar/cli-dispatch (5 stars, last pushed 13d ago), licensed MIT. It adds 22 tokens to every session and 1,683 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.