Run a fleet
Create independent coding-agent sessions in tmux or herdr, assign work and receive durable replies through the Director's native inbox tools.
Prerequisites
Follow Quickstart to install, configure and trust the workspace. Put each selected backend on PATH. Use literal returned IDs and one CAFleet command per shell-tool invocation.
Prompt
Your agent loads the Director instructions, arms native reception, creates members and assigns each after its ready. The Director consumes broker events and checks evidence while preserving the host's supplied continuation and user gates.
Manual lifecycle
This example uses HOME /home/cafleet-demo and workspace /home/cafleet-demo/work/demo. Substitute actual absolute paths and the installed skill root. Config-dir resolution owns backend path overrides.
Resolve diagnosis issues. Load the Director role, backend reference and supervision procedure from the installed CAFleet skill, then register the calling session:
Example output: 1 director=2. Creation registers the current pane without starting another session. The backend flag declares the calling coding-agent host. Before creating members, arm one native receiver using the installed CAFleet skill's backend and supervision instructions. The backend reference explains host capabilities and evidence limits. Require the receiver's ready record and retain its native handle; initial replay recovers replies racing with startup.
Create and dispatch a member
Save this prompt as /home/cafleet-demo/work/demo/.prompts/member.md with a fresh filename. Keep identity placeholders and double other literal braces:
Suppose the returned ID is 3. Receive its ready, ACK its actual message ID, then dispatch its assignment:
The send types the assignment into the member's pane as one line, led by Escape. A pending preview remains pending only while the pane lock stays busy, the pane is not yet placed, or the send budget runs out; the next send to that recipient or a message wait rotation retries it. The member's startup/report/wake polls also discover durable assignments.
Receive results
Read complete JSONL records from the same owned native receiver between events. Codex explicitly reads its retained session while delegated work remains; Claude Monitor may start a turn for each record. Backend recipes own the concrete tool calls. Native reception sends no automatic input into the Director's pane. On every batch/wake, reconcile full pending payloads:
ACK every consumed delivery before ending the turn, using its returned ID:
Keep deferred questions/approvals in host-owned task state after ACK. Reconcile known/replayed IDs before acting; completed records need no second action or ACK. Broker events leave pending user decisions pending. On every batch/wake inspect roster, panes and artifacts; consume the Director's own pending IDs through broker reads.
A clean expired listener lease can renew after its native task exits while authorized work remains. Unexpected EOF or failure requires inspecting the exit, reconciling the inbox and a fresh successful broker health check before replacement. Retain incomplete JSONL across chunks and preserve unACKed messages after damaged output. Establish old-process termination before replacing a receiver. Fully idle Codex waits for the next user/native activation; a background process alone supplies no unsolicited per-line wake.
Where a verified native adapter is unavailable, state the limitation and use explicit manual poll or finite reception within host permissions. Finite wait also provides ordinary-member retry recovery:
Run a command for a member
A member can ask Need to run: mise //cafleet:test. My harness denied it. Authorize and dispatch the exact command:
The CLI returns submission metadata. Inspect the native command and result:
Once the command has finished, explicitly continue a member that has not resumed:
Inspect failed or uncertain input before authorizing any retry. Command routing explains the evidence boundary.
Close the fleet
Consume the final inbox and complete approval gates. Delete each owned ordinary member, verify the remaining roster, then deregister:
Collect the listener's fleet-deleted closure and native task exit before retiring its handle. To stop reception while the fleet stays live, use verified native cancellation with observed termination or stop renewal and drain its finite lease. Preserve pending messages for later reads.
Fleet deletion retains history and closes no panes. Limit cleanup to the team you own.
Backend variations
Use explicit member backend/model flags to create a mixed team. Resolve role defaults and models through model choice. OpenCode members perform assignments through their selected provider/model, workspace tools, broker and native shell path. Each member receives its own installed role/core paths, shared BASE and host prerequisites.