task-dispatch

A command for preparing an eligible task to run in its own Git worktree. A worktree is a separate working copy of a repository, allowing tasks to be developed independently.

In plain words
What is it for?
Use it to dispatch independent tasks under PitWay's parallel-worktree strategy and hand the worker its separate path and branch.
Why use it?
It checks that parallel tasks do not overlap or depend on each other and records the dispatch before creating the work area.

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/thixpin/pitway/task-dispatch
Clone the repo
git clone --depth 1 https://github.com/thixpin/pitway
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 494 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.00013 $0.00494
Opus 5 $0.00006 $0.00247
Sonnet 5 $0.00003 $0.00099
Haiku 4.5 $0.00001 $0.00049

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

Security

Grade A, and why

task-dispatch 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.

src/integrations/claude/commands/task-dispatch.md · 50 lines

What it actually says

task-dispatch

Role: Orchestrator

pitway task-dispatch <id> [--json]

Prepares one parallel-eligible task for worktree execution under execution.strategy: parallel_worktrees (refuses under sequential): checks eligibility against every in_progress task — dispatched or inline — (dependency-independence in both directions plus pairwise-disjoint write_scope; legacy relevant_files tasks are never eligible), refuses on a dirty main tree and on any journal-pending amendment (a worktree would serve the stale pre-amendment contract — checkpoint first), then in normative order: transitions ready → in_progress (attempts increment, exactly like task-update), appends a worktree_dispatch journal record, and creates the worktree at .pitway-worktrees/<mId>-<tId>/ on scaffolding branch pitway/task/<mId>-<tId>.

--json is the worker handoff envelope only — task id, absolute worktree path, branch, created-from revision. It never embeds the context bundle: obtain that at the main root via task-status <id> --context and pass it to the worker yourself.

A dispatched task's only exits are task-integrate and task-discard; direct task-update status changes refuse until the dispatch is closed.

Under execution.strategy: parallel_worktrees, pitway resume names which ready tasks are parallel-eligible right now: when 2+ ready tasks are mutually eligible (pairwise-disjoint write_scope, no dependency relationship), its human-mode output additionally renders

🏎️ Parallel-eligible ready tasks: <id>, <id>, ...
  Consider parallel dispatch (task-dispatch <id>) for these.

— absent entirely (not an empty section) otherwise. --json carries the same information as an additive parallelEligible?: string[] field, present only under the same condition. This is advisory only: resume itself never calls task-dispatch.

See ../protocol-driver.md (Parallel dispatch) and ../dispatch.md.

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 · 50 lines · 0 tokens per session scan A 2cb938cabc90

Subscribe to this mod's changes

task-dispatch is a command published in the GitHub repository thixpin/pitway (19 stars, last pushed 2d ago), licensed MIT. It adds 13 tokens to every session and 494 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-30.