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.
~/.trellis/channels/. The default scope is the current project; --scope global creates a cross-project channel.
When to use Channel
| Need | Channel pattern |
|---|---|
| A second opinion | Run a one-shot worker with channel run. |
| Multi-round design discussion | Create, spawn, send, wait, then send follow-up pressure tests. |
| Independent implementation/check | Spawn a worker with task files or a JSONL context manifest. |
| Parallel review | Spawn named workers and wait for all of them. |
| Correct work already in flight | Use channel interrupt without discarding the session. |
| Durable topics or issue feedback | Create a --type forum channel with threads. |
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:
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:
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.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 requireRunningWorkerwhen silently appending a message to a stopped worker would be an error. - Use
--stdinor--text-filefor 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 usewait --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: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: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
--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
| Command | Purpose |
|---|---|
channel create | Create a durable chat or forum channel. |
channel run | Run one ephemeral worker and print its answer. |
channel spawn | Start a Claude or Codex worker with explicit context. |
channel send / wait | Route work and wait for matching events. |
channel messages | Inspect, filter, or follow the event stream. |
channel interrupt / kill | Redirect a turn or stop a worker. |
channel forum / thread | Read reduced forum state and one thread timeline. |
channel context / title | Manage durable context and presentation metadata. |
channel rm / prune | Remove one channel or preview and apply bulk cleanup. |
trellis channel <command> --help for the complete flags supported by your installed CLI version.