SUBAGENTS
Delegate research to keep the main context clean.
A subagent is a parallel Claude with its own scope. It does the search (grep, read, web fetch) and comes back with a short report. Your main context does not get clogged with tool results.
Typical cases: exploring a big folder, reading a huge PR, doing code review as an independent second opinion.
Brief it like a colleague who just walked into the room. No assumptions.
In practice
// Via SDK / API:
Agent({
subagent_type: "Explore",
description: "Find auth callers",
prompt: "Find every file importing useAuth or getAuthUser. List path:line. Under 100 words."
})
// In the CLI: > use the Explore agent to map who calls useAuthThis practice is part of Claude Code OS, the full blueprint of the practices that separate following a tutorial from actually working with Claude. Ler em português.