Reverse-Engineering Claude Code Agent Teams: Architecture and Protocol
Introduction Claude Code (v2.1.47) ships with an experimental feature called Agent Teams: multiple Claude Code sessions coordinate on shared work through a lead-and-teammates topology. I've been bu...

Source: DEV Community
Introduction Claude Code (v2.1.47) ships with an experimental feature called Agent Teams: multiple Claude Code sessions coordinate on shared work through a lead-and-teammates topology. I've been building Hive, a multi-agent coding orchestrator with similar goals but a very different architecture, so I wanted to understand how Anthropic's approach works under the hood. This post documents what I found through: Reading the official documentation Examining actual artifacts left on disk by previous team sessions Letting Claude analyze the Claude Code binary (v2.1.47) for implementation details (hah!) Table of Contents 1. Architecture Overview 2. The Shared Task List 3. Inter-Agent Communication 4. Agent Spawning and Lifecycle 5. Quality Gates and Hooks 6. Token Economics 7. Architecture Summary Sources 1. Architecture Overview An agent team consists of four components: Component Role Team lead The main Claude Code session that creates the team, spawns teammates Teammates Separate Claude Co