Skip to main content
Back to Blog
Claude CodeAI CodingSubagentsMulti-AgentDeveloper ToolsIndie Hackers

Claude Code Subagents, Background Agents & Agent Teams in 2026: The Real Multi-Agent Guide

ghosty
Founder, SaaSCity
Claude Code Subagents, Background Agents & Agent Teams in 2026: The Real Multi-Agent Guide

"Multi-agent" gets thrown around loosely. In Claude Code it's actually three distinct, documented things — and knowing which is which is the difference between a clean workflow and a token bonfire. This is the accurate guide: no mythical thousand-agent swarms, just what the tool really does.

(This is the subagents deep-dive. For the broader pro workflow, see advanced Claude Code tips; to structure the whole project, the projects hub.)

The three tiers

TierWhat it isUse it for
SubagentsA worker inside your session with its own context window; reports a summary backIsolating exploration, search, or a focused task so it doesn't flood your main context
Background agentsMany independent sessions running in parallel, monitored from one placeRunning several separate tasks at once
Agent teamsSessions that communicate with each other (peers, not just report-up)Collaborative, multi-session work

Most of the value for solo builders is in subagents — start there.

Subagents: the core primitive

A subagent runs in its own context window with a custom system prompt, specific tool access, and independent permissions. When a task matches a subagent's description, Claude delegates; the subagent works independently and returns only its result — keeping search results, logs, and file dumps out of your main conversation.

What they buy you (straight from the docs):

  • Context preservation — exploration happens in the subagent's window, not yours.
  • Constraint enforcement — limit which tools a subagent can use.
  • Reuse — user-level subagents work across all your projects.
  • Cost control — route a task to a faster, cheaper model like Haiku.

The built-in subagents

You get three without configuring anything:

  • Explore — searches and understands a codebase without making changes, at a quick / medium / very thorough level. Keeps research out of your main context.
  • Plan — planning work.
  • General-purpose — tasks needing both exploration and modification, complex reasoning, or multiple dependent steps.

Explore and Plan deliberately skip your CLAUDE.md and the parent git status to stay fast and cheap; the others load both.

Create a custom subagent

A subagent is a Markdown file with YAML frontmatter in .claude/agents/ (project, checked into git for the team) or ~/.claude/agents/ (personal, all your projects). Minimal example:

---
name: code-reviewer
description: Reviews code for quality and best practices. Use after writing or changing code.
tools: Read, Grep, Glob, Bash
model: claude-haiku-4-5
---

You are a senior code reviewer. Check for correctness, error handling,
security, and test coverage. Report findings ranked by severity — don't
rewrite the code, just review it.

Key fields:

  • description — Claude reads this to decide when to delegate, so make it specific ("Use after writing code," not just "reviews code").
  • tools — restrict what the subagent can touch (omit to inherit). Supports MCP patterns like mcp__github__*.
  • model / effort — route to a cheaper model or set effort (lowmax) independent of your session.

The fastest path is the /agents command — a UI with a Running tab (see and stop live subagents) and a Library tab (create/manage). Agents made in /agents take effect immediately; files edited on disk load on the next session start.

Scopes, in precedence order: managed (org admins) → project .claude/agents/ → user ~/.claude/agents/ → plugin subagents (which appear as plugin:name). Plugin subagents can't use hooks/mcpServers/permissionMode for security.

Useful patterns

  • Specific over generalist. A subagent scoped to one job beats a vague "QA agent." Give it the exact task and the tools it needs.
  • Fresh-context review. After implementing, delegate the review to a subagent that didn't write the code — it doesn't carry the writer's assumptions, so it catches more.
  • Cheap exploration. Point your Explore-style or research subagents at Haiku via the model field; keep Opus for the main thread.
  • Parallel research. Ask Claude to "research the auth, database, and API modules in parallel using separate subagents" — each works in isolation and returns a summary.
  • Know the kill switch. Ctrl+X Ctrl+K (twice in 3 seconds) stops background subagents in the session.

When to go beyond subagents

  • Background agents (docs) — when you want several independent sessions running at once and a single place to watch them. Think multiple separate tasks, not one task split up.
  • Agent teams (docs) — when sessions need to talk to each other rather than just report up to a parent. You can even reference your existing subagent definitions when spawning teammates. It's the heaviest tier — reach for it on genuinely collaborative multi-session work, not routine tasks.

Honest guidance: most solo and small-team work is well-served by subagents alone. Background agents and teams add real coordination power and real token cost — use them when the work is genuinely parallel or collaborative, not by default.

Ready-made subagent libraries

Don't write every role from scratch:

Read the definitions before you install them — a subagent's tools and system prompt are code you're trusting.

Trade-offs to keep in mind

  • Token cost scales with agents. One subagent is nearly free relative to the context it saves; a fleet of background agents or a team is not. Match the tier to the ROI.
  • Subagents load at session start. Edit a file on disk → restart (or use /agents, which is immediate).
  • Description quality is everything. Vague descriptions cause Claude to delegate to the wrong subagent — or not at all.

Go deeper

FAQ

Subagents vs background agents vs agent teams? Subagents = isolated worker in your session (reports up). Background agents = many independent parallel sessions you monitor. Agent teams = peer sessions that communicate.

How do I create one? A Markdown file with YAML frontmatter in .claude/agents/, or use the /agents command. Set name, a specific description, optional tools/model.

Cheaper model for a subagent? Yes — set model in its frontmatter (e.g. Haiku) while the main session stays on Opus.

What are the built-ins? Explore (read-only codebase search, quick/medium/very-thorough), Plan, and general-purpose.

Get your SaaS in front of founders

List your product on the SaaSCity live city map — a permanent listing, real discovery, and a backlink from a high-DR directory. Free to start; upgrade for a dofollow link and a building on the map.