Skip to main content
trellis channel is Trellis’s local multi-agent collaboration runtime. It lets a main agent start Claude or Codex workers, give each worker explicit context, exchange messages through a durable event log, and inspect or redirect work while it is running. Use Channel when the work needs a conversation or an audit trail—not just one isolated sub-agent call.
Channel state is stored under ~/.trellis/channels/. The default scope is the current project; --scope global creates a cross-project channel.

When to use Channel

Do not use Channel as long-term conversation memory. Use trellis mem for history search. A normal platform sub-agent call is also simpler when you only need one static result and do not need durable messages, progress inspection, or redirection.

Let the AI operate Channel

trellis init and trellis update install the bundled trellis-channel skill on supported platforms. You can describe the collaboration outcome instead of assembling every command yourself:
The skill chooses the matching Channel workflow and CLI commands. Use the CLI directly when scripting, inspecting events, or debugging a worker.

One-shot question

channel run creates an ephemeral channel, starts one worker, sends the prompt, prints the final answer, and removes the channel on success:
If the run fails or times out, Trellis keeps the channel so you can inspect its events and worker log.

Multi-round review

The most useful Channel workflow is an iterative review. Give the worker only the files it needs, wait on Trellis-emitted events, then challenge the first answer instead of treating it as final.
Continue with a focused second round:
A productive review usually covers the direction, MVP boundary, data contract, CLI or UX contract, failure handling, and an opposition round. One answer plus a confirmation is a review, not a brainstorm.

Context and routing

Workers do not automatically receive every project file.
  • Use repeatable spawn --file <path> flags for a few explicit files.
  • Use repeatable spawn --jsonl <path> flags for Trellis context manifests.
  • Use --as <name> to give each worker a stable address.
  • Use send --to <name> to wake a worker. Spawned workers are explicit-only by default.
  • Use --delivery-mode requireRunningWorker when silently appending a message to a stopped worker would be an error.
  • Use --stdin or --text-file for long prompts so the shell does not reinterpret punctuation.
send always writes a message event. It has no custom --tag or --kind flag. Wait for system events such as turn_finished, done, error, or killed instead of asking the model to emit a magic completion string.

Parallel reviewers

Give workers distinct names, send each one a targeted brief, and use wait --all:
--all requires every worker listed in --from to produce a matching event. A timeout exits with code 124 and reports which workers are still missing.

Redirect a worker

Use a soft interrupt when the worker should abandon its current turn and follow replacement instructions while keeping its provider session:
Use channel kill <channel> --as <worker> only when the worker must stop immediately or does not honor the interrupt. Session identifiers and logs remain available for diagnosis and spawn --resume.

Forum channels

A forum channel is a durable board of independent threads rather than a flat chat timeline:
Use channel context add for background that should remain visible whenever a channel or thread is read. Use post ... status and post ... summary to record the resolution. Forum history is event-sourced, so inspect it with forum, thread, and messages --thread instead of parsing events.jsonl directly.

Inspect and clean up

Pretty message output is an operator view and may shorten progress payloads. Use --raw when auditing streamed output or diagnosing a stalled tool call. Spawned workers have an idle cleanup TTL of 5m and a default live-worker budget of 6. Override them per spawn with --idle-timeout and --max-live-workers, or configure channel.worker_guard in .trellis/config.yaml.

Command map

Run trellis channel <command> --help for the complete flags supported by your installed CLI version.