Claude Code

Agent teams and channels

Teams, event channels, permission relay, coordination, costs, and Passion8 boundaries.

Teams and channels extend Claude beyond waiting for a single prompt, but serve different purposes.

CapabilityPurposeUse
Agent teamsSessions coordinate, message, and claim tasksComplex reviews and cross-module research
ChannelsMCP pushes external events into a running sessionCI, alerts, chat, webhooks
Permission relayForward approval requests and decisionsRemote approval from a trusted device

These add concurrent token usage, permissions, and event sources. Check gateway support for the actual model/tool/cache features your workflow uses.

#When to use teams

Teams are independent cooperating Claude instances, not another name for subagents. The experimental feature is enabled with:

~/.claude/settings.json
{
  "env": {
    "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
  }
}

Teammate display can use teammateMode or --teammate-mode auto. Split panes require tmux or iTerm2's it2 CLI; in-process mode is simpler for ordinary collaboration.

AspectSubagentTeam
ContextSeparate, result returned to callerSeparate teammates communicating
CoordinationMain agent assigns/collectsShared claimable task list
CommunicationReports to callerDirect teammate messages
CostUsually smaller focused delegationsFull sessions per teammate
UseFocused research/reviewBroad coordinated work
Spawn 3 teammates: one for security review, one for performance review, and one for test coverage. Have them report separately, then cross-check each other's findings.

#Lead, teammates, and mailbox

ComponentRole
LeadStarts teammates and coordinates direction
TeammatesIndependent task execution
Task listShared claims/completion
MailboxQuestions, findings, coordination

Give each teammate its role, inputs, severity criteria, checks, and non-editable files.

#Permissions and quality gates

  1. Begin with research/review roles where appropriate.
  2. Restrict writes by approval or directory.
  3. Isolate writers with worktrees.
  4. Use hooks for meaningful quality gates.
  5. Wait for results before the final synthesis.

#Channels

Ordinary MCP is called by Claude; a channel pushes an event when an external system has something to report.

SourceEvent
CI/CDFailed jobs, logs, deployment state
ChatOpsSlack/Discord/Teams messages
MonitoringAlerts, recovery, anomalies
WebhookIssue/PR/ticket/incident changes

Events enter context as channel content. Instructions determine whether to reply, use tools, or await approval.

#Channel entry points

ChannelPrerequisitesUse
FakechatSupported login and BunLocal event/reply testing
TelegramBot, plugin, paired senderMobile tasks and replies
DiscordBot, message-content intent, server invitationTeam bridge
iMessagemacOS and required Messages/AppleScript/disk permissionsPersonal Apple-device access
Custom webhookMCP SDK, stdio server, HTTP listenerCI/monitoring events

Start an installed channel:

claude --channels plugin:fakechat@claude-plugins-official

Development preview:

claude --dangerously-load-development-channels server:webhook

A server's presence in .mcp.json alone does not authorize channel events; it must be selected at launch and permitted by policy.

#Channel server contract

FieldPurpose
capabilities.experimental["claude/channel"]Channel notification support
capabilities.experimental["claude/channel/permission"]Optional approval relay
capabilities.toolsReply tools for two-way channels
instructionsEvent interpretation and reply behavior
Payload fieldPurpose
contentEvent body
metaRouting attributes such as chat_id, sender, severity

Use identifier-safe metadata names, preferably snake_case; punctuation/hyphens may cause keys to be discarded.

#Webhook architecture

StepBehavior
Declare capabilityRegister claude/channel
ConnectClaude starts the stdio server
ReceiveHTTP listener, bot, or polling receives an event
Notifynotifications/claude/channel sends content/meta
Reply optionallyExpose a reply tool
Relay optionallyRegister permission support for trusted senders

Notifications have no end-to-end acknowledgement. A successful transport write does not prove Claude processed the event; use a reply tool if acknowledgement matters.

<channel source="webhook" severity="high" run_id="1234">
build failed on main: https://ci.example.com/run/1234
</channel>

#Permission relay

Approval requests can be forwarded to a trusted remote channel and returned as approve/deny decisions.

FieldMeaning
request_idShort request identifier; return unchanged
tool_nameBash, Write, Edit, etc.
descriptionDescription of the proposed action
input_previewUsually truncated arguments

Sender authorization is essential. A public webhook must not be able to approve production commands.

#Enterprise controls

Setting/controlRecommendation
channelsEnabledSet explicitly
allowedChannelPluginsReviewed plugins only
Managed settingsConsistent team policy
MCP allowlistRestrict servers/tools
HooksAdditional checks for sensitive actions

#Cache and cost

ActionEffect
Create teamEach teammate builds a separate session cache
Teammate messagesEnter recipient history
Channel eventsAppend new context and can refresh TTL
Long gaps between alertsDefault short TTL may be cold
Approval relayApproval itself usually has no model call; tool result enters context

Keep events concise. Link long logs and fetch needed sections rather than pushing every full log.

#Passion8 boundaries

QuestionCheck
Does a teammate use Passion8?Its actual inherited endpoint/credential environment
Does event data reach the model?It normally becomes session context
Is the gateway compatible?Required tool, usage, and cache passthrough
Does cloud inherit local config?No automatic inheritance
Chat/CI data handlingReview each service's permissions and retention separately

#Official references

Support

Need help?

For setup, billing, or model issues, email us. Check the status page for uptime.

WeChat / QQ support is available at the bottom right.