# Subagent

> A helper agent that a main agent starts for one part of a task, with its own context, so the main conversation stays short.

_Updated November 23, 2026_

Subagents let an agent delegate: search the codebase, review a diff or research an API in a separate context, then return only the conclusion. The main session keeps its context window for the work that needs it.

Claude Code, Codex and several other agents support them. They are cheap to start, so the limit is usually the machine: many agents and subagents running builds at once need real CPU and memory.

## Keep reading

- [Context window](https://envhaven.com/glossary/context-window)
- [Context compaction](https://envhaven.com/glossary/context-compaction)
- [Agent harness](https://envhaven.com/glossary/agent-harness)

Source: https://envhaven.com/glossary/subagent
