~/.dispatch/config.yaml. The config uses a model-centric schema that separates backend commands from model definitions.
Config File Location
The configuration file is stored at:claude, agent, codex), discovers available models, and generates this file automatically. No manual config is needed for the happy path.
Schema
The config has three main sections: backends, models, and aliases.Backends
Define CLI commands for each provider. Each backend specifies a command template that will be used to spawn worker agents.Models
One-line entries mapping model names to backends. Adding a new model is just a single line.Aliases
Named shortcuts that resolve to a model and optionally prepend role-specific instructions to the worker prompt.Command Construction Rules
How Dispatch builds the final command depends on the backend:Cursor Backend — Append --model
- Look up model (e.g.,
gemini-3.1-pro) →backend: cursor - Look up backend command →
agent -p --force --workspace "$(pwd)" - Append
--model gemini-3.1-pro→ final command
Claude Backend — Do NOT Append --model
- Look up model (e.g.,
opus, or versioned ID likesonnet-4.6) →backend: claude - Use the backend command as-is
- Do not append
--model— the Claude CLI manages its own model selection
Codex Backend — Append --model
- Look up model (e.g.,
gpt-5.3-codex) →backend: codex - Look up backend command →
codex exec --full-auto -C "$(pwd)" - Append
--model gpt-5.3-codex→ final command
For Aliases
For aliases, the alias’smodel is resolved the same way, and any prompt addition is prepended to the worker prompt.
Model Detection Rules
Dispatch automatically routes models to the correct backend:Claude model detection: Any model ID containing
opus, sonnet, or haiku — including versioned variants (e.g., sonnet-4.6, opus-4.5-thinking) — is a Claude model and must use backend: claude when the Claude Code CLI is available. Never route Claude models through the cursor backend.OpenAI model detection: Any model ID containing
gpt, codex, o1, o3, or o4-mini is an OpenAI model and must use backend: codex when the Codex CLI is available. Only fall back to cursor backend when Codex is not installed.Key Config Patterns
Model-Centric Config
Backends define CLI commands once; models map to backends. For Cursor and Codex backends,--model is appended automatically. For Claude backend, --model is omitted (the CLI manages its own model selection). Adding a model is one line.
First-Run Setup
On first use (no config file), the dispatcher:- Detects CLIs (
agent,claude,codex) - Discovers available models via
agent models - Presents options via interactive prompt
- Generates the config automatically
Smart Model Resolution
If you reference a model not in config, the dispatcher:- Probes availability (
agent models) - Auto-adds it to config
- Dispatches immediately
Aliases with Prompt Additions
Named shortcuts (e.g.,security-reviewer) that resolve to a model and optionally prepend role-specific instructions to the worker prompt.
Example:
Natural Language Config Editing
You can edit your config using natural language. The dispatcher reads, edits, and writes~/.dispatch/config.yaml directly — no special commands needed.
Examples
Resulting Config
Backward Compatibility
Oldagents: config format is still recognized. Each agent entry is treated as an alias with an inline command. The dispatcher suggests migration to the new format.
See the Multi-Model Support guide for details on how to use different models in your dispatch tasks.