# task

Canonical URL: https://developers.iagenify.com/sdk/agent/permissions/categories/task/
Language: en

Handing a job to a subagent. Always allowed — and free precisely because everything the subagent then does is not.

Status: always allowed · runs in parallel · children are not free

| ask | auto | plan | full |
| --- | --- | --- | --- |
| allowed | allowed | allowed | allowed |

## The tool {#tool}

`task`. It exists only when the account or the machine has subagents to offer — without a library there is no such tool in the declarations.

## Why delegating is free {#why}

> **The permission moved, it did not disappear**
>
> A subagent's own tool calls go through the parent's callback, with the parent's mode. So asking twice — once to delegate, once per action — would be asking about the same decision at two levels, and the second is the one with the arguments in it.

## What a subagent inherits, and what it does not {#inherited}

| Inherited | Not inherited |
| --- | --- |
| The mode, including a later `setMode()` | The conversation — it starts with a fresh context |
| The permission callback | `ask_user`, `todo_write` and `memory` |
| The budget, shared with the parent | A step ceiling above 40 |
| The machine and the workspace | The ability to start subagents of its own |

## Telling a child's events apart {#telling-apart}

```javascript
onEvent: (e) => {
  if (e.parentId) {
    console.log("  [subagent]", e.type, e.tool ?? "");
  } else {
    console.log(e.type, e.tool ?? "");
  }
}
```

Child events carry `parentId`, and their identifiers are prefixed with the task's — so a tree can be drawn without guessing which run an event belongs to.

## Several at once {#parallel}

`task` is in the parallel set, so several in one turn genuinely run together, each with its own context, all against the one shared budget.

- [task](/sdk/agent/tools/task): The tool.
- [Skills and subagents](/sdk/agent/skills-and-subagents): Where the library comes from.
- [Parallelism](/sdk/agent/parallelism): Why this category is in the parallel set.

```python
def on_event(event):
    if event.get("parentAgent"):
        print("  [subagent]", event["type"], event.get("tool", ""))
    else:
        print(event["type"], event.get("tool", ""))
```
