Subagents
A subagent handles a task in its own conversation and returns the result to the parent agent. Ask fx to delegate work in your prompt:
Have a subagent review the parser tests and report missing cases. Do not edit files.
Subagents share the workspace, so give concurrent tasks separate files or areas to avoid conflicting edits.
Run modes
- A one-off child runs one task and finishes.
- A named child keeps its conversation so you can send follow-up work.
The child inherits the parent's model and reasoning effort. fx manages its execution, cancellation, and saved state.
Agent tool
The model uses the subagent tool with two actions:
| Action | Purpose |
|---|---|
run | Run one task in a temporary child. |
message | Create or continue a named child conversation. |
Run a one-off task:
{
"request": {
"action": "run",
"task": "Review the parser tests and report missing cases. Do not edit files."
}
}
Create a named child, or continue it with another message:
{
"request": {
"action": "message",
"agent": "reviewer",
"message": "Check the new parser tests against your earlier findings."
}
}
Names identify conversations within the parent session. The optional instructions field on message replaces that child's additional instructions; omitting it keeps the previous instructions.
Permissions carry over
Subagents inherit the parent's permission restrictions. Delegation cannot grant a child broader access.