# Subagents
URL: /en-US/docs/agent/subagents

Delegate a scoped task to a child session, optionally in a git worktree.



The agent can call `subagent` to start a child session. The child works on an isolated task and returns only its final result to the parent.

## Arguments [#arguments]

| Field              | Required | Role                                                     |
| ------------------ | -------- | -------------------------------------------------------- |
| `task`             | yes      | What the child should do                                 |
| `success_criteria` | no       | How the child knows it is done                           |
| `context_summary`  | no       | Short background the child should not have to rediscover |
| `files_to_inspect` | no       | Paths to read first                                      |
| `expected_output`  | no       | Shape of the result the parent wants back                |
| `worktree`         | no       | `true` to edit in an isolated git worktree               |

Use `worktree: true` when the child will edit files and other children may edit at the same time. Omit it for read-only work.

## Limits [#limits]

A child already running inside a worktree cannot start another worktree. Session start and end can run hooks (`subagentStart` / `subagentEnd`). You can inspect child sessions from the subagent viewer on Desktop or `/subagents` in the CLI TUI.
