dispatch-worker

A command that runs one worker cycle in an AI software-development workflow. It takes one queued task, asks a developer subagent to handle it, records the result, and waits for more work.

In plain words
What is it for?
Use it to claim tasks from a dispatch queue, run the developer review or implementation step, save success or failure details, and continue processing later tasks.
Why use it?
It lets several separate coding-agent sessions process queued tasks in parallel. When no tasks are available, it pauses instead of repeatedly checking and wasting usage.

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/ai-sdlc-framework/ai-sdlc/dispatch-worker
Clone the repo
git clone --depth 1 https://github.com/ai-sdlc-framework/ai-sdlc
Per session 191 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,755 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.00191 $0.04755
Opus 5 $0.00096 $0.02377
Sonnet 5 $0.00038 $0.00951
Haiku 4.5 $0.00019 $0.00475

Measured 2d ago against content hash 0a27360bfa22, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

dispatch-worker 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 2d ago.

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.

ai-sdlc-plugin/commands/dispatch-worker.md · 418 lines

How it starts

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

Run one in-session-agent Worker tick (RFC-0041 §4.3.1).

This command is the Worker half of the Conductor / Worker process split. The operator opens one or more sibling Claude Code sessions and fires /ai-sdlc dispatch-worker in each. Each session loops:

  1. Claim one manifest from the Dispatch Board.
  2. Invoke the ai-sdlc:developer subagent in foreground.
  3. Write the verdict to done/ (success) or failed/ (diagnostic).
  4. ScheduleWakeup for the next tick.

When the queue is empty the session hibernates for ~30 seconds (configurable via .ai-sdlc/dispatch-config.yaml spec.inSessionAgent.emptyQueueHibernateSec) before re-polling — this avoids burning subscription tokens on busy-waits.

Worker isolation rationale

Workers run in their own Claude Code sessions and invoke Agent in foreground. This isolation provides operator-controlled parallelism (N sessions = N workers), explicit subscription-quota visibility, and independence from the Conductor's session lifecycle.

Historical note (2026-05-21): RFC-0041 §2.1 originally cited Anthropic's "600s silent-stdout background-agent watchdog (~85% kill rate during pnpm test)" as the primary motivation for moving Workers out of the Conductor's session. That claim was a misdiagnosis — forensic re-measurement of 73 dev subagent transcripts via python3 ~/.claude/skills/audit-subagent/audit.py found 0 watchdog-shape kills and 80.8% clean completion (median 16 min, max 2.5 h). The 19.2% failures were operator-initiated interrupts, not system kills. The Dispatch Board pattern stands on the other rationales above; the watchdog-avoidance framing has been removed.

Hard rules (identical to /ai-sdlc execute)

  1. Never merge any PR. Do not run gh pr merge.
  2. Never force-push. Use --force-with-lease only after the mandatory rebase.
  3. Never close PRs or issues. No gh pr close, gh issue close.
  4. Never delete branches. No git branch -D / -d.
  5. Never edit .ai-sdlc/** or .github/workflows/**.
  6. Never run destructive git operations. No git reset --hard.
  7. Never write CI-skip tokens ([skip ci], [ci skip], etc.) in commits.

Read the full file on GitHub · 418 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. 2d ago First seen · 418 lines · 191 tokens per session scan A 0a27360bfa22

Subscribe to this mod's changes

dispatch-worker is a command published in the GitHub repository ai-sdlc-framework/ai-sdlc (92 stars, last pushed 8d ago), licensed Apache-2.0. It adds 191 tokens to every session and 4,755 once invoked, about $0.0010 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-30.