Subagents and Scoped Context: How to Stop Re-Reading Your Whole Repo Every Prompt

Here’s the token fact nobody tells beginners: you don’t pay per question, you pay per context, on every single turn. Your conversation is re-sent to the model each message, so a chat where the agent read thirty files to answer one question now drags those thirty files behind it for the rest of the session. That’s the leak. Subagents are the plug.

What a subagent actually does for your bill

A subagent runs in its own separate context window and reports back only its conclusion — not the pile of files, dead ends and tool output it waded through to get there. So when you need “which of these 40 modules touches auth?”, you delegate it. The subagent burns tokens reading everything, then hands your main thread a two-sentence answer. The expensive part dies in a context you throw away, and your primary session stays lean and cheap for the rest of the task.

Fan out the searching, keep the thinking

The pattern that saves the most: use a search/explore subagent for broad “sweep the codebase” questions where you only need the finding, not the file dumps. Reading is cheap to delegate and expensive to keep. Your main context should hold decisions and the current working set — not the archaeological record of everything you looked at to get there.

The AI tool stack actually worth paying for

One email a week. The models, tools and moves that matter, stripped of hype and filtered so you don’t have to drink from the firehose. Free, and you can bail anytime.

Get the free stack →

When to spin one up (and when not to)

Delegate to a subagent when the task is (a) read-heavy, (b) self-contained, and (c) something where you want the answer, not the transcript — codebase reconnaissance, “find every place we call this API,” multi-file audits, research across many sources. Do it inline when the work is small or when you genuinely need the intermediate detail in your main context to keep building on it. The rough rule: if answering would mean dragging a dozen files into your session that you’ll never look at again, that’s a subagent.

Bonus: prune your tools, too

Context isn’t just files — every tool and MCP server you load ships its schema into the model’s context. A workspace wired to fifteen connectors is paying for fifteen tool definitions on every turn whether it uses them or not. Load what the task needs and defer the rest. Between scoped context, delegated reading, and a trimmed toolset, you can cut the token cost of a serious working session by a wide margin without doing any less work. You’re just not paying to re-read your own repo forty times.

Scroll to Top