# Delegated tasks

> How the lead hands part of the job to a discussion of its own: read-only explore tasks and general ones.

Source: https://letthembuild.com/docs/delegated-tasks

The lead can hand a self-contained part of the job to a discussion of its own, without asking you, and carry on with the answer. Each delegated task appears in the sidebar under the discussion that started it, and only its final report comes back. A lead may start up to six at once; in a git repository they run side by side, each in its own copy of the checkout, and their changes are applied back when they finish.

## Two kinds of task

Each task has a kind, chosen by the lead:

- **Explore** only looks: it can read files, list folders, search and run commands that change nothing. Writing a file or running anything that changes something is refused, by the app and by the seat's own command line tool. Because it cannot change anything it needs nobody's approval and runs in any permission mode, and it uses the seat's cheaper model unless the lead asks for the full one. Use it for "find where this is", "read these and summarise", "sift this log".
- **General** has the lead's own tools, for work that changes files or runs the build. It runs only in Auto or Bypass mode, because a delegated task has nobody watching it to approve a command.

## Settings

Mac only: Settings → Billing → Spending → Brakes.

| Setting | Default | What it does | Change it when |
| --- | --- | --- | --- |
| Tasks the lead may delegate at once | 6 | 1 to 6 tasks per call. | You want parallel work to run up the bill more slowly. |
| Spread delegated tasks across seats | Off | Gives each task to the next seat that can use tools, starting with the lead, instead of running them all on the lead. The lead can still name a seat for a task. | You want the room's other models doing some of the work. |
| Run read-only delegated tasks on the cheaper model | On | A task that only reads runs on its seat's cheaper model; one that fails or comes back empty is run again once on the full model. | You want every delegated task on the full model. |
| A reviewer checks a helper's changes | Tell the lead | Another seat reads a general task's changes before they come back. | You want serious problems held back, or no read. |
| Stop one helper when it has spent | No limit | A dollar amount, counted as the other brakes count. A helper that has spent it stops and reports, its unfinished changes left on its branch; the others carry on. Not for cloud runs. | One helper should not spend what is left for all. |
| Use saved helper types | On | See the page Saved helper types. | Only the lead should describe helpers. |

The last three are shared with the web and the iPhone.

A delegated task counts against the ceiling of the discussion that started it. It does not delegate further unless you turn on **Nested Delegation** (Settings → Beta Features, off by default). Then a helper may have helpers of its own, one level more and no deeper, in a git repository only. A run starts at most sixty helpers in all.

## A reviewer reads the changes first

When a general task finishes in a checkout of its own, one other seat, never the lead, reads the task and up to 60,000 characters of its changes, and answers fine or lists problems as serious or minor: one call, metered as that seat's turn.

- **Tell the lead**, the default: the changes come back as always, and the findings are in the helper's report.
- **Hold serious problems**: a change marked serious is not applied and gets no pull request. It stays on the helper's branch, named in the report with the findings.
- **Don't check**: nobody reads them first.

The read never asks you anything and never stops the run. With no other seat to ask, no answer within three minutes or no clear verdict, the changes come back as always and the report says they were not read.

## Talking while they work

The lead can steer a running helper (it reads the message at its next step), ask a finished one a follow-up (it looks again, read-only, with what it knows), or stop one helper and keep the rest. A helper can send the lead a short finding or question, or write to another helper of the same lead. Each message is a quiet line such as **Lead → Survey: …** in the discussion and under that helper in **Background Tasks**, never shown as yours. None asks you anything: a message changes nothing outside the run and gives a helper no new tool. A helper gets at most 100 messages a run, of up to 20,000 characters, and two helpers answer each other ten times in a row before the lead steps in. On the web, helpers send notes back with their reports, and the lead can ask a finished one a follow-up.

## One result, or a pull request each

**Helpers deliver as** (Settings on the Mac, the web and the iPhone, shared) decides what happens to a general task's changes. **One combined result**, the default, applies them back to this checkout. **A pull request each** commits each helper's work on a branch of its own, named like ltb/LTB-42-1-fix-login, pushes it and opens its own pull request against the base branch, described with what changed, how it was checked and what was not done. It works only in a repository with a remote, never pushes to the base branch, and never merges unless you turn on **Merge when ready** for that pull request. The run's final answer ends with a table of the pull requests it opened, and the discussion watches them all.
