# Coordination: assigning tasks to agents

`rig queue` is how agents give each other work that has to get done. Each task is assigned to one agent, with a description of the work and its history. It stays assigned when that agent's turn ends, through compaction and a restart, and when a fresh agent takes over the seat. Hand it on and the next agent has it; nobody has to remember to relay it.

Use `rig send` for a quick question. Use the queue when someone has to do something.

## Assign, pick up, finish

**Assign a task.** Name the seat that should do it and describe the work. Long descriptions go in a file. `--mission` and `--slice` file the task under the work it belongs to.

```
rig queue create --destination dev-impl@my-rig \
  --body-file brief.md \
  --mission search-experience --slice 01-search-page
```

The seat is told it has new work.

**Pick it up, then close it with a reason.** `claim` marks it as in progress. When you're done, close it with a short reason: `no-follow-on` when nothing comes next, or `handed_off_to`, `denied`, `canceled`, `escalation` or `superseded`. A note without `--state` just adds to the record.

```
rig queue claim qitem-20260901100000-abcd1234ef567890
rig queue update qitem-20260901100000-abcd1234ef567890 --note "matching any title word, not the whole phrase"
rig queue update qitem-20260901100000-abcd1234ef567890 \
  --state done --closure-reason no-follow-on \
  --resolution "Search matches any title word; tests added"
```

**Hand it on.** `handoff` closes your task and opens the next seat's in one step, carrying the description forward unless you write a new one.

```
rig queue handoff qitem-20260901100000-abcd1234ef567890 \
  --to build-checker@my-rig \
  --note "ready for review; keyboard path per requirement 2"
```

Closing your task records that you passed the work on. Whether the next seat accepts it is recorded on its own task.

## Waiting on something

When a task can't move until something else happens, set it aside with `rig queue block` instead of leaving it open or closing it. Say what it's waiting on and what wakes it, meaning what brings the assigned agent back to it:
- another task: it wakes when that task closes;
- a timer (`--wake-after 15m`);
- a person.

```
rig queue block qitem-20260901100000-abcd1234ef567890 --on qitem-20260901110000-0123456789abcdef
```

A task waiting on a person needs a one-line summary and a link to what they should look at. When they decide, `rig queue resolve` records the decision and wakes the assigned agent.

## Seeing what's going on

- **`rig queue list`** shows the active tasks in your rig, like `docker ps`. Add `--owned` for only yours, `-a` for closed ones, `-A` for every rig.
- **`rig queue show <id>`** shows one task; `--full` shows all of it. `rig queue transitions <id>` shows its history.
- **`rig view show held`** shows what's waiting and on what.
- **`rig view show escalations`** shows what's waiting on a person.
- **`rig view show pickup`** shows whether a claimed task is being worked, has stalled, or is waiting.

`rig queue list` shows up to 100 tasks by default; use `--limit` for more.

## Before the queue: streams

Some things are worth noting before anyone has to act: a test that flaked, a user report, an idea. Post them to a stream with `rig stream emit`. A seat can subscribe to what's addressed to it (`rig stream subscribe`), read new items a page at a time (`rig stream read`), and record what it did about each one with `rig stream act`: opened a task, joined an existing one, or declined with a reason. Stream intake can open tasks from what your tools report.

## Where to go next

- [Workflows](/docs/workflows): declare the steps once, and the next task opens when a step closes.
- [Messaging](/docs/messaging): `rig send` for the quick questions beside the queue.
- [The terminal UI](/docs/tui): your team's tasks and who needs you, live.
- Every `rig queue`, `rig stream` and `rig view` option is in the [CLI reference](/docs/generated/cli-reference).
