/dispatch command is the primary interface for delegating tasks to background AI workers. It accepts natural language task descriptions and automatically plans, dispatches, and monitors work.
Basic Syntax
The simplest form of/dispatch takes a task description:
The dispatcher immediately returns control to you after spawning the worker. You don’t wait for completion.
Model Selection Syntax
You can specify which model to use for a task by mentioning it in your prompt:Model Resolution Logic
Scan the prompt
The dispatcher scans your prompt for any model name or alias defined in
~/.dispatch/config.yaml.Resolve to command
If a model or alias is found:
- For a model: Look up its backend, get the backend’s command template
- For an alias: Resolve to the underlying model, then get the backend command
- Apply backend-specific rules (cursor/codex: append
--model, claude: no--modelflag)
Auto-discover if needed
If you reference a model NOT in config:
- If Cursor CLI exists: Run
agent modelsto check availability - If found: Auto-add to config with appropriate backend and use it
- If not found: Tell user the model isn’t available
Multiple Model Mentions
If multiple models are mentioned in a single prompt, the last matching model in the config is used.Config Requests vs Task Requests
The dispatcher determines what you’re asking for before taking action:Config Request
Config Request
Mentions keywords like “config”, “add agent”, “add to my config”, “change model”, “set default”, “add alias”, “create alias”Behavior: Reads and modifies
~/.dispatch/config.yaml inline, then stops. No worker is spawned.Examples:Task Request
Task Request
Any request that doesn’t match config patterns.Behavior: Creates a plan file, spawns a background worker, monitors progress.Examples:
Command Patterns
Security & Reviews
Refactoring
Testing
Documentation
Parallel Tasks
Each dispatch command creates a separate worker. All three tasks above run in parallel.
First-Run Setup
When~/.dispatch/config.yaml doesn’t exist, the first /dispatch command triggers auto-setup:
Discover models
- If Cursor CLI: Run
agent modelsto list all available models - If only Claude Code: Use stable aliases (
opus,sonnet,haiku) - If Codex CLI: Use known OpenAI model IDs
Status Checking
After dispatching, you can check progress at any time:- Which items are completed (
[x]) - Which item is in progress (first
[ ]) - Any blockers (
[?]) or errors ([!])
Adding Context to Running Tasks
If you need to provide additional context after dispatching:Backend-Specific Command Construction
How the final CLI command is constructed depends on the backend:Why no
--model for Claude? The Claude CLI resolves aliases like opus to specific versioned model IDs internally. Omitting --model lets the CLI use its own default, which always works.Error Handling
When a worker fails to start or errors immediately:Related
Config File Reference
Complete schema documentation for ~/.dispatch/config.yaml
Plan Files Reference
Plan file format, markers, and IPC protocol