Anthropic's developer tool Claude Code has introduced a feature that makes traditional pair programming look outdated. Instead of one AI doing everything, you can now assemble an entire team of specialized agents — one checking security, one writing tests, one ensuring code follows the style guide. They work while you sleep. And the bill can be staggering.


What exactly is a subagent?

A subagent in Claude Code is not just a fancy name for a chatbot with a different system message. It is a self-contained assistant with its own context window, its own tool permissions, and its own defined role — completely isolated from the other agents in the workflow.

Think of it this way: a code reviewer does not need to know anything about the design discussion you had two hours ago. That is just noise. Context separation is a core premise of the entire architecture, according to Anthropic's official documentation.

Subagents are defined as Markdown files with YAML frontmatter inside the .claude/agents/ folder in your project. There you set the name, description, which tools the agent has access to, and what it is actually supposed to do.


Claude Code Subagents: Specialized AI Colleagues You Can Call Anytime - Bilde 1

How the main agent types compare

TypeArchitectureCoordinationStabilityCost
SubagentsParent-child hierarchySingle sessionStable~7x tokens
Agent TeamsPeer-to-peerIndependent sessionsExperimentalHigher
Built-in: ExploreRead-only searchHaiku modelStableLow
Built-in: PlanResearch-focusedSingle sessionStableMedium
Built-in: GeneralFull accessSingle sessionStableMedium/High


The three built-in agents

Claude Code ships with three ready-made subagents out of the box, according to Anthropic's documentation:

Explore is designed for fast codebase searches and runs on the Haiku model to keep speed up. It has read-only access — it cannot change anything.

Plan is a research agent that helps you structure work before you begin implementation.

General-purpose is the most powerful of the three, with full tool access and support for complex multi-step tasks.


> "Subagents should be boring and specific. Don't build a vague 'senior engineer' persona — build a 'code reviewer that only looks at Python security'."

> — Best practice from Anthropic documentation


Agent Teams: the big experiment

In February 2026, Anthropic released what is likely the most ambitious feature in Claude Code to date: Agent Teams, available as a research preview for Opus 4.6 and later (version 2.1.32, released February 5, 2026).

Where subagents follow a parent-child hierarchy within a single session, Agent Teams operate as peers across separate sessions. They communicate via a built-in messaging system — something like an internal mail system between AI instances — and can coordinate parallel work without routing through a parent process.

Sitepoint and nxcode.io describe the architecture as a peer-to-peer network where each message between agents constitutes a separate API request. That means coordination costs climb quickly.


KEYFIGURE

Key metricValue
Token consumption, subagent-heavy workflows~7x more than single-thread
Anthropic internal code review coverage, before16%
Anthropic internal code review coverage, after54%
Claude Code plugins as of February 20269,000+


Claude Code Review: proof in the numbers

On March 9, 2026, Anthropic launched Claude Code Review — a multi-agent system for automated pull request analysis. According to lushbinary.com, Anthropic's internal code review coverage jumped from 16% to 54% after the system was deployed internally.

The system uses five specialized agents:

  • Correctness Agent hunts for logic errors
  • Security Agent looks for vulnerabilities
  • Performance Agent evaluates execution speed
  • Style & Consistency Agent checks style guide compliance
  • Test Coverage Agent evaluates test completeness

None of them need to know what the others found. That is the point.


Hooks and Skills: automation under the hood

The subagent architecture becomes even more powerful when combined with two additional features: Hooks and Skills.

Hooks are event-driven automations that can be triggered at five points in the workflow: PreToolUse, PostToolUse, Notification, UserPromptSubmit, and Stop. A practical example from Anthropic's official hook documentation: a hook can automatically block attempts to force-push to the main branch, or run a formatter on files immediately after they are modified.

Skills are defined in SKILL.md files with YAML frontmatter and activate automatically based on context. As of February 2026, there are more than 9,000 plugins in the Claude Code ecosystem, according to developersdigest.tech.


FACTBOX: How permissions are set up

The principle is least privilege:

  • Documentation agent: Read + Edit on Markdown files. Nothing more.
  • Deploy agent: Shell access. No access to secrets.
  • Security agent: Read code, report findings. Cannot modify anything.

Permissions are configured in YAML frontmatter in the agent file. Incorrect permission setup is one of the most common mistakes new users make, according to nimbalyst.com.


Agent View: the control center for background sessions

With the claude agents command, you get access to Agent View — a control center where you can monitor and manage all active background sessions. Sessions survive terminal closure, meaning agents can keep working while you do something else entirely.

This is particularly useful for long-running tasks such as refactoring large codebases or reviewing many pull requests in parallel.


What will it cost you?

Here comes the uncomfortable truth. According to nimbalyst.com, subagent-heavy workflows consume an estimated seven times as many tokens as a standard single-threaded session. Agent Teams cost even more, since each message between agents constitutes an independent API request.

Cloudzero — the first cost platform with integration into Anthropic's Usage and Cost Admin API — warns that token costs can escalate surprisingly fast in multi-agent setups.

Expert consensus: most tasks do not need five agents. Start with one, add another only when it delivers real value.


Pitfalls to avoid

Based on combined documentation from Anthropic, nimbalyst.com, and developersdigest.tech, these are the most common mistakes:

  • Over-engineering — five agents for a task one agent would handle equally well
  • Vague personas — "senior engineer" is useless; "Python security reviewer" is useful
  • Agent Teams in production — still experimental, stability is not guaranteed
  • Forgotten merge conflicts — parallel agents can write to the same files
  • No cost monitoring — without tracking, the token bill can explode

  • BOTTOM LINE

    Claude Code subagents are a genuinely powerful tool for development teams that want to automate repetitive quality checks, parallelize PR reviews, and keep context clean. The numbers from Anthropic's own internal use — from 16% to 54% code review coverage — are impressive. But the architecture demands discipline: keep agents specific, keep permissions minimal, and keep an eye on token costs. Agent Teams are promising, but still experimental. Use them for what they are: a preview, not a production-ready solution.

    Verified against 7 open primary sources.