Terug naar podcastsClaude
Claude Code subagents
Wat zijn subagenten?
Sub-agents are specialized assistants that Claude can delegate tasks to.
Subagents zijn gespecialiseerde assistenten waaraan Claude taken kan delegeren.
Each sub-agent runs in its own conversation contacts window with a custom system prompt that you define.
Elke subagent draait in zijn eigen contextvenster met een aangepaste system prompt die u instelt.
When finished, it returns a summary to the main thread while all the intermediate work stays isolated.
Na afloop stuurt hij een samenvatting terug naar de hoofdthread, terwijl al het tussenliggende werk geïsoleerd blijft.
One of the main advantages of sub-agents is that they help manage context window usage.
Een van de belangrijkste voordelen van subagents is dat ze helpen het gebruik van het contextvenster te beheren.
When you chat with Claude Code, you're adding context to the main context window.
Wanneer u chat met Claude Code, voegt u context toe aan het hoofdcontextvenster.
Every tool call and its results get stored in this main context window.
Elke toolaanroep en de bijbehorende resultaten worden opgeslagen in dat hoofdcontextvenster.
And so, when Claude uses a sub-agent, a separate window starts.
Wanneer Claude een subagent gebruikt, start er een apart venster.
The sub-agent receives two inputs, a custom system prompt from your configuration file, and a task description written by the parent or parent agent based on what you ask for.
De subagent ontvangt twee invoerwaarden: een aangepaste system prompt uit uw configuratiebestand en een taakomschrijving die de bovenliggende agent heeft geschreven op basis van wat u vraagt.
The sub-agent then works autonomously.
De subagent werkt vervolgens autonoom.
When it reads files, edits files, or uses tools, none of these will appear in the main conversation.
Wanneer hij bestanden leest, bewerkt of tools gebruikt, is dat niet zichtbaar in de hoofdconversatie.
Just a summary is returned back.
Alleen een samenvatting wordt teruggestuurd.
The entire sub-agent conversation then gets completely discarded.
De volledige subagentconversatie wordt daarna volledig weggegooid.
Consider a task like investigating how the payment system works in an unfamiliar code base.
Denk aan een taak als het onderzoeken hoe het betalingssysteem werkt in een onbekende codebase.
Maybe you're trying to use Claude Code to figure out which service handles refunds.
Misschien probeert u Claude Code te gebruiken om uit te zoeken welke service terugbetalingen verwerkt.
Well, without a sub-agent, Claude might read 15 files, run several searches, and trace through multiple function calls.
Zonder subagent zou Claude mogelijk 15 bestanden lezen, meerdere zoekopdrachten uitvoeren en meerdere functieaanroepen traceren.
All of that context fills your context window, even if you only needed one single fact, which service handles refunds.
Al die context vult uw contextvenster, ook al had u slechts één feit nodig: welke service terugbetalingen verwerkt.
With a sub-agent, you get the answer without the journey.
Met een subagent krijgt u het antwoord zonder de reis.
The sub-agent explores, discovers the answer, and returns a focused summary, keeping your main context clean.
De subagent verkent, ontdekt het antwoord en stuurt een gerichte samenvatting terug, zodat uw hoofdcontext schoon blijft.
But, the main window loses visibility into how the sub-agent reaches its conclusions and what it discovered along the way.
Maar het hoofdvenster verliest zicht op hoe de subagent zijn conclusies bereikt en wat hij onderweg ontdekt heeft.
Claude Code includes several built-in sub-agents that you can use immediately, like the general-purpose sub-agent, used for multi-step tasks that require both exploration and action.
Claude Code bevat verscheidene ingebouwde subagents die u direct kunt gebruiken, zoals de algemene subagent voor meerstappige taken die zowel verkenning als actie vereisen.
The explore sub-agent, used for fast searching of code bases.
De explore-subagent, voor snel zoeken in codebases.
The plan sub-agent, used during plan mode for research and analysis of your code base before presenting a plan.
De plan-subagent, die tijdens de planmodus onderzoek en analyse van uw codebase uitvoert voordat een plan wordt gepresenteerd.
And you can also create your own sub-agents with custom system prompts and tool access.
En u kunt ook uw eigen subagents maken met aangepaste system prompts en toegang tot tools.
Sub-agents like Claude Code break work into focused pieces, keep your main context window clean, and bring back just what you need, whether you're using the built-in ones or creating your own.
Subagents zoals Claude Code verdelen werk in gerichte stukken, houden uw hoofdcontextvenster schoon en brengen precies terug wat u nodig heeft, of u nu de ingebouwde subagents gebruikt of uw eigen maakt.
They're a practical way to get more out of longer Claude Code sessions.
Het is een praktische manier om meer uit langere Claude Code-sessies te halen.