Skip to main content

Toolkit

Agents & Subagents · Mental Model

On this page4 sections

Mental Model

A subagent is a delegated execution context with its own instructions, tools, model work, and result handoff. Isolation is its primary architectural value; parallelism is optional.

The Delegation Contract

Every child should receive:

  • A bounded objective.
  • The minimum required context.
  • Explicit file or system scope.
  • Allowed and prohibited actions.
  • A required result shape.
  • Verification and a stop condition.

The parent remains responsible for integrating the result and checking that the child's evidence supports its conclusion.

Product Realizations

Claude Code, Codex, and Copilot all document specialized subagents, but their definitions, model controls, tool policies, nesting, memory, and user interfaces differ. A portable role such as “security reviewer” should therefore be one behavioral contract plus product adapters, not one assumed configuration file.

Isolation Is Not Containment

An isolated Context windowThe model's working memory — a desk. Pile on too many papers and the earliest ones slide off the edge.Everything the model can see at once: your prompt, the conversation so far, attached files, and its own reply. Past the limit, earlier content is dropped — and nothing persists once the session ends.Full definition prevents conversational noise from returning automatically. It does not necessarily isolate filesystem writes, credentials, network access, or process state. Those require sandboxing, tool policy, worktrees, or separate environments.

Handoff Compression

Subagents protect the parent context only when they return a concise, structured result. Dumping full logs back into the parent recreates the context pollution the delegation was meant to prevent.

Source register

Agents & Subagents sources

Primary vendor documentation reviewed on the date shown. Links may change after publication.

  1. Create custom subagents (opens in a new tab)

    Anthropic · official docs · accessed 2026-08-01

  2. Subagents (opens in a new tab)

    OpenAI · official docs · accessed 2026-08-01

  3. Overview of customizing GitHub Copilot CLI (opens in a new tab)

    GitHub · official docs · accessed 2026-08-01

  4. GitHub Copilot CLI command reference (opens in a new tab)

    GitHub · official docs · accessed 2026-08-01