How to install and use Claude Code Agent Teams (Reverse-engineered)
Quick Overview
The video reverse-engineers and demonstrates how to install and use the Claude Code Agent Teams feature by enabling the CLAUDECODEEXPERIMENTALAGENTTEAMS environment variable to 1, creating configuration files in the .claude/teams folder, and initiating a multi-agent investigation session via the command line, which allows agents to communicate and debate hypotheses to achieve a consensus, superior to single-agent investigations.
Key Points: Agent Teams are enabled globally by setting the environment variable CLAUDECODEEXPERIMENTALAGENTTEAMS to "1" in the shell or settings.json. Teams are configured by creating a folder structure under .claude/teams, including a config.json for team metadata and numbered JSON files (1.json, 2.json, etc.) in a tasks subdirectory for individual assignments. The main agent initiates a session using the command 'claude --teammate-mode tmux' to spawn a collaborative environment where sub-agents work on assigned tasks concurrently. Sub-agents communicate via a 'Send Message' tool, which allows one-to-one or broadcast messages, and team leads can use 'Shutdown Request' messages to terminate team members' sessions. The multi-agent debate structure, where agents challenge each other's theories, produces a clearer, more precise conclusion than sequential single-agent investigations, as shown in the debugging example where five agents resolved a complex bug. The new tools introduced for teams include TeamCreate, TaskCreate x N, Task x N, TaskUpdate, and TeamDelete, all defined by JSON schemas. LangFuse integration is shown to be useful for tracing and visualizing the complex inter-agent communication history, including message types like 'message', 'broadcast', and 'shutdownrequest'.
Context: The video provides a detailed, reverse-engineered tutorial on setting up and running the experimental Agent Teams feature within Claude Code. This feature allows multiple specialized AI agents to collaborate, debate findings, and work in parallel on complex tasks, contrasting sharply with the previous single-agent task execution model. The demonstration involves setting up a specific team structure to investigate a software bug related to disappearing design draft nodes.