Agent skill

Dispatch

by epilande in epilande/ccmux

Orchestrate other AI coding agents (claude, codex, cursor, opencode, pi, omp, gemini, or custom) by driving them through ccmux invoke: firing, polling, joining, cancelling, and reading worker…

MITAuto-check passed

Install Dispatch

skills CLI
$ npx skills add epilande/ccmux --skill dispatch -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install epilande/ccmux dispatch --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/epilande/ccmux.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/ccmux/skills/dispatch .claude/skills/dispatch && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
dispatch
GitHub stars
214
Token cost
~4.1k tokens
SKILL.md length
2,008 words
Files
3 (incl. references)
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

Orchestrate other AI coding agents (claude, codex, cursor, opencode, pi, omp, gemini, or custom) by driving them through ccmux invoke: firing, polling, joining, cancelling, and reading worker…

  • Works in 3 steps: Push (best): background the blocking… → wait on the client PID, when one shell… → Poll the store, race-safely, when…
  • Asked to coordinate
  • SKILL.md covers invoke vs spawn: which tool, Mental model: two patterns,…, Prerequisites and Generating invocation ids, plus 8 more sections
  • Calls openssl

What it does

Dispatch is an agent skill from epilande/ccmux. Orchestrate other AI coding agents (claude, codex, cursor, opencode, pi, omp, gemini, or custom) by driving them through ccmux invoke: firing, polling, joining, cancelling, and reading worker output, plus when to hand a job to ccmux spawn (a live, human-driven pane) instead. Use when asked to coordinate, delegate, fan out, or pipeline work across agents ("plan with claude, implement with codex", "run these three agents in parallel", "delegate this to codex while I keep working"), or for any request to use ccmux…

Its SKILL.md is about 4.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/examples.md` and `references/joins.md`).

It works with tmux. The repository describes itself as: 🔮 Run all your AI coding agents in tmux: jump to the one that needs you, spawn them into worktrees, and hand work between them. The licence is MIT.

When your agent uses it

  • Asked to coordinate
  • Pipeline work across agents (plan with claude
  • Implement with codex
  • Run these three agents in parallel

Example prompts

  • “plan with claude, implement with codex”
  • “run these three agents in parallel”
  • “delegate this to codex while I keep working”
  • “/dispatch”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Push (best): background the blocking invoke as a harness job (e.g. Claude Code's
  2. wait on the client PID, when one shell stays alive for the whole run.
  3. Poll the store, race-safely, when neither fits.

What it can do on your machine

Read from SKILL.md and the folder at commit 0a0c4fa. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • openssl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Dispatch loads about 4.1k tokens when it runs, and up to ~5.8k if it reads all its reference files. Until then it costs about 135 tokens; SKILL.md has 2,008 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~135
When it runs · the whole SKILL.md, loaded when a task matches
~4.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from epilande/ccmux at commit 0a0c4fa, republished under its MIT licence (© epilande). 2,008 words, ~4,081 tokens.

Download SKILL.mdSave it as .claude/skills/dispatch/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
dispatch
description
Orchestrate other AI coding agents (claude, codex, cursor, opencode, pi, omp, gemini, or custom) by driving them through `ccmux invoke`: firing, polling, joining, cancelling, and reading worker output, plus when to hand a job to `ccmux spawn` (a live, human-driven pane) instead. Use when asked to coordinate, delegate, fan out, or pipeline work across agents ("plan with claude, implement with codex", "run these three agents in parallel", "delegate this to codex while I keep working"), or for any request to use `ccmux invoke`.

Orchestrating agents with ccmux invoke

One uniform CLI launches and observes every harness the same way (claude, codex, cursor, opencode, pi, omp, gemini, plus custom agents). This skill is the mechanics; the agent-per-task policy comes from the user's prompt. ccmux never runs a model itself, so digesting a worker's output is your job, and the discipline that keeps an orchestration tractable is controlling how much each worker hands back. A single quick turn needs none of the machinery below (one ccmux invoke <agent> "..." suffices), and work faster to do yourself should stay yours: every invoke pays a 5-15s cold start.

invoke vs spawn: which tool

The test is who consumes the output. invoke returns a discrete result you thread into the next step (final turn on stdout, exit code, list/result/cancel); you consume it. spawn opens a persistent interactive tmux pane (no 30-min ceiling) and returns a paneId, not a result; its output is terminal scrollback consumed by a human at the pane. Reach for spawn only when the deliverable is a live session: a job that exceeds invoke's headless envelope (too long, or wedges headless on interactive approval) and a human will supervise, a task you judge wants human eyes (launch it, tell the user, stop), or workspace setup.

bash
# Launch a live pane for the user, then stop. Do NOT poll or drive it.
ccmux spawn codex --cwd /path/to/repo --prompt "Long refactor: <brief>"
ccmux spawn claude --issue 163 --detach          # worktree issue-163-<slug>, prompt seeded from the issue
ccmux spawn codex --pr 155 --detach              # worktree on the PR's branch
ccmux spawn --worktree fix-flicker --model opus  # named worktree; the agent's own model flag

--issue <n> / --pr <n> cut a worktree from GitHub (via gh) and seed the prompt; --worktree [name] cuts one from the current branch (name derived from --prompt if omitted). Pass --detach when dispatching so the user's view stays put. The new window is named after the worktree, else the agent, so a batch of spawns is tellable apart in tmux. --model <name> maps onto each built-in's model flag and is refused for agents without a known one.

Do not drive a spawned pane as a worker (spawn -> ccmux send -> poll -> ccmux screen -> parse scrollback). It is a brittle scrape loop: no completion signal, render races, and an answer buried in terminal chrome. For multi-turn continuity use invoke's --session (see the session-resume gotcha), or fold prior context into the next invoke.

Mental model: two patterns, one fan-out trick

PatternUse it forShape
Block-and-waitone quick task; small sequential stepsout=$(ccmux invoke <agent> "..."), blocks, returns inline
Fire-and-polllong tasks, or many at onceccmux invoke <agent> "..." --id <id> > file & then join

Fan-out + join is your own parallel tool calls; there is no batch primitive.

  • Small N, all quick: N block-and-wait invokes as N separate Bash tool calls in one assistant turn (not N $(...) lines in one script, which run serially). Their return is the join, but each call holds a slot for its whole runtime, and on a harness that serializes tool calls they won't actually overlap.
  • Large N, or long/uneven runtimes: fire each with --id, then join. See "Fire-and-poll" for the three join shapes.

The daemon caps concurrency at 16 in-flight invokes; beyond that, new invokes are rejected (see "Handling failures").

Prerequisites

  • ccmux on PATH; ccmux invoke auto-starts the daemon (ccmux daemon status confirms).
  • Claude as a worker requires its hooks (ccmux setup --agent claude); without them the invoke fails fast with exit 3 (hooks_missing). Subprocess agents (codex/cursor/opencode/pi/omp/gemini) need no hooks for invoke.
  • There is no ccmux agents command to enumerate invokable agents. Built-ins: claude, codex, cursor, opencode, pi, omp, gemini; custom agents are whatever the user defined in ~/.config/ccmux/ccmux.json.

Generating invocation ids

--id must match ^inv_[A-Za-z0-9]{4,32}$ (the literal inv_ then 4-32 letters/digits; no dashes, underscores, or dots). Prefer readable task-scoped names (inv_planauth, inv_search1) so you recognize them in list; for guaranteed uniqueness use id="inv_$(openssl rand -hex 6)" (raw uuidgen output has dashes and fails the pattern). Reusing an id whose invoke already finished is allowed (newest-wins); reusing one still in flight is rejected (agent_error, message invocationId already in flight), so mint a fresh id.

Block-and-wait (quick tasks)

bash
# Capture the worker's final turn directly. stdout has NO trailing newline.
plan=$(ccmux invoke claude "Plan, in 5 concise bullets, how to add a --dry-run flag to the importer.")

Exit 0 on success with the response on stdout; on failure, a message on stderr and a non-zero exit (table below). Keep responses small by telling the worker to be brief ("answer in <=5 bullets", "just the code, no prose"); that is the cheapest output control.

Fire-and-poll (long or many tasks)

Start each invoke without blocking your own progress, then join when it finishes. Three join shapes; pick the first your environment supports:

  1. Push (best): background the blocking invoke as a harness job (e.g. Claude Code's Bash run_in_background). The harness wakes you on completion; you never poll.
  2. wait on the client PID, when one shell stays alive for the whole run.
  3. Poll the store, race-safely, when neither fits.
Join, best (push): background the blocking invoke
bash
# Background the BLOCKING invoke via your harness's background-job mechanism
# (e.g. Bash run_in_background), NOT a shell `&`, and no redirect-detach needed:
# a blocking invoke returns the worker's output inline when it finishes.
ccmux invoke codex "Implement the --dry-run flag end to end. Report a concise summary." \
  --id inv_implflag --cwd /path/to/repo --timeout 1800000

Then stop; the backgrounded job's captured stdout is the worker's result. Set --id anyway so you can still cancel/result it by name. For a fan-out, background N such jobs; the harness's per-job completion notification is the join, no polling at all. (The push comes from your harness: the daemon's SSE events feed the ccmux TUI, and there is no CLI wait/notify primitive.)

The other two joins: wait and the race-safe poll

No background-job mechanism in your harness? The wait join and the race-safe store poll, plus their traps (the store-admission race and the long-foreground-shell kill), are in references/joins.md. Read it before writing any poll loop; the naive loop breaks in ways that look like worker failures but aren't.

Reading a worker's output: inline vs result
SourceWhat it isWorks for
The invoke's stdout (your redirect file, or the block-and-wait capture)the worker's final turn (summary-sized)all agents
ccmux invoke result <id>the worker's full captured stdout/stderrsubprocess agents only (codex, cursor, opencode, pi, omp, gemini)
  • The inline final turn is usually all you need; keep it small with a brevity prompt.
  • result <id> exits 0 with the full output, 2 if no longer available, 1 on transport error / malformed id. It includes the agent's own stderr chrome (banners, prompts), so scan for the relevant part.
  • Claude is the exception. A Claude invoke drives an interactive tmux session with no stdout buffer and writes no result file (result on a claude id always exits 2). A Claude worker's only output is the inline stdout, so never skip the redirect when backgrounding a Claude invoke, and do not poll result for it.
Controlling output size

You hold every worker's output in your own context; ccmux will not summarize for you. Prompt for brevity first ("summarize your changes in <=5 bullets"), and when you must capture a big result but only need the gist, pipe it through a cheap worker:

bash
ccmux invoke result inv_bigjob | ccmux invoke claude "Summarize this in 3 bullets:"

Handling failures

Read the outcome from the exit code (block-and-wait) or the status + kind fields (list --json). Never regex the human-format rows.

ExitMeaningTypical orchestrator response
0successuse the stdout
1generic/unknowninfra problem (tmux down, bad --timeout/--format); inspect, don't blind-retry
2rate_limitback off, retry later, or route the task to a different agent
3hooks_missingClaude only; run ccmux setup --agent claude, then retry
4agent_erroragent-attributable; see the cap/dup-id wrinkle below
124timeoutthe --timeout budget was exhausted; raise it (ceiling 30 min) or split the task
130cancelledsomeone cancelled it (possibly you)

status in list --json is running | succeeded | failed | cancelled; on failed, kind carries the same values as the exit table (a timeout reads status: "failed", kind: "timeout"). cancelled is first-class, distinct from failed, so your own cancels never read as failures.

Show full SKILL.md (795 more words)Show less
The concurrency-cap / dup-id wrinkle (exit 4)

Two rejections share kind: "agent_error" / exit 4; disambiguate on the message:

  • Contains too many concurrent invocations (max 16): the in-flight cap. Back off a few seconds (or wait for a worker to finish via list), then retry the same invoke.
  • Contains already in flight: you reused a running id. Mint a fresh id and retry; do not back off.

Cleaning up after a merge

Once the PR merges, ccmux worktree prune --end-idle removes the worktree, the local branch, the idle agent sitting in it and that agent's pane. A worktree whose agent is working or waiting is never offered, so this cannot pull a job out from under itself.

You cannot run the removal yourself. It is interactive by design: there is no --yes, and the command exits 1 when stdin is not a TTY, which a Bash tool never is. What you can run is ccmux worktree prune --end-idle --dry-run, which reports what would go without touching anything. Hand the removal to the human: the picker's Worktrees panel (W, select the row, then x), or the same command in their terminal, where it prompts for a selection and then Proceed? [y/N].

The agent's transcript file survives its pane, but that is not the same as the session being resumable: opencode, pi and omp resume by DIRECTORY, and the directory is what the removal deletes.

Gotchas (read before a long run)

  • Admission lag: a freshly-fired id is briefly ABSENT from list. A naive poll loop reads that absence as done and aborts at 0s; this is the most common way to break a fan-out. Full detail and the race-safe pattern: references/joins.md.
  • A running record has no liveness guarantee. A wedged worker sits at running until its --timeout fires or you cancel; there is no heartbeat. Track each id's age in list, cancel anything far past its expected runtime, and always set a deliberate --timeout so a wedge self-resolves.
  • Smoke-test an agent before you depend on it. Some agent/version combinations wedge headless on tasks needing interactive approval (notably file writes) while answering trivial prompts fine. Fire one throwaway ccmux invoke <agent> "reply with: ok" with a short --timeout first; if it doesn't return cleanly, route the task elsewhere.
  • The store ages out 5 minutes after an invoke STARTS, not after it finishes (running invokes never age out), so a long worker can finish and immediately be gone from list. If an id disappears and you have its redirect file, trust the file. Poll promptly after long invokes and pull result quickly for subprocess agents.
  • The store is in-memory per daemon. ccmux daemon restart clears all records and result files; don't restart mid-orchestration.
  • result is ephemeral. Per-daemon temp dir, ~5 MiB cap per invoke (truncated beyond), lost on restart/reboot/OS-reap. Read it soon; it is a backup, not a log.
  • Prompt cap: 256 KB (arg + stdin combined). Gemini, pi, and omp carry a tighter 120 KiB cap because their prompt rides in argv. Split or summarize bigger inputs.
  • Timeout: default 5 min, ceiling 30 min (--timeout <ms>, e.g. --timeout 1800000). Set it deliberately for big jobs; a long implementation can hit the default.
  • --cwd matters. A worker that edits files acts in --cwd (defaults to your cwd); point it at the intended repo, or a scratch dir you don't mind it touching.
  • Session resume is three tiers, not a boolean. Claude and OpenCode hand a resumable id back through ccmux (sessionId on the list --json record) for --session <id>. Codex and Cursor accept --session but never hand an id back through ccmux (scrape it from result chrome, or just fold prior context into the next prompt). Pi, omp, and Gemini reject --session. Every un-resumed invoke is a cold start.

Cancelling

ccmux invoke cancel <id> is idempotent (exit 0 whether running, already finished, or unknown) and prints which case it hit. A cancelled worker's record reads cancelled, so a concurrent poll never misreads your cancel as a failure. Cancel workers that have run too long or whose result you no longer need.

Reading and relaying between existing sessions

Moving output between sessions that already exist (yours, the user's, another orchestrator's) is its own skill: relay. The decision in one table:

MotionCommandPayload goes
Read-and-reasonccmux last <ref> [--turns N]to your stdout, i.e. into your context
Relayccmux handoff <from> <to>daemon-side, straight into the target

When you are only a router, relay with handoff so the payload never enters your context. Load the relay skill (via the Skill tool) whenever you relay between sessions or receive a message beginning [ccmux handoff].

Worked example

A complete plan -> implement -> search pipeline (block-and-wait plan step, two-worker fan-out, wait join, collect) is in references/examples.md; adjust the agent names to whatever policy the user gave you.

© epilande, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in plugins/ccmux/skills/dispatch of epilande/ccmux.

  • SKILL.md
  • references/examples.md
  • references/joins.md

Open the folder on GitHubat commit 0a0c4fa

Compare with similar skills

Dispatch next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Dispatch compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Dispatch this skillepilande/ccmux214—~4.1kAutomated safety check: PassMIT
1passwordtrpc-group/trpc-agent-go1.8k13 repos~656Automated safety check: PassApache-2.0
CodeGraph Agent Evalcolbymchenry/codegraph73k—~950Automated safety check: PassMIT
Tmuxtrpc-group/trpc-agent-go1.8k23 repos~868Automated safety check: PassApache-2.0
CodexBar Live QAsteipete/CodexBar22k—~1.2kAutomated safety check: PassMIT
Agent Feature ReproductionQwenLM/qwen-code28k—~1.5kAutomated safety check: PassApache-2.0

Similar skills

  • 1password

    trpc-group/trpc-agent-go

    Set up and use 1Password CLI (op). An agent skill from trpc-group/trpc-agent-go.

    1.8k GitHub starsUsed in 13 repos~656 tokens
    AI & LLM EngineeringAuto-check passed
  • CodeGraph Agent Eval

    colbymchenry/codegraph

    Benchmarks how much CodeGraph helps a coding agent on a real repository, comparing runs with and without it for a chosen local or published version.

    73k GitHub stars~950 tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Tmux

    trpc-group/trpc-agent-go

    Remote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.

    1.8k GitHub starsUsed in 23 repos~868 tokens
    Data & AnalyticsAuto-check passed
  • CodexBar Live QA

    steipete/CodexBar

    Runs live QA for the CodexBar app: provider usage matrix checks through its packaged CLI, config validation and menu checks, with 1Password-backed credentials handled safely.

    22k GitHub stars~1.2k tokensUpdated today
    Testing & QAAuto-check passed
  • Reproduces a feature from Codex or Claude Code in Qwen Code by running the reference agent under capture, reading the traces, then implementing matching behavior.

    28k GitHub stars~1.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Codex Plugin QA

    code-yeongyu/oh-my-openagent

    Tests the omo Codex plugin in an isolated CODEX_HOME with a local mock model, proving hooks fired through app-server notifications without touching ~/.codex.

    70k GitHub stars~1.9k tokensUpdated today
    Testing & QAAuto-check passed

More from epilande/ccmux

  • Relay

    epilande/ccmux

    Read another live agent session's output with ccmux last, or relay one session's last response into another with ccmux handoff.

    214 GitHub stars~1.8k tokensUpdated 2 days ago
    Auto-check passed

Works with

Questions about Dispatch

What does Dispatch do?

Orchestrate other AI coding agents (claude, codex, cursor, opencode, pi, omp, gemini, or custom) by driving them through ccmux invoke: firing, polling, joining, cancelling, and reading worker…. Dispatch is an agent skill from epilande/ccmux. Orchestrate other AI coding agents (claude, codex, cursor, opencode, pi, omp, gemini, or custom) by driving them through ccmux invoke: firing, polling, joining, cancelling, and reading worker output, plus when to hand a job to ccmux spawn (a live, human-driven pane) instead.

When should I use Dispatch?

Dispatch fits situations like: asked to coordinate; pipeline work across agents (plan with claude; implement with codex; run these three agents in parallel.

How do I install Dispatch in Claude Code?

Run `npx skills add epilande/ccmux --skill dispatch -a claude-code`. Or copy the skill folder (plugins/ccmux/skills/dispatch in epilande/ccmux) into .claude/skills/dispatch in your project. Claude Code loads it when a task matches its description.

How do I install Dispatch in Codex?

Run `npx skills add epilande/ccmux --skill dispatch -a codex`. Or copy the skill folder (plugins/ccmux/skills/dispatch in epilande/ccmux) into .agents/skills/dispatch in your project. Codex loads it when a task matches its description.

Can I use Dispatch in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add epilande/ccmux --skill dispatch -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/dispatch, .gemini/skills/dispatch, .github/skills/dispatch and .opencode/skills/dispatch in your project.

What does Dispatch need to run?

Going by SKILL.md and its folder, Dispatch needs the command-line tools its instructions call (openssl).

Does Dispatch access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Dispatch safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Dispatch use?

Dispatch is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Dispatch use?

About 4.1k tokens (SKILL.md is roughly 16k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.7k tokens, read only when the agent opens those files.

What are the alternatives to Dispatch?

Skills that share tags, products or a category with Dispatch: 1password (trpc-group/trpc-agent-go, 1.8k stars), CodeGraph Agent Eval (colbymchenry/codegraph, 73k stars), Tmux (trpc-group/trpc-agent-go, 1.8k stars) and CodexBar Live QA (steipete/CodexBar, 22k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Dispatch?

epilande (a GitHub user) maintains it in epilande/ccmux, which has 214 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 5, 2026.

Source: epilande/ccmux on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.