CClaude Code Catalog
All Patterns

Agent Teams Direct Messaging Pattern

AgentAdvanced

Unlike the original multi-agent pattern, Agent Teams (2026-02) enables direct peer-to-peer messaging. Teammates claim tasks from a shared queue and collaborate without intermediary.

Agent Teamsdirect-messagingtask-queuecollaboration2026

Pattern Code

# Agent Teams — Direct Messaging Pattern (2026) ## Key Difference from Multi-Agent Teams - Old: Coordinator agent relays messages between agents - New: Agents message each other directly + shared task list ## Configuration ```yaml # .claude/agent-teams.yml team: name: "feature-sprint" agents: architect: role: "Design interfaces and write specs" tools: [Read, Grep, Write] worktree: true # isolated worktree frontend: role: "Implement React components per specs" tools: [Read, Write, Edit, Bash] worktree: true backend: role: "Implement API endpoints and services" tools: [Read, Write, Edit, Bash] worktree: true qa: role: "Write and run tests, report failures" tools: [Read, Write, Bash, Grep] worktree: true # Shared task list — agents claim tasks autonomously tasks: - "Design User API interface" - "Implement UserController" - "Implement UserForm component" - "Write integration tests" - "Write unit tests for UserService" # Direct messaging rules messaging: # Who can message whom channels: - from: architect to: [frontend, backend] purpose: "Spec delivery and clarification" - from: qa to: [frontend, backend] purpose: "Bug reports and test failures" - from: frontend to: [backend] purpose: "API contract questions" ``` ## Launch ```bash # Start agent team (each gets isolated worktree) claude team start --config .claude/agent-teams.yml # Monitor progress claude team status # Output: # architect: ✅ 2 tasks done (specs written) # frontend: 🔄 Working on UserForm (claimed from queue) # backend: 🔄 Working on UserController # qa: ⏳ Waiting (blocked until impl done) # # Messages: # [frontend → backend] "Does GET /users support pagination?" # [backend → frontend] "Yes, ?page=1&limit=20, see spec L45" # [qa → backend] "UserService.create() missing validation" ``` ## Key Benefits 1. No coordinator bottleneck — agents communicate directly 2. Shared task queue — agents self-organize, claim available work 3. Worktree isolation — no merge conflicts during development 4. Observable — all messages logged, team status dashboard

Copy this pattern into your project configuration to implement.

Terminal Preview

Agent Teams Direct Messaging Pattern

About Agent Teams Direct Messaging Pattern

Claude Code patterns are proven architectural designs and workflow structures that help you tackle complex development scenarios. Agent Teams Direct Messaging Pattern is a Agent pattern at the Advanced level that provides a tested, repeatable approach you can adapt to your projects for more efficient and consistent results.

Related Patterns