Features

Subagents

Learn how Bob uses subagents to handle focused, self-contained tasks in isolated contexts without polluting the main conversation.

What are subagents?

A subagent is an independent agent that Bob can spawn to handle a focused, self-contained task. It runs in its own isolated context window, executes its assigned work, and returns a summary of the results back to the main conversation.

Subagents are useful for work that would otherwise add large amounts of irrelevant content to the ongoing conversation—for example, deeply exploring a section of a codebase to gather specific information before Bob continues with the main task.

How subagents work

When Bob spawns a subagent:

  1. A new, independent agent is created with its own context window.
  2. Bob passes it a description of the focused task to perform.
  3. You are prompted to approve the spawn before it starts. Bob waits until you confirm.
  4. The subagent executes the task using its available tools.
  5. The subagent returns a summary of its findings back to Bob.
  6. Bob uses that summary to continue the main conversation.

The subagent runs separately from the main conversation. It does not share state, files, or tool results with Bob unless Bob explicitly passes them in the description.

Subagent types

There are two subagent types, each suited to different tasks:

TypeDescriptionBest for
exploreRead-only codebase exploration, runs on a lighter modelSearching and summarizing code, finding relevant files, understanding structure
generalFull tool access, runs on the default modelAny self-contained task requiring reads, writes, or commands

Context and conversation history

By default, a subagent does not see the parent conversation history. This keeps its context lean and focused on the task at hand.

When a subagent needs to understand prior decisions, constraints, or preferences expressed earlier in the conversation, Bob can set fork_context: true to pass the conversation history into the subagent.

Mode restrictions

The mode you are working in controls which subagent types Bob is permitted to spawn. Some modes allow all subagent types; others restrict spawning to specific types or disallow it entirely. If a subagent spawn is not permitted by the active mode, Bob will complete the work directly without spawning.

When Bob uses subagents

Bob uses subagents sparingly. The default is always to do the work directly without spawning a subagent. A subagent is only considered when all of the following are true:

  • The task is clearly self-contained and only a summary is needed back.
  • It would add significant irrelevant content to the main context.
  • It cannot be accomplished with one or two direct tool calls.

Bob does not use subagents for:

  • Simple file reads or quick searches.
  • Single-tool operations.
  • Tasks where the relevant context is already available.

Subagents vs. subtasks

Subagents and subtasks are related but distinct concepts:

SubagentSubtask
VisibilityRuns silently in the backgroundAppears in the UI with its own breadcrumb and conversation
InteractionNot interactive—returns only a summaryFully interactive—you can follow progress and continue the conversation
PurposeGather information or complete isolated work without polluting main contextHandle work complex enough to benefit from dedicated tracking and a separate thread
OutputSummary returned to BobIndependent conversation thread

Use subagents for background information-gathering. Use subtasks for complex work that benefits from visibility and a dedicated conversation.

How is this topic?