wait

A command that waits for a delegated command-line worker to finish and then prints a short result summary.

In plain words
What is it for?
Use it with a worker session ID to wait for completion, optionally set a timeout, and view its phase, change summary, token usage, and latest response.
Why use it?
It avoids repeatedly checking the worker while still showing whether it finished, failed, was stopped, or timed out.

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/wait
Clone the repo
git clone --depth 1 https://github.com/rbinar/cli-dispatch
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 408 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.00015 $0.00408
Opus 5 $0.00008 $0.00204
Sonnet 5 $0.00003 $0.00082
Haiku 4.5 $0.00002 $0.00041

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

Security

Grade A, and why

wait 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/wait.md · 36 lines

What it actually says

Wait for cli-dispatch session: $ARGUMENTS

Block until the given session reaches a terminal state (done / error / killed) or the timeout expires, then print a compact summary (phase, diffstat, usage tokens, bounded tail of the last assistant message). Cost-conscious rule: this is ONE blocking call — use it instead of repeated /cli-dispatch:watch polling; the raw transcript.jsonl is never read into context beyond the bounded tail.

set -- $ARGUMENTS
if [ -z "${1:-}" ]; then
  echo "usage: /cli-dispatch:wait <session-id> [--timeout SECS] [--poll SECS]"
  echo "tip:   /cli-dispatch:sessions  to list session ids"
  exit 1
fi
if command -v cli-dispatch-wait >/dev/null 2>&1; then
  cli-dispatch-wait "$@"
else
  echo "cli-dispatch-wait not found on PATH — re-run /cli-dispatch:setup (or scripts/install.sh)."
  echo "Fallback: /cli-dispatch:watch $1 (single non-blocking status check)."
  exit 1
fi

Exit codes: 0 done, 1 error/killed (also usage/not-found), 2 timeout.

  • Default: no timeout (waits until terminal state), poll every 10s (wall-clock only — zero token cost while waiting). Pass --timeout SECS to bound the wait.
  • Continue the session afterwards: /cli-dispatch:resume <id> <follow-up> (auto-detects backend).
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 · 36 lines · 15 tokens per session scan A fb7e9c410870

Subscribe to this mod's changes

wait is a command published in the GitHub repository rbinar/cli-dispatch (5 stars, last pushed 14d ago), licensed MIT. It adds 15 tokens to every session and 408 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.