Skip to content

Claude Code Built-in Subagents

Claude Code Built-in Subagents are specialized, autonomous processing units that operate in the background to handle specific tasks within the Claude Code environment^[001-TODO__Claude_Code_5种Agent模式_-从顺序流到自主工作流.md]. They function as distinct "modes" with separate context windows, allowing the main interface to remain responsive and focused while specialized work is performed concurrently^[001-TODO__Claude_Code_5种Agent模式-_从顺序流到自主工作流.md].

These subagents are automatically dispatched by Claude Code based on the nature of the user's request, requiring no manual configuration for basic operation^[001-TODO__Claude_Code_5种Agent模式_-_从顺序流到自主工作流.md].

Architecture

A key characteristic of the built-in subagents is their isolation from the main conversational context^[001-TODO__Claude_Code_5种Agent模式_-_从顺序流到自主工作流.md]. Each subagent possesses its own independent context window.

This architecture ensures that the heavy processing or information retrieval performed by a subagent does not pollute or consume the token limit of the active user chat^[001-TODO__Claude_Code_5种Agent模式_-_从顺序流到自主工作流.md].

Types of Built-in Subagents

Claude Code includes three primary subagents, each optimized for different tasks and model tiers^[001-TODO__Claude_Code_5种Agent模式_-_从顺序流到自主工作流.md].

Explore

  • Model: Claude Haiku^[001-TODO__Claude_Code_5种Agent模式_-_从顺序流到自主工作流.md]
  • Capability: Read-only operations. It is designed for high-speed, cost-efficient searching of files and viewing directory structures^[001-TODO__Claude_Code_5种Agent模式_-_从顺序流到自主工作流.md].
  • Trigger: Automatically invoked by Claude when it determines that file system navigation or searching is required^[001-TODO__Claude_Code_5种Agent模式_-_从顺序流到自主工作流.md].

Plan

  • Model: Claude Haiku^[001-TODO__Claude_Code_5种Agent模式_-_从顺序流到自主工作流.md]
  • Capability: Read-only analysis. It is used to study the codebase structure, often utilized when entering "plan mode" to map out a strategy before execution^[001-TODO__Claude_Code_5种Agent模式_-_从顺序流到自主工作流.md].
  • Trigger: Activated via the /plan command or by pressing Shift+Tab twice^[001-TODO__Claude_Code_5种Agent模式_-_从顺序流到自主工作流.md].

General Purpose

  • Model: Claude Sonnet^[001-TODO__Claude_Code_5种Agent模式_-_从顺序流到自主工作流.md]
  • Capability: Full read-write access. This subagent handles complex, multi-step tasks that require creating, modifying, or deleting code^[001-TODO__Claude_Code_5种Agent模式_-_从顺序流到自主工作流.md].
  • Trigger: Automatically dispatched when Claude judges a task to be too complex for the read-only subagents^[001-TODO__Claude_Code_5种Agent模式_-_从顺序流到自主工作流.md].
  • Claude Code Agent Patterns: Overview of the 5 architectural patterns (Sequential, Operator, Split & Merge, Agent Teams, Headless) that utilize these subagents.
  • [[Context Window]]: Technical constraint that subagents help manage.

Sources

  • 001-TODO__Claude_Code_5种Agent模式_-_从顺序流到自主工作流.md