Claude Code skill that fans tasks out to parallel fresh-context workers, 10x effective context, non-blocking, with workers that surface questions without losing state.
Before you start
API keys for the models you want to route to • Python 3.10+
Dispatch works by matching task descriptions to specialized agents. Define each agent's specialty clearly, the routing quality is only as good as your agent descriptions.
Send 10-20 real tasks through the router and check which agent they land on. Adjust agent descriptions when routing is wrong, the descriptions are your routing rules.
Dispatched workers run in the background with fresh context windows. When a worker finishes, review its output and any clarifying questions it surfaced. Dispatch is non-blocking, your main session is free during worker execution, so use that time to dispatch more tasks or continue other work.
Dispatch's core concepts: the dispatch call, agent definitions, routing table, and worker lifecycle.
| Command / Skill | What it does | When to use it |
|---|---|---|
dispatch(task) | Fan a task out to a background worker with a fresh 200k-token context window, non-blocking | Any task that doesn't need main session context, most implementation tasks qualify |
Agent definition | Named agent with a description and model assignment, description drives LLM-based routing | Define all agents before dispatching any tasks, routing quality = description quality |
Routing table | Maps task types to agents, evaluated by the router LLM on every dispatch call | Tune when routing accuracy drops below 80% on your test set, sharpen agent descriptions |
Worker questions | Clarifying questions a worker surfaces back to the main session, answered without polluting main context | Review before accepting any worker output, unanswered questions mean incomplete results |
Multi-model routingadvanced | Assign different models (Claude, GPT, Gemini) per agent for cost or capability optimization | Route cheap classification tasks to a smaller model, complex reasoning to Claude |