# CLI Task Assignment

Use hypertask tasks assign to assign tasks to agents or users.

import { Aside } from '@astrojs/starlight/components';

Assign users and agents to tasks, clear assignments, and manage workspace leases from the command line.

## Assign a task

### hypertask tasks assign

Assign a person or multiple people to tasks. Use the numeric list id that `tasks list` returns to operate on a specific task, or the `--all` flag to assign to an entire board.

```bash
hypertask tasks assign <ticket_number> --assignee <user-id>
```

```bash
hypertask tasks assign --project <board> --assignee <user-id> --all
```

**Behavior:**

- Adds the specified assignee to one or more tasks.
- When using `--all`, the assignee is added to every task on the board.

**Examples:**

Assign one person to a specific task listed from `tasks list`:

```bash
hypertask tasks assign 40451 --assignee valentin
```

Assign a person to the entire board:

```bash
hypertask tasks assign --project 15 --assignee valentin@team.com --all
```

<Aside type="note">Re-assigning the same user returns `already-assigned` without creating a duplicate assignment row.</Aside>

## Clear all assignments

### Empty assignee

Clear a task's assignees by passing an empty string to `--assignee`.

**Behavior:**

- Removes every assignee from the specified task.
- Works with `--all` to clear all assignments from a board.
- Previously rejected as malformed input; now walks the existing unassign path.

**Examples:**

Clear a task's assignees:

```bash
hypertask task update 40451 --field "assignee" --value ""
```

Clear all assignments on a board:

```bash
hypertask tasks assign --project 15 --assignee "" --all
```

**Related:** `--clear-assignees` (see below).

### --clear-assignees flag

Clear a task's assignees using a explicit flag.

```bash
hypertask task update <ticket> --clear-assignees
```

**Behavior:**

- Removes all assignees from the ticket.
- Useful when you want to explicitly signal an unassignment.
- Performs the same operation as passing empty `--assignee`.

<Aside type="note">Shipped support for empty `--assignee` and `--clear-assignees` to clear all assignees on a task or board.</Aside>

## Agent details

### hypertask agents get

Show details for a specific agent.

```bash
hypertask agents get --id <agent-id>
```

**Behavior:**

- Prints the agent's mission text, boards, creation time, and revoked state.
- Returns an error if no matching agent is found.
- Requires authentication.

<Aside type="note">Fixed the `UnknownCommand` error for `hypertask agents get --id`, allowing you to retrieve agent details from the CLI.</Aside>

## Task claims

The released CLI does not expose a workspace-lease command. Use `hypertask agent take <ticket>` to claim an agent task; see the [generated commands](/cli/commands/) for the released command surface.
