Fleet
A skill for running parallel
or
workers in tmux with budgets and DAG dependencies. Supports both Claude and Codex providers — set per-fleet or per-worker. Operator owns all kill / steer / re-direction — there is no auto-restart, no auto-verify, no babysitter loop.
When to use this skill (and when NOT to)
FIRST: prefer Claude Code's built-in Agent tool when any of these are true. It's simpler, faster, and avoids the fleet machinery entirely.
- The work fits inside the current conversation
- All sub-agents will finish in under 10 minutes
- You'll synthesize the results in the same session
- You don't need budget caps or dependency ordering
Reach for THIS skill only when ≥1 of these is true:
- Persistence: the run will outlive the parent process (e.g. multi-hour fleet, user closes laptop)
- Per-worker budgets: you need enforced per worker
- DAG dependencies: worker D must wait for A, B, C to finish first
- Mixed models per worker: Sonnet researchers + Haiku validators in the same fleet
- Tmux pane visibility: the user wants to attach to individual workers and watch them stream
If none of those apply, stop reading this skill and use the Agent tool.
What this skill is NOT
- Not an auto-recovery system. If a worker fails or hangs, the operator decides what to do.
- Not a babysitter. There is no , no stuck-detection that kills, no mid-flight steering.
- Not for "spawn 3 quick lookups in parallel" — that's the Agent tool's job.
Available scripts
| Script | When to call | Args |
|---|
| Start a new fleet from a you generated | |
| Show what's running, what's done, live cost, last message per worker | <fleet-name-or-root> [-v] [--watch] [--json]
|
| Stop one worker or the entire fleet (operator's hard stop) | <fleet-name-or-root> <worker-id>|all [--force]
|
| After editing one worker's , re-run just that worker | <fleet-name-or-root> <worker-id>
|
| Generate a markdown summary when the fleet is done | |
| Capture a single worker's tmux pane content | <fleet-name-or-root> <worker-id>
|
| Stream a unified event feed across all workers | <fleet-name-or-root> [--agent <id>]
|
| Utility | Purpose | Usage |
|---|
| Visualize fleet DAG structure (ASCII or mermaid) | python3 ${CLAUDE_SKILL_DIR}/lib/dag-viz.py <fleet.json> [--mermaid]
|
All scripts accept either an absolute fleet-root path
or a fleet name (resolved via
~/.claude/fleet-registry.json
, populated automatically by
).
Launch procedure (MUST follow exactly)
When the user asks you to launch a fleet:
- Set to the user's specified directory. Default to cwd if unspecified. Use absolute paths only.
mkdir -p $FLEET_ROOT/workers
- Generate — see
references/fleet-json-schema.md
for the full schema. Required top-level fields: , , . Each worker needs , , , , , . Use for DAG ordering.
- For each worker, create
$FLEET_ROOT/workers/{id}/prompt.md
. The prompt MUST include this line verbatim:
Save ALL output files to $FLEET_ROOT/workers/{id}/output/ — use absolute paths.
(Substitute the real fleet root and worker id.)
- Run:
bash ${CLAUDE_SKILL_DIR}/scripts/launch.sh $FLEET_ROOT
- Do NOT write your own tmux/claude commands. handles topo sort, tmux session creation, per-worker spawning, budgets, and the registry.
- ALWAYS tell the user the exact status command so they can monitor manually:
bash ${CLAUDE_SKILL_DIR}/scripts/status.sh <fleet-name-or-root>
This is mandatory after every launch. The user must be able to check status without asking you.
Re-running ONE worker (the addendum workflow)
The user has a finished fleet and wants to add 1-2 sources / change one worker's instructions:
- Edit
$FLEET_ROOT/workers/{id}/prompt.md
(add the new sources / instructions)
- Run
bash ${CLAUDE_SKILL_DIR}/scripts/relaunch-worker.sh <fleet-name> {id}
- The worker's old is rotated to , a fresh tmux window spawns, other workers are untouched
- The fleet's tmux session must still exist. If it's been killed, the user must
launch.sh --force-relaunch
the whole fleet — only works against a live fleet session.
If the user wants to re-run multiple workers, do it one at a time. There is no batch re-run; that's intentional.
Killing
There are two operator-initiated kill paths and no automatic kills:
kill.sh <fleet> <worker-id>
— kill one worker. Sweeps subprocess descendants. Use this when you've decided a single worker is going down the wrong path.
kill.sh <fleet> all --force
— tear down the entire fleet, kill all tmux windows, sweep every orphan subprocess, mark workers KILLED, unregister from the registry.
There is no
. There is no mid-flight redirection. The intentional workflow for "I want this worker to take a different direction" is:
it, edit
,
. Three steps, fully under operator control.
Worker types
The
field on each worker controls the
set passed to claude. Pick one:
- — disallows: Bash, Edit, Write, Agent, WebFetch, WebSearch. Cannot write files. Only use for pure analysis where output is captured from assistant messages in session.jsonl.
- — disallows: Bash, Agent, WebFetch, WebSearch. Use for synthesizers and any worker that writes output files.
- — disallows: Agent, WebFetch, WebSearch (the typical default for build/test workers)
- — disallows: Bash, Edit, Agent (web access enabled). Use for researchers, not .
- — disallows: Bash, Edit, Agent, WebFetch, WebSearch. Has Read + Write only. Use for reviewers that write verdict files.
- — disallows: Agent, WebFetch, WebSearch, Edit
WARNING: cannot write files. If a worker needs to save output (findings.md, synthesis.md, etc.), use
,
,
, or
. Setting a synthesizer to
will burn its entire budget trying to find a Write tool.
See
references/worker-types.md
for the full permission matrix.
Provider support (Claude + Codex)
Workers can run on either
(default) or
(OpenAI Codex CLI). Set at fleet level or per-worker:
json
{
"config": {
"provider": "codex",
"model": "gpt-5.4",
"reasoning_effort": "medium"
},
"workers": [
{ "id": "researcher", "type": "research", "provider": "codex", "model": "gpt-5.4", "reasoning_effort": "medium" },
{ "id": "writer", "type": "write", "provider": "claude", "model": "sonnet" }
]
}
Codex-specific fields
| Field | Values | Default | Scope |
|---|
| | | | config + per-worker |
| | | | (none) | config + per-worker, codex only |
Codex model aliases
| Model | Use case |
|---|
| Flagship — strongest reasoning, recommended default |
| Fast/cheap — validators, simple tasks |
| Coding-focused (migrating to gpt-5.4) |
Codex limitations vs Claude
- No — codex has no per-worker budget cap. Fleet-level cost tracking still works (estimated from token counts).
- No — codex has no automatic model fallback.
- No per-tool disabling — codex uses sandbox modes (, ) instead of . Worker types are mapped automatically.
- Web search — research workers get automatically.
- All output workers need — codex sandbox blocks ALL file writes including output.
DAG dependencies
json
{
"id": "synthesizer",
"depends_on": ["researcher-01", "researcher-02"]
}
uses the shared
primitives (Kahn's BFS-layered topo-sort) to order workers and waits for dependencies to emit a terminal
event before starting dependents. Cycles are detected before any tmux state is created — fleet exits 2 with
on stderr. Workers within a layer run in parallel up to
. Use
to preview the DAG structure before launch.
Budgets
- — per-worker hard cap, passed to
config.max_budget_fleet: N
— total fleet cap; stops launching new workers once this is exceeded (already-running workers are not killed, the cap is "no new spending")
STRICT RULES
- ALWAYS use the scripts above for EVERY operation. Never write your own tmux / claude commands.
- NEVER use the flag with — causes auth failures.
- Fleet root = user's directory. Default to cwd. ALL fleet files go inside .
- Worker output paths must be absolute:
$FLEET_ROOT/workers/{id}/output/
. Tell the worker this in its prompt.md.
- is the only way to start workers. is the only way to selectively re-run one. There is no other path.
- Operator owns kill and direction changes. Do not auto-kill, do not auto-restart, do not auto-redirect. If a worker is misbehaving, surface it to the user and let them decide.
- Do NOT invent missing scripts. If you find yourself wanting , , , or — they were intentionally removed. Use the operator-owned workflow above instead.
Rationalizations to reject
| Agent says | Rebuttal |
|---|
| "The task is small enough that I can write the tmux commands myself" | The skill exists to prevent the 15 things you'll forget (unset CLAUDECODE, --disallowed-tools, session naming, registry, topo sort). Use launch.sh. |
| "I'll use to restart all stuck workers at once" | One at a time, intentional. Batch restart is how experiment 001 burned $20 — cache rebuilds on every worker compounded. |
| "The worker seems stuck — I should kill and restart it" | Long thinking blocks look like hangs. Check or first. Only the operator kills workers. |
| "I should add a verify step after each worker finishes" | There is no verify step. The operator reads output and decides. Auto-verify was removed after it caused more harm than the failures it caught. |
| "I'll just add to speed things up" | causes auth failures. Never use it. This is STRICT RULE #2. |
When to give up on this skill
If the user asks for behavior that requires auto-recovery, mid-flight steering, or per-worker validation loops, tell them this skill no longer does those things by design. Suggest:
- For auto-recovery → they should run a watcher script themselves and call + from it
- For mid-flight steering → kill + edit prompt.md + relaunch-worker
- For validation → they read the output files themselves and decide
The skill's surface area was deliberately reduced after experiments where automated behavior caused more harm than the failures it was trying to recover from.
$ARGUMENTS