Decoding Claude: E04 - Rent a Conference Room

Share
Decoding Claude: E04 - Rent a Conference Room

Dwight is going through a regular working day as a salesperson at Dunder Mifflin when he is suddenly tasked to select a new healthcare plan for the office. He does not spread all the plan documents across his own desk. He chooses to use the conference room as a "Temporary Workspace" to do this unexpected new task. When he is done with it, the conference room gets vacated. His desk never gets disrupted. His recommendation is the only thing that travels back.

An AI agent works the same way.

When an AI agent (let's call it "Parent agent") is working on a series of tasks, it frequently needs to search for pieces of information mid-task. It could be a new google search that leads it to a Wikipedia article for a tiny piece of data. Let's say that the relevant data is just 10 tokens and the complete Wikipedia article is 1000 tokens. The complete article is a waste of space and attention sitting inside the context of the Parent agent.

So we create a harness that enables the Parent agent to spawn a "Subagent". It is a new agent tasked to do the google search, find the Wikipedia article and get back with the answer. The Subagent is sent to an empty Conference room where it can do its research. Once its work is done, it provides the answer to the Parent agent and discards all the irrelevant tokens inside that room. In this way the Parent agent does not need to do the task itself and pollute its own context window.

Up until now, every conversation started from scratch. You had to tell it what to do, how to do it, which tools to use. Skills change that. You write the steps once, save them in a file, share them across your team. And the agent decides for itself when to use them. Next episode we look at how that works.


Next: Decoding Claude E05 - The Playbook

New here? Start with Decoding Claude: How Agentic AI Actually Works — where the series began.


Source: S04 Subagent, learn-claude-code by shareAI-lab.