agentstringrequiredWhich subagent — the declaration lists what is available.
descriptionstringrequiredThree to six words, shown to the user: « Read the tax form ».
promptstringrequiredThe whole job. It sees nothing of this conversation.
A fresh context is the point
The subagent gets the prompt and nothing else — not the conversation, not what was read, not what was decided. The tool's own description says so: name the goal, the paths, and exactly what to report.
When the agent is told to use it
- Several independent things to investigate or produce — several
taskcalls in the same turn, running in parallel. - A job that would fill its context with material it will not need afterwards.
- Not for one or two quick reads: those it does itself.
What a subagent gets
| Inherited | Not |
|---|---|
| The mode and the permission callback | The conversation |
| The budget, shared | ask_user, todo_write, memory |
| The machine and the workspace | A step ceiling above 40 |
| Its own tools and model, from its file | Subagents of its own |
What comes back
Its final message, plus a line of figures — turns, tool calls, credits, and why it stopped. Its events reach your onEvent carrying parentId as they happen.
Calling it is free; what it does is not
The category is task, always allowed — because every tool the subagent then calls goes through the same permission callback, with the arguments in hand.