> For the complete documentation index, see [llms.txt](https://docs.tnid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tnid.com/api-reference/002_company/011_documents/029__run_company_ai_task.md).

# Run A Company AI Task Again

GraphQL endpoint: `/company`

Runs a task over the documents named in `ids`, or — with `ids` omitted — over what the task watches: its folders and everything beneath them, or the whole repository when it runs on the root. A task watching neither covers nothing, so omitting `ids` for one queues no runs.

A named document runs whether or not the task watches the folder it sits in; ids naming something the caller doesn't hold, or a document that isn't accepted, are left out. Runs are kept rather than replaced, so a previous answer stays available beside the new one. `count` is how many runs were queued, not how many have finished.

## Query

```graphql
mutation ($taskId: ID!, $ids: [ID!]) {
  runCompanyAiTask(taskId: $taskId, ids: $ids) { status count }
}

```

## Variables

```json
{
  "taskId": "00000000-0000-4000-8000-000000000001"
}
```

## Response

```json
{
  "data": {
    "runCompanyAiTask": {
      "count": 2,
      "status": "OK"
    }
  }
}
```
