← back to notes
engineering

Subagents: Sending the Intern to Fetch Context

  • #engineering
  • #agents
  • #ai
  • #productivity

The fastest way to read 200 files is not to read them yourself.

Send someone else.

Actually, send three people.

Runners to different shops

Imagine you're cooking a big Dashain dinner.

You need meat from the butcher, vegetables from the market, and spices from the shop near the chowk.

You could go to all three yourself.

Two hours later, you're tired and the guests have arrived.

Or you send three cousins to three shops at the same time.

Twenty minutes later, everything is on the kitchen counter.

You never left the stove.

That's what subagents do.

Main agent vs subagents

The main agent is the one you're talking to.

It holds the big picture and makes the decisions.

Subagents are helpers it sends out for a specific errand:

  • "Find where authentication is handled."
  • "Check how other screens handle errors."
  • "Look up the latest docs for this library."

Each one comes back with a short report.

The main agent doesn't need to read everything.

It reads the reports.

Why this keeps quality high

Every AI has a limited working memory.

If the main agent reads 200 files itself, its "desk" gets crowded and it starts forgetting earlier details.

Subagents keep the desk clean.

Only the useful summary comes back.

Asking for it

Bad:
Read the whole codebase and add dark mode.
 
Good:
Before implementing, send helpers to find:
1. How theme colours are defined
2. Which components hard-code colours
3. How user settings are stored
Summarise what they find, then propose a plan
before writing any code.

"Propose a plan before writing any code" is my favourite line.

It gives me a chance to stop a bad idea early.

Final thoughts

Great chefs don't run to every shop.

They send the cousins and stay at the stove.

Subagents let your main AI do the same thing: stay focused on decisions while the errands happen in parallel.

So stop reading 200 files.

Send the runners.