# Teams and Fleet

URL: https://codepanel.ai/docs/teams-and-fleet

Configure coding agents, multi-agent teams with hard tree caps, record-based Auto routing, bulk Fleet controls, and MCP connections.

The CodePanel Agent App scales from a single coding agent working one thread to multi-agent teams and parallel fleets across all of your repositories.

## Coding agents

A **coding agent** defines who works a thread: its model, role, custom instructions, and per-task spend cap.

Create and edit agents under **Autopilot → Agents** (or from the **New thread** empty state):

- **Role and instructions:** Focus an agent on backend work, UI polish, test writing, bug triage, or documentation.
- **Model:** Pick any model available on your provider keys or prepaid credits.
- **Per-task budget:** Hard dollar cap enforced by CodePanel's model proxy on every call.

You can also configure external agent CLIs (such as Claude Code or Codex) as workers on your local runner, with the same worktree isolation and spend tracking.

## Multi-agent teams

A **team** pairs one **orchestrator** agent with specialist worker subagents so larger tasks split cleanly into parallel subtasks.

Configure teams under **Autopilot → Teams**:

- **Orchestrator:** Breaks a task into subtasks, delegates each subtask to the right team member, and merges finished work onto the run branch.
- **Delegation rules:** Pin specific roles or file paths to specific agents, or let the orchestrator choose.
- **Pre-merge team review:** Subtasks can require a review check before merging back into the parent run branch; a blocked subtask surfaces in your Inbox as **Review blocked**.
- **Tree caps:** Every team enforces four hard limits across the entire task tree:

| Cap | What it bounds |
| --- | --- |
| `maxDepth` | How many levels deep subagents may delegate (`1` means only the orchestrator delegates) |
| `maxRunning` | Maximum subagents executing at the same time |
| `maxSubtasks` | Total subtasks a single run may spawn, including retries |
| `runUsd` | Hard dollar cap across the whole tree (spent plus reserved) |

## Agent records and Auto routing

CodePanel tracks every agent's real outcomes per repository under **Autopilot → Records**:

- **Merge rate:** Share of opened pull requests that merged cleanly.
- **Review findings:** Average blocking findings raised by the review panel per pull request.
- **Cost per task:** Typical model spend on that repository.

When you start a thread or create an [Autopilot rule](/docs/autopilot) with **Worked by: Auto**, CodePanel routes the task to the repository's configured team or the agent with the strongest record on that repository, and shows you each agent's track record and expected cost range in the picker.

## Fleet

**Fleet** (`/app/fleet`) is the live control table across every task on your account, segmented by state: **All**, **Running**, **Paused**, **Queued**, **Waiting**, **Failed**, **Stopped**, and **Done**.

From Fleet you can:

- Filter and search across repositories and active swarms.
- Select multiple tasks and run **bulk actions** (**Pause**, **Resume**, **Switch to cheaper model**, or **Retry**) in one step.
- Inspect per-run cost, duration, active runner, and linked pull request at a glance.

## MCP connections for agent runs

Under **Settings → MCP**, you can connect external MCP servers (such as issue trackers, documentation search, or internal tools) so agents running in the desktop app can call them during a thread. Tool calls that are not pre-allowed prompt for approval in your Inbox, just like shell commands ([Run control](/docs/run-control)).

## From an agent

| Action | MCP | CLI |
| --- | --- | --- |
| List agents | [`list_agents`](/docs/mcp-server/list_agents) | `codepanel agents` |
| List teams | [`list_teams`](/docs/mcp-server/list_teams) | `codepanel teams` |
| Bulk pause or switch model | [`bulk_tasks`](/docs/mcp-server/bulk_tasks) | `codepanel task bulk pause\|cheaper <taskId...>` |
| Inspect a run's subtasks | [`get_run`](/docs/mcp-server/get_run) | `codepanel run get <runId>` |

Next: [Decisions](/docs/decisions) and [Run control](/docs/run-control).
