In the previous lesson, you learned how to provide Claude with persistent context about your projects using configuration files. Now that Claude has context about your project, it can make intelligent decisions about how to handle different types of tasks. When you ask Claude to search through a large codebase, analyze build performance, or research best practices, it doesn't always handle these tasks directly in your main conversation. Instead, Claude automatically delegates certain tasks to specialized workers called subagents—similar to how a general contractor calls in specialists like electricians or plumbers for specific jobs.
In this lesson, you'll learn what subagents are and when Claude invokes them automatically. By the end, you'll recognize subagent activity in your terminal output and understand how to interpret the results they provide.
A subagent is a specialized helper that Claude calls in for specific jobs. You never need to ask for a subagent explicitly—Claude decides automatically whether to handle work directly or delegate it.
Claude has three types of built-in specialists:
Explore subagent - Uses the Haiku model to quickly find things in code. Limited to three tools: Read, Glob, and Grep.
General-purpose subagent - Uses the Sonnet model to analyze and reason about complex problems. Has access to all available tools. Appears as Task in terminal output.
Plan subagent - Specializes in research-oriented tasks and inherits your conversation's model. We'll focus mainly on Explore and general-purpose in this lesson.
The Explore subagent answers one question efficiently: Where is something in this codebase? When you ask Claude to locate files, find function definitions, or identify where patterns appear, Claude delegates to an Explore subagent using the Haiku model optimized for speed.
What makes Explore fast is its focused toolset of only three tools: Read, Glob, and Grep. This keeps it focused on searching rather than complex analysis.
When you ask Claude to explain how the plugin system works in Docusaurus:
Claude recognizes this as a search task and invokes an Explore subagent. Your terminal shows:
The metrics reveal the search scope: 28 tool uses shows many files examined, shows substantial processing, and indicates a thorough search. The finds locations and reports organized findings without deep evaluation—ideal for "Where is this?" questions.
Some tasks require deeper reasoning. When you ask Claude to evaluate performance, identify issues, or explain how parts interact, Claude delegates to a general-purpose subagent using the Sonnet model with access to all permitted tools. This appears as Task in your terminal.
When you ask Claude to locate all deprecated APIs:
The words locate and identify signal you want understanding, not just locations. Your terminal shows:
This required reading multiple files, understanding deprecations, identifying replacements, and synthesizing findings by priority. The Explore subagent couldn't perform this level of interpretation.
Each subagent operates in its own context window—a separate working memory from your main conversation. This isolation prevents your chat from filling with low-level search results, file contents, and intermediate steps.
When a subagent completes its task, it sends back a concise, well-organized summary rather than its entire working memory. This keeps your conversation focused on high-level goals while subagents handle implementation details in their isolated contexts.
Every subagent delegation involves these events in order:
- Delegation Decision: Claude determines a task needs specialized handling
- Tool Call: Claude invokes a specific subagent type with parameters
- Isolated Execution: The subagent runs in its own context using permitted tools
- Result Synthesis: The subagent compiles findings into a structured summary
- Result Return: The summary appears in your main conversation
How to Recognize Delegation:
Look for these patterns regardless of specific formatting:
- Explicit mention: Claude states it's using a specialist
- Structured findings: Results are organized systematically
- Scope indicators: Metrics showing files examined, tokens processed, time elapsed
- Context preservation: Your main conversation stays clean
Don't rely on specific symbols, phrasing, or formatting—these may change. Focus on recognizing that delegation, execution, and result return occurred.
Claude uses subagents to handle tasks automatically. Explore subagents search using Haiku with limited tools. General-purpose subagents (shown as Task) analyze using Sonnet with full tool access. Each operates in an isolated context window, returning only organized summaries to your main conversation.
You learned to recognize subagent activity by understanding what actually happens—delegation decision, task execution, result synthesis, result return—rather than memorizing specific visual markers.
In the upcoming practice exercises, you'll work with subagents hands-on on CodeSignal, where the environment comes pre-configured with access to these built-in subagents.
