Skip to content
AGENTIC_ENG
GARDEN // concept

Subagent context isolation

LAST_MODIFIED:
2026.06.30
CATEGORY:
concept

A subagent runs in its own separate context window and returns only a summary to the main agent. The heavy intermediate tokens — large file reads, MCP documentation, search output — never enter the parent conversation.

Why use it

Reading external docs (for example, an MCP server’s API reference) can consume tens of thousands of tokens. Done in the main window, that clutter persists for the rest of the session and crowds out the task (see lost in the middle). Done in a subagent, the parent receives only the distilled result.

When to reach for it

  • A task needs a large doc or many files read, but the main loop only needs the conclusion.
  • You are surveying or researching an area before editing — fan the lookup out, keep the answer.
  • Output would otherwise be verbose and stay irrelevant after the immediate question is answered.

This is one of the core moves of context engineering.

subagentsclaude-codecontextmcp

Related_Nodes