Investigate with a subagent
Explore a subsystem without bloating your main context.
Official basis Delegate research to subagents to keep the main context focused. docs ↗
The prompt
Use a subagent to investigate how <system or flow> works across the codebase and report back a concise summary. Don't change anything yet — just map it out. Why it works
A subagent burns through files in its own context and returns just the summary, so your main session stays lean and on-task. The docs call this out for both investigation and post-implementation verification.
Fill in
<system or flow>— the area to map (auth, caching, a data pipeline).
Follow-ups
- “Based on that map, propose where the bug most likely is.”