/cao:cao-supervisor-protocolsfrom cao
Coordinates, delegates, and splits work across CAO worker agents as a supervisor. Covers assign vs handoff dispatch patterns, fan-out to parallel specialists, idle-based inbox delivery, and debugging worker callbacks.
Ships in cao. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use this skill when supervising worker agents through CLI Agent Orchestrator.
This skill covers how supervisors should dispatch work, decide between assign and handoff, and receive worker results without blocking inbox delivery.
From cao-mcp-server, supervisors orchestrate work with:
assign(agent_profile, message) for asynchronous work that returns immediatelyhandoff(agent_profile, message) for synchronous work that blocks until the worker finishessend_message(message, receiver_id=None) for direct messages — receiver_id defaults to the terminal that created yours via handoff/assignanswer_user_prompt(terminal_id, answer) for answering a Hermes worker that reports waiting_user_answerYour own terminal ID is available in the CAO_TERMINAL_ID environment variable. CAO appends it to assigned task messages and records it on worker terminals automatically, so you rarely need to handle it yourself.
Delegating has a fixed cost: routing the message, starting a worker, and the worker's own verification. Choose by the shape of the task:
Your agent profile's rules take priority over this heuristic: code_supervisor, for instance, always delegates coding and never writes code itself.
Measured on #1119: the same dependency-floor change took 1m 18s done directly and about 2m 57s routed through a conductor to a developer seat. Both produced byte-identical lockfiles. The delegated result had the better code comment, which is the value an independent pass adds.
| Mistake | Fix |
|---|---|
Keeping the terminal busy after assign — polling in a loop, or running sleep/echo to wait. | Inbox messages are delivered when your terminal goes idle. Dispatch everything first, then end the turn. |
Answering a Hermes worker that reports waiting_user_answer with assign, handoff or send_message. | Use answer_user_prompt(terminal_id, answer) with the exact selection to submit, such as 1 or o. |
| Doing a small coding task yourself because the do-or-delegate heuristic allows it, on a profile that forbids it. | Your agent profile's rules win. code_supervisor, for instance, always delegates coding. |
Treating a send_message callback as proof the work landed, when the worker wrote files. | Ask workers for the deliverable up front, and for absolute paths in the callback message. |
| Assuming you must hand-write callback instructions into every assigned message. | CAO appends your terminal ID and records you as the worker's caller automatically. An explicit callback ID is optional emphasis; it is required only when CAO_ENABLE_SENDER_ID_INJECTION=false. |
Use assign when the worker should continue independently and report back later. This is the normal pattern for fan-out work or parallel execution.
Use handoff when the next step is blocked on the worker result. The orchestrator waits for completion, captures the worker output, and returns it directly to the supervisor.
Typical pattern:
assign for analysis, research, or code changes that can run in parallel.handoff for report generation, blocking review steps, or any task where you need the result before you can continue.Assigned workers usually return results through send_message. Those inbox messages are delivered to the supervisor automatically when the supervisor terminal becomes idle.
This means supervisors should:
Do not keep the terminal busy with sleep, echo, or similar commands while waiting. A busy terminal delays inbox delivery.
If you need multiple worker results, dispatch them all first, then end the turn. Do not poll manually in a loop.
By default, CAO appends your terminal ID and callback instructions to every assigned message automatically, and records your terminal as the worker's caller — workers can reply with send_message without a receiver_id. You do not need to hand-write callback instructions.
You may still include an explicit callback ID in the task message for emphasis:
Analyze dataset A. Send results back to terminal abc123 using send_message.
If your deployment disables the automatic suffix (CAO_ENABLE_SENDER_ID_INJECTION=false), the explicit pattern above is required: the structural caller record still works, but the worker gets no in-message reminder.
Use send_message when you need to contact an existing terminal directly rather than spawning a new worker.
Examples:
When sending direct messages, include enough context that the receiver can act without re-reading the full original task.
Hermes workers can stop on approval prompts or clarify pickers and report waiting_user_answer. When a Hermes worker is in that state, do not use assign, handoff, or send_message to answer it. Use answer_user_prompt(terminal_id, answer) with the exact selection or text to submit, such as 1, o, or a custom answer.
Other providers may still emit prompts in their terminal output without reporting waiting_user_answer. For those providers, treat the prompt as ordinary terminal output and answer it with send_message or direct input according to the workflow you are running.
assign — callback routing is automatic (your terminal ID is appended to the message and recorded as the worker's caller).handoff only for steps that must finish before you can continue.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
cao, agent-orchestration, supervisor, multi-agent, dispatch-patterns
4 skills in this plugin
/cao-agent-routingFind and select the best installed CAO agent profile for a task before delegating with assign or handoff. Use when a supervisor needs to route coding, documentation, infrastructure, review, research, or other specialist work and the user has not already chosen an agent profile. Also use when the user asks "which agent should do this" or "pick a profile for this task"./cao-session-managementFind available CAO (CLI Agent Orchestrator) agent profiles, and talk to the conductor and worker terminals of a running CAO session, including unblocking a stuck worker. Use when choosing a profile to launch, messaging or unblocking workers, or diagnosing a stuck session. For preflight, launching, session commands, statuses, delegation and safety, run `cao --skill` first./cao-npx claudepluginhub awslabs/cli-agent-orchestrator --plugin caoOther plugins' skills for the same job