- In short
- The Explore subagent is a Claude Code worker that performs file discovery and codebase search in its own separate context window, then returns a concise summary to the main conversation. It exists so that verbose search output never floods, and exhausts, the context you are actually working in.
What the Claude Code explore subagent is
The Claude Code explore subagent is a specialised worker you delegate codebase discovery to. Instead of having the main agent read dozens of files and run a dozen searches directly in your conversation, you ask a subagent to do that investigation. It runs in its own context window, gathers what it needs, and returns a distilled summary to the parent session. The official documentation frames the purpose plainly: use a subagent "when a side task would flood your main conversation with search results, logs, or file contents you won't reference again."
That framing points at the real resource being managed, which is context. Claude's context window holds the entire conversation, every message, every file read, every command output, and a single codebase exploration can consume tens of thousands of tokens. Worse, model performance degrades as the window fills: Claude starts to forget earlier instructions and make more mistakes. The explore subagent is the mechanism that lets you investigate thoroughly without paying that price in your working context.
- Explore subagent
- A Claude Code subagent that performs file discovery and codebase search in an isolated context window and returns a summary, so the noise of investigation never accumulates in the main conversation.
How context isolation actually works
The key property is that each subagent runs in a separate context window with its own system prompt and tool access. When the explore subagent reads twenty files to answer a question, all twenty file contents land in the subagent's context, not yours. When it finishes, it reports back a summary, the answer you wanted, stripped of the raw material it had to wade through to get there. Your main conversation grows by a paragraph instead of by twenty files.
This is a different lever from the summarisation techniques in Domain 5. Compaction and summary injection reduce a context that has already grown; the explore subagent prevents the growth in the first place by keeping the bulk in a window you will discard. Both have their place, and the subagent delegation for investigation knowledge point develops the same idea from the context-management side. Here, the exam cares that you recognise delegation as the proactive defence.
Why this matters for the Claude Certified Architect exam
This knowledge point is set at the apply level, which means the exam expects you to use the idea in a scenario rather than merely define it. The typical setup is a multi-phase task, explore, then plan, then implement, where the danger is that an undisciplined discovery phase eats so much context that the implementation phase inherits a degraded, half-forgotten conversation. The architect who delegates discovery to the explore subagent arrives at implementation with a clean context and an accurate summary, which is exactly the outcome the task statement rewards.
Scenario 2 (Code Generation) and Scenario 4 (Developer Productivity) frame these questions. They lean on a principle stated throughout the best-practices guide: context is the fundamental constraint, and subagents are one of the most powerful tools for protecting it. Recognising when an investigation is large enough to wall off is the judgement being assessed.
Applying it during multi-phase work
The decision rule is practical: when an investigation will generate output you do not need to keep, long file dumps, exhaustive search results, exploratory tool calls, push it into a subagent. When the findings themselves are short and you will reason over them repeatedly, keeping them inline is fine. The explore subagent shines precisely in the first case, where the ratio of noise to signal is high and the signal is a summary.
You invoke it by telling Claude to delegate, with prompts like "use a subagent to investigate how our authentication system handles token refresh." The subagent explores, reads the relevant files, and reports back, all without cluttering your main conversation. During a long build this is the difference between an implementation phase that remembers the original requirements and one that has paged them out under a flood of search results.
Worked example
An engineer is midway through a three-phase feature: understand the existing payments flow, design the change, then implement it. The payments code is spread across many modules.
Phase one is discovery, and it is voluminous. Tracing the payments flow means reading the gateway adapter, three service classes, a webhook handler, and a pile of configuration. If the main agent does this inline, the conversation balloons with file contents the engineer will glance at once and never reread. By the time design and implementation arrive, the original feature requirements are buried thousands of tokens back, and the model's grip on them has loosened.
So the engineer delegates: "use the explore subagent to map how a payment flows from the API call through to the gateway, and summarise the modules involved and where state is persisted." The subagent reads everything in its own window and returns a tight summary, the call path, the four modules that matter, and the two places state is written. That summary, perhaps three hundred words, is all that enters the main conversation.
Now phase two starts from a clean context: the requirements are still near the top, the discovery is condensed into a usable map, and there is ample budget left for design and implementation. The engineer applied the explore subagent not as a search convenience but as a deliberate context-management move, which is exactly what the apply-level exam item is checking for.
How discovery delegation is invoked and selected
There are two ways the explore subagent gets used, and the exam can test the distinction. The first is automatic: when a subagent is defined, Claude chooses whether to invoke it based on its description field, matching the task at hand against what the subagent advertises it is good for. A vague description makes that routing unreliable, so a subagent meant for codebase discovery should describe exactly that. The second is explicit: you name the agent in your prompt, for example "use the explore subagent to trace how token refresh works," which forces that subagent to run regardless of the automatic routing.
Where the subagent is defined depends on how you run Claude Code. In filesystem-based usage, custom subagents are Markdown files placed under .claude/agents/, each carrying a description plus its own instructions and tool access. In the Agent SDK, subagents are supplied programmatically through the agents parameter of the query() options rather than as files. Either way the defining property is the same: a separate agent with its own context window and a description that governs when it runs.
For discovery specifically, the practical takeaway is that you do not have to hand-build an explorer to get the context-isolation benefit. Naming a subagent in the prompt is enough to wall off a heavy investigation, and a well-described custom agent lets Claude reach for it automatically whenever a task looks like discovery. Whichever mechanism you choose, automatic by description or explicit by name, the core guarantee is unchanged: the verbose reads stay in the subagent's window and only the summary returns.
Common misreadings to avoid
Two misconceptions tend to surface around subagent delegation.
Misconception
Delegating discovery to the explore subagent is mainly about speed, running searches in parallel to finish faster.
What's actually true
Misconception
Whatever the explore subagent reads is added to my main conversation so I can refer back to it later.
What's actually true
Why context is the constraint everything else serves
To use the explore subagent well you have to internalise why context matters so much, because that reasoning is what the exam wants you to reproduce. Claude's context window holds the entire conversation: every message you send, every file Claude reads, and every command output it sees. A single debugging session or codebase exploration can generate and consume tens of thousands of tokens, and the window is finite. More importantly, model performance does not stay flat as the window fills, it degrades. As context approaches its limit, Claude begins to lose its grip on earlier instructions and makes more mistakes, which on a long task means quality falls exactly when you can least afford it.
Seen through that lens, the explore subagent is not a search convenience but a context-budgeting tool. Every file the subagent reads in its own window is a file that did not consume your main budget, and the summary it returns is a high-density replacement for a low-density flood of raw output. The skill the apply-level item rewards is treating your context as a scarce resource and spending it deliberately, reaching for delegation the moment an investigation threatens to crowd out the work that depends on it.
How the explore subagent fits among the other context tools
The explore subagent is one lever among several, and knowing where it sits keeps you from misapplying it. Clearing context between unrelated tasks and compacting a conversation when it grows long both act after the fact: they shrink a context that has already filled. The explore subagent acts before the fact, preventing a class of growth from ever reaching the main window. The approaches are complementary, and a well-run multi-phase session uses both, delegating heavy discovery to subagents and clearing or compacting between phases that have nothing to share.
There is also a failure mode the subagent guards against directly. An open-ended request to investigate, with no scope, can send an agent reading file after file and packing the window with material no one will revisit. Scoping the investigation narrowly is one fix; routing it through a subagent is the other, and the two combine well. Tell the subagent specifically what to find, such as how token refresh works or where a setting is read, and it returns a focused summary instead of an exhaustive dump, keeping both its own work and your main conversation tight.
The practical tell that you should have delegated is realising, mid-task, that you can no longer see the original requirements without scrolling far up, or that Claude has begun re-asking questions you answered early in the session. By the time those symptoms appear, the main context is already crowded and performance is already slipping. The discipline this knowledge point builds is to anticipate that moment rather than react to it: when you can see that an investigation will be voluminous, you delegate the heavy reading before it arrives, so the discovery never has to compete with the requirements for the same finite space. Used that way, the explore subagent is a context decision made in advance, not a rescue attempted once the window is already full.
How this is tested on the exam
Expect a scenario in which a verbose investigation threatens a long-running, multi-phase Claude Code session. The wrong answers usually run the discovery in the main conversation and then act surprised when the context window is exhausted or the model loses earlier instructions. The right answer routes the discovery through the explore subagent so the main context is preserved for the work that depends on it. This concept requires plan mode use cases as a foundation and unlocks codebase exploration before planning, where exploration and planning are sequenced deliberately. The connective tissue is always the same: context is finite, and the explore subagent is how you spend it wisely.
During a large refactor, an engineer needs to trace how configuration loads across roughly forty files before designing the change. They want the design phase to begin with the original requirements still intact and plenty of context budget remaining. What should they do?
People also ask
What does the Explore subagent do in Claude Code?
How do subagents preserve context in Claude Code?
When should I delegate discovery to a subagent?
Watch and learn
Official Anthropic Academy lessons first, then hand-picked walkthroughs. Videos load only when you press play.
How to Use Subagents in Claude Code
Why watch: Walks through how Claude Code subagents (including the built-in Explore agent) run in isolated context windows and return only summaries, the core mechanism this KP tests.
More videos for this concept
References & primary sources
Master this concept with Archie
Practice it inside an adaptive study session. Archie, your Socratic AI tutor, tracks your mastery with Bayesian Knowledge Tracing and schedules the perfect next review.