# delete\_tasks

Delete tasks' worktrees, by `task_ids` or `task_slugs`, archiving the tasks first.

writes · idempotent · destructive · CLI only · [Task](https://komrad.dev/latest/api/task.md)

With records set, delete the tasks for good too, with every agent on them and their transcripts, documents, mail, notes and reviews.

## Calling it

```bash
curl -X POST http://127.0.0.1:8787/komrad.task.v1.TaskService/DeleteTasks \
  -H 'Content-Type: application/json' \
  -d '{}'
```

```bash
komrad rpc delete-tasks
```

## Request

### DeleteTasksRequest

| Field | Type | Description |
| --- | --- | --- |
| [`task_ids`](https://komrad.dev/latest/api/task/delete-tasks.md#komrad-task-v1-DeleteTasksRequest-task_ids) | uuid\[\] no repeats | The tasks to delete, by id. |
| [`records`](https://komrad.dev/latest/api/task/delete-tasks.md#komrad-task-v1-DeleteTasksRequest-records) | bool | Whether to delete the tasks' agents, transcripts, documents, mail, notes and reviews too. False deletes only the tasks' worktrees and keeps the tasks archived. |
| [`task_slugs`](https://komrad.dev/latest/api/task/delete-tasks.md#komrad-task-v1-DeleteTasksRequest-task_slugs) | string\[\] no repeats each not empty | The tasks to delete, by slug. |

## Response

### Empty

No fields.
