dispatch-issue

A command for sending one worker to handle one open GitHub issue, with optional model selection or a dry run. GitHub is a service for hosting code and tracking work through issues, which are written tasks or bug reports.

In plain words
What is it for?
Use it to smoke-test dispatch, investigate a failed launch, check worker readiness, or manually retry an issue. It verifies that the issue exists and is open before starting the worker.
Why use it?
It provides a direct way to test, debug, retry, or validate one worker without waiting for the normal automated pulse loop. It avoids the broader scanning, throttling, and capacity behavior of that loop.

Command for Codex

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/marcusquinn/aidevops/dispatch-issue
Clone the repo
git clone --depth 1 https://github.com/marcusquinn/aidevops

Made for: Codex.

Per session 20 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,352 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00020 $0.01352
Opus 5 $0.00010 $0.00676
Sonnet 5 $0.00004 $0.00270
Haiku 4.5 $0.00002 $0.00135

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

Security

Grade B, and why

dispatch-issue scanned grade B with 1 finding 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

`sudo aidevops approve issue <issue_number> <owner/repo>` or record an
.agents/scripts/commands/dispatch-issue.md · 118 lines

How it starts

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

Args: $ARGUMENTS<issue_number> <owner/repo> [--model <id>] [--dry-run]

Use the issue's tier:simple, tier:standard, or tier:thinking label for normal routing. --model is an advanced compatibility override for operators who must pin an exact runtime model ID.

What this does

Bypasses the pulse loop and launches one worker against one issue. The same worker shape the pulse uses (headless-runtime-helper.sh run --detach producing a /full-loop prompt), without:

  • Capacity checks
  • Throttle / adaptive cadence
  • Multi-issue scanning
  • Pulse-cycle ledger sweeps

Use this for smoke-testing, debugging dispatch failures, brief worker-readiness validation, or manual retries after fixing an upstream issue. NOT a replacement for the pulse — the pulse handles concerns this helper deliberately does not.

Resolution and execution

  1. Resolve $ARGUMENTS into <issue_number> (numeric) and <owner/repo>.
    • If --repo is omitted in user prose, default to the current repo's slug from ~/.config/aidevops/repos.json.
  2. Pre-flight (always, even with --dry-run):
    • Issue must exist + be OPEN.
    • Reject needs-maintainer-review issues; use sudo aidevops approve issue <issue_number> <owner/repo> or record an equivalent maintainer decision before any manual worker dispatch.
    • Reject parent-task issues with a clear "use a phase child" message.
  3. Dedup pre-check via dispatch-dedup-helper.sh is-assigned.
    • Exit 0 (active claim) → real dispatch blocks, exit 0 with explanation.
    • Exit 1 (free) → dispatch proceeds.
    • Other exit code (helper missing, network error, etc.) → fail closed, refuse to dispatch, exit 1.
    • Dry-run: surface all three states as info, still print the planned dispatch.
  4. Resolve tier/model (mirrors pulse-model-routing.sh::resolve_dispatch_model_for_labels):
    • Tier labels request workload complexity: tier:simple, tier:standard, or tier:thinking. Default = standard.
    • Runtime routing chooses the preferred available provider, model, and reasoning level for that workload tier.
    • --model <id> wins only when an operator intentionally uses the advanced compatibility override to pin an exact runtime model ID.
    • Known divergence from pulse (t2839): the pulse applies a dispatch-path safety net (t2819) that auto-elevates issues touching self-hosting files (pulse-wrapper.sh, headless-runtime-helper.sh, etc.) to thinking. This CLI does NOT apply that check — it would require parsing the issue body and brief file scope. If you're manually dispatching a dispatch-path issue, apply the tier:thinking label before dispatch so runtime routing can select the preferred available provider, model, and reasoning level.
  5. Dispatch (real path):
    • Pre-create worktree via worktree-helper.sh add (auto-<ts>-gh<N>), resolve actual path back from git worktree list (worktree-helper has its own slug logic — recomputing it is fragile).
    • Launch detached worker with prompt /full-loop Implement issue #<N> (<url>)headless-runtime-lib auto-appends HEADLESS_CONTINUATION_CONTRACT_V6.
    • Poll worker log for the Dispatched PID: line printed by headless-runtime-helper.sh::_detach_worker (timeout 3s) to extract the real worker PID, not the short-lived launch wrapper.
    • Register dispatch in ledger with the real worker PID so subsequent status and pulse dedup-layer-1 checks see a live process.
    • Print PID, log path, session key.
  6. Status check (anytime): dispatch-issue status <N> <slug> reports the active dispatch ledger entry, including PID liveness.

Read the full file on GitHub · 118 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 · 118 lines · 20 tokens per session scan B 59b35c47506f

Subscribe to this mod's changes

dispatch-issue is a command published in the GitHub repository marcusquinn/aidevops (391 stars, last pushed 2d ago), licensed MIT. It adds 20 tokens to every session and 1,352 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.