Course contentModule 1 · Lesson 1
Module 1 · Lesson 1
What a Subagent Really Is
You learn what sets a subagent apart from your normal chat, and understand why its fresh context window saves you tokens.
MODULE 1 / SUBAGENTS
What we are talking about here
At its core, a subagent is a second Claude that your main chat sends off for a single task and that then disappears again. That sounds like a technical detail, but it is the foundation for everything that follows in this course. As soon as a task grows and your main chat starts to fill up, the subagent is your first tool against that. Before you build one yourself in the next lesson, let's take a close look at what happens in its head when it gets going, and what sets it apart from simply asking a follow-up question in your own chat.
A fresh window, no view into your conversation
Every AI model works with a context window, meaning the limited amount of text it can keep in view at any one moment. Your main chat gathers everything into it over time: your questions, the answers, every file that gets read. The longer the session runs, the fuller this window gets.
A subagent, by contrast, gets a completely empty context window. It does not see your chat history so far, it does not see any of the files your main chat read earlier, and it does not know the main chat's system instructions either. The only connection between your main chat and it is a single piece of text: the prompt it receives when it starts. Picture it like a colleague you send into an archive with a note. They get exactly what is written on the note, but they do not overhear what the two of you talked about back in the office beforehand.
That said, it does not stand there with zero knowledge of your project: just like your main chat, it also automatically loads your project's CLAUDE.md when it starts, meaning the file with your project-specific instructions. That has nothing to do with a connection to your conversation so far, though; it happens independently of it. What is missing is the conversation history itself.
What comes back: the summary, not the path there
This exact empty window is why subagents save you tokens, meaning the small units of text that an AI model processes and that ultimately determine the bill. If you have a subagent read ten files to answer a question, your main chat does not see each one of those ten read operations. It only sees the result: the finished summary that the subagent returns at the end. Ten read operations inside the subagent become a single summary in your main context.
Let's stay with the archive picture. Your colleague flips through ten binders there, but they do not bring you a copy of every binder. They bring you one page of summary. Your own desk, meaning your main context, stays free of the ten binders and only carries the one page.
The difference from a normal session
The difference from your usual chat is now clearly outlined. In your main chat, you build up a shared memory over time: everything you ask and everything that comes back stays in the same window and shapes how the model phrases its next answer. A subagent does not know this memory. It only lives within the current session, does its one job, and is then done. If you call the same subagent type again right after, it starts completely fresh once more, with no memory of its own last run.
Note: What comes next
In the next lesson you will create your first subagent as a file yourself and see exactly how you hand it its assignment and its permissions.
Is a subagent worth it for your task?
Not every task needs a subagent. Before you build one in the next lesson, honestly check whether your current task even benefits from it.
I am checking whether a subagent is worth it for a subtask.
Ask me these four questions one at a time and summarize at the end:
1. Can the subtask be clearly separated from my main task?
2. Would this subtask need a lot of reading work whose details
do not interest me in my main chat at all, only the result?
3. Is a single, clearly written assignment enough for the subagent,
without me having to constantly steer it?
4. Is the result valuable enough to justify its own file and its
own call?
Three or more yes: a subagent is probably worth it.
Fewer: just do it directly in your main chat.
The honest takeaway
A subagent is not a replacement for you, but a second, clean context window for a bounded piece of work. For a quick follow-up question, or for something that runs alongside in your main chat anyway, the detour through its own file and its own call is not worth it. For a task that needs a lot of reading work whose details do not interest you at all, though, it is exactly the right tool. In the next lesson you will build your first subagent and also see the pitfall that almost everyone overlooks the first time: what happens when you give it no permissions at all, instead of too few.
Knowledge Check