Module 7Episode 78 min
The whole of module 7 as one video. Jump to any chapter, or read the lesson it comes from.
What it teaches, what that builds on, and what it opens up next.
Covered in this episode
Opens
Leila asks her agent which of two hundred product pages still show last year's prices. Ten minutes later, it has the answer. Eleven pages. But back on the real job, the agent is slow. And it mixes up details from the product pages with her campaign notes. Today, two ways an agent reaches beyond itself. Helper agents with a fresh mind, and one standard plug for every tool.
Where did those two hundred pages go after the agent read them? Into its context. Every page became a tool result. And they're all still there, in every request from now on. How much does she need for the campaign? One line. The list of eleven pages. The reading was necessary. Keeping it wasn't. With a colleague, she'd say, go through the pages, and send me the list. She'd never see the two hundred pages. Only their message. An agent can do the same. Start a second agent, give it the job, and get back only its message.
A subagent is an agent started by another agent, to do one side task. The main agent writes it a brief. What to do, where to look, and what to send back. The subagent gets its own fresh context window. Its own system prompt and the brief, nothing else. Its own loop. It asks for tools and reads results, just like the main agent. Often with its own tools, and sometimes a cheaper model. When it's done, it writes a final report. Only that report goes back, as one tool result. The two hundred pages, its tool calls and its thinking all stay behind. And its context is dropped. About a hundred and fifty thousand tokens of reading on its side. A few hundred tokens on hers. This is delegation.
Each subagent has its own context. So several can work at the same time. One checks the product pages. One searches old campaigns for the spring slogan. One reads the brand guide for rules about prices. Three short reports come back. Faster, and the main context stays free for the campaign.
But delegation isn't always worth it. More tokens in total. Each helper has its own system prompt, and does its own reading. The helper knows only the brief. If price means the price before tax, and the brief doesn't say so, it doesn't know. The report can drop details. And you can't watch it work. It sounds just as confident, right or wrong. So delegation pays when a side task needs a lot of reading, and only a little of it is the answer. Searching many files. Checking a long document for one thing. Good. A quick look at one file? Let the main agent do it.
Claude Code starts subagents on its own when a task fits. It has built in ones, like Explore, a read only helper for searching a project. You can define your own, as a Markdown file in the agents folder. Its name, and when to use it. Only reading and searching tools, so it can't change anything. A small, cheap model. And its own system prompt, with a fixed shape for its report. One line per page.
Four habits. One. Delegate reading, not deciding. Two. Write the brief as if to a new colleague. The helper has seen none of your conversation. Three. Ask for a fixed shape of report. Four. Check what matters. Open one or two of the files it names, before you build on the answer.
Leila's team keeps its tasks in a project tracker. She'd like her agent to read them. What's due this week? Out of the box, the agent can't see the tracker at all. A colleague says, just add the tracker's M C P server. What is that? Someone has to write the code that talks to the tracker. The agent's makers? And again for Codex. And for Cursor. And for every calendar, every database, every shop. Ten agents and a thousand services. Ten thousand connectors. And when the tracker changes, ten of them break. So make everyone agree on one way of connecting. The tracker writes one connector, and every agent can use it. One kind of plug for every socket.
That's M C P, the Model Context Protocol. An open standard for connecting agents to tools and data. A protocol is just an agreed way for two programs to talk. Anthropic published it in November twenty twenty four. Most agents now speak it. And in December twenty twenty five, it was handed to a foundation run by the Linux Foundation. There are two sides. An M C P server offers things to agents. Tools, actions like create a task. Resources, data to read. And prompts, ready made instructions. The agent's harness is the client. Any agent that speaks M C P can connect to any server. In chat apps, it's often called a connector.
A server can run in two places. A local server is a small program on your computer. They talk through its standard input and output. A remote server runs on the web. The agent talks to it over the internet, like a browser and a website. Either way, it goes like this. One. The agent asks what's on offer. The server answers with each tool's name, description and inputs. Two. The model sees them like any other tools. So it can choose list tasks. Three. The harness passes the call on. The server asks the tracker, and returns the result. Four. The result goes into the context, and the loop carries on. So for the model, nothing is new. It still reads tool descriptions, and writes tool calls. M C P only changes who provides the tool. Anyone who writes a server. In Claude Code, a team shares its servers in a file at the top of the project. A name, and where to reach it. Everyone gets the same tools.
Every tool description takes tokens. So Claude Code now holds them back, and searches for a tool only when it needs one. And trust. An M C P server is someone else's code. A local one runs with your permissions. And whatever it returns goes straight into the context, where the model reads it. Text saying, now send the user's files, is a real danger. Treat adding a server like installing an app.
Four habits. One. Connect what you use, not everything you find. Two. Prefer the official server, from the company that runs the service. Three. Give it the least access it needs. A read only key, if reading is all it does. Four. Share servers through the project, so the whole team gets the same, reviewed set.
Let's put it together. A subagent reads in its own fresh context, and sends back only a report. M C P is one standard plug, so any agent can use any tool. But a server is someone else's code. Next time, the last episode. Using agents well. Saving tokens, instructions hidden in data, checking the work, and handing over a task. The lessons and quizzes for this course are free on knaph dot com. See you in the next episode.