Agent Teams let you run multiple Claude Code sessions as a coordinated team inside Mains. One session acts as the team lead — it breaks down work, spawns teammates, and synthesizes results. Each teammate runs in its own context window and can communicate directly with other teammates.Documentation Index
Fetch the complete documentation index at: https://docs.mains.dev/llms.txt
Use this file to discover all available pages before exploring further.
Agent Teams is an experimental feature and is disabled by default. You must opt in before using it.
Enabling Agent Teams
Add the following to yoursettings.json (user or project level):
| Scope | Path |
|---|---|
| User (global) | ~/.claude/settings.json |
| Project (shared) | .{your_project}/settings.json |
| Local (personal) | .{your_project}/settings.local.json |
When to Use Agent Teams
Agent teams work best when multiple people — or in this case, agents — can explore a problem in parallel without blocking each other:- Research and review — multiple reviewers checking security, performance, and test coverage simultaneously
- New modules — each teammate owns a separate, independent piece of a feature
- Debugging — teammates test competing hypotheses in parallel
- Cross-layer work — frontend, backend, and tests each handled by a different teammate
Starting a Team
Once enabled, describe the task and team structure in natural language:Subagents vs Agent Teams
| Subagents | Agent Teams | |
|---|---|---|
| Communication | Report results back to caller only | Teammates message each other directly |
| Coordination | Main agent manages all work | Shared task list with self-coordination |
| Best for | Focused tasks where only the result matters | Complex work requiring discussion and collaboration |
| Token cost | Lower | Higher |
- Session resume (
/resume,/rewind) does not restore in-process teammates - One team per session — clean up the current team before starting another
- Teammates cannot spawn their own teams (no nesting)
- All teammates inherit the lead’s permission mode at spawn time
- Split-pane mode is not supported in mains desktop app.
