Subagent
A separately run agent, given a bounded task and its own working context, that returns a result to whoever delegated it.
- Published
- Sep 27, 2026
- Checked
- Sep 27, 2026
How far we checked this page
Signed by Ravalika Korthiwada, Sep 27, 2026. Passing one check says nothing about the next.
- FormatNot checkedThe file format was not checked for this page.
- InstallsNot checkedInstallation was not checked for this page.
- LoadsNot checkedLive loading was not checked for this page.
- HelpsNot checkedA with/without task comparison was not run.
A subagent is another agent run with its own working context, assigned a delegated task, that reports a result back rather than running in the main conversation. In Claude Code, a custom subagent is a Markdown file at .claude/agents/<name>.md or ~/.claude/agents/<name>.md, with required name and description frontmatter and optional tool, model and skills: settings. Claude Code subagents. Codex documents the same idea in TOML: personal definitions at ~/.codex/agents/*.toml and project definitions at .codex/agents/*.toml, with name, description and developer_instructions. Codex subagents.
For example, a read-only reviewer subagent given a three-file summary task runs in its own thread; the files it reads never enter the parent conversation’s context, and only its summary comes back. Preloading an agent skill into a subagent’s skills: field is not an access-control list: the docs are explicit that a subagent with a skill preloaded can still act outside that skill. Spawning more subagents can raise total token use even when the parent conversation’s own context stays smaller.
We haven’t defined or run a subagent ourselves as of this writing; this entry reflects each host’s own documentation.
Related: Agent skill vs subagent, Agent skill.