Paths Subjects Questions Quizzes Pricing Search
Intermediate Open Free

Why a Subagent's Investigation Doesn't Bloat Your Session

You ask Claude Code to "use a subagent to investigate how our authentication system handles token refresh" instead of investigating directly yourself.

Why does this keep your main session's context small, even if the investigation reads dozens of files?

Solution

The correct answer is "It runs in its own context window and returns a summary."

A subagent (the Agent tool, formerly Task) is a separate execution with its own context window; all those file reads happen there, and only a condensed summary comes back into your main conversation. Files aren't deleted from disk as some side effect, tool calls inside a subagent are billed the same as anywhere else, and nothing limits the main session to seeing only "the first three" tool calls — the main session simply never sees the subagent's tool calls at all, only its final report.

Share this question

← Back to Claude Code Best Practices: Reliable, Cheap, High-Leverage Sessions practice

We use cookies for product analytics to improve OmniAtlas. See our Privacy Policy.