# list\_review\_threads

List the threads on a task's diff, the caller's task by default.

read-only · idempotent · MCP tool · [Agent](https://komrad.dev/latest/api/agent.md)

Line numbers are true of each thread's snapshot, so search for the quoted lines once the code has moved.

## Calling it

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

```bash
komrad rpc list-review-threads
```

```json
{
  "name": "list_review_threads",
  "arguments": {}
}
```

Offered by the komrad MCP server to writer, reviewer, orchestrator agents.

## Request

### ListReviewThreadsRequest

| Field | Type | Description |
| --- | --- | --- |
| [one of](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ListReviewThreadsRequest-task) |  | The task whose threads to list. Unset uses the caller's own task. |
| [`task_id`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ListReviewThreadsRequest-task_id) | uuid | The task, by id. |
| [`task_slug`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ListReviewThreadsRequest-task_slug) | string not empty | The task, by slug. |

## Response

### ListReviewThreadsResponse

| Field | Type | Description |
| --- | --- | --- |
| [`threads`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ListReviewThreadsResponse-threads) | [ReviewThread\[\]](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewThread) | The threads on the task's diff, with their comments. An agent sees only released comments. |

## Types

### ReviewThread

ReviewThread is a conversation pinned to a range of lines in a snapshot, or on the change as a whole.

| Field | Type | Description |
| --- | --- | --- |
| [`id`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewThread-id) | uuid\* | The thread's id. |
| [`task_id`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewThread-task_id) | uuid\* | The id of the task whose diff the thread is on. |
| [`review_id`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewThread-review_id) | uuid | The id of the review a reviewer agent opened the thread in. Unset for a thread the person opened. |
| [`snapshot_id`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewThread-snapshot_id) | uuid\* | The id of the snapshot the thread is pinned to. |
| [`snapshot_ordinal`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewThread-snapshot_ordinal) | int32 | The number of the snapshot the thread is pinned to. |
| [`base_sha`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewThread-base_sha) | string | The commit the old side of the line numbers is read against. This is the snapshot's base unless the diff was narrowed to an earlier snapshot. |
| [`file_path`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewThread-file_path) | string | The file's path, relative to the checkout. Empty for a thread on the change as a whole. |
| [`old_start`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewThread-old_start) | int32 | The first line of the range on the old side of the diff, counting from one. |
| [`old_end`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewThread-old_end) | int32 | The last line of the range on the old side of the diff. |
| [`new_start`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewThread-new_start) | int32 | The first line of the range on the new side of the diff, counting from one. |
| [`new_end`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewThread-new_end) | int32 | The last line of the range on the new side of the diff. |
| [`quoted_lines`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewThread-quoted_lines) | string\[\] | The diff lines the thread is about, each with its leading marker. |
| [`resolved_at`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewThread-resolved_at) | timestamp | When the thread was resolved. Unset while the thread is open. |
| [`unread_by_human`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewThread-unread_by_human) | bool | Whether an agent has replied since the person last read the thread. |
| [`messages`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewThread-messages) | [ReviewMessage\[\]](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewMessage) | The thread's comments, oldest first. |
| [`created_at`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewThread-created_at) | timestamp | When the thread was created. |
| [`updated_at`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewThread-updated_at) | timestamp | When the thread last changed. |
| [`mirrors_forge`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewThread-mirrors_forge) | bool | Whether the thread is copied from a pull request, where replies are public. |
| [`forge_replies`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewThread-forge_replies) | [ForgeReply\[\]](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ForgeReply) | The replies komrad has drafted, posted or failed to post to the forge thread, oldest first. Only the person sees these. |
| [`author_kind`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewThread-author_kind) | [ReviewAuthorKind](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewAuthorKind) | Who opened the thread. |
| [`author_agent_id`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewThread-author_agent_id) | uuid | The id of the agent that opened the thread. Unset when the person or a forge user opened it. |
| [`forge_url`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewThread-forge_url) | string | The web address of the thread's first comment on the forge. Empty for a thread opened in komrad. |

### ReviewMessage

ReviewMessage is one comment in a review thread.

| Field | Type | Description |
| --- | --- | --- |
| [`id`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewMessage-id) | uuid\* | The comment's id. |
| [`thread_id`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewMessage-thread_id) | uuid\* | The id of the comment's thread. |
| [`author_kind`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewMessage-author_kind) | [ReviewAuthorKind](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewAuthorKind) | Who wrote the comment. |
| [`author_agent_id`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewMessage-author_agent_id) | uuid | The id of the agent that wrote the comment. Unset when the person or a forge user wrote it, or when the agent was deleted. |
| [`body`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewMessage-body) | string | The comment's text. |
| [`suggestion`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewMessage-suggestion) | string\[\] | The lines the author proposes in place of the thread's range. Empty for a plain comment. |
| [`created_at`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewMessage-created_at) | timestamp | When the comment was written. |
| [`updated_at`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewMessage-updated_at) | timestamp | When the comment was last edited. |
| [`review_id`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewMessage-review_id) | uuid | The id of the review a reviewer agent released the comment with. Unset for the person's comments and the writer's replies. |
| [`snapshot_id`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewMessage-snapshot_id) | uuid | The id of the snapshot saved with an addressed reply. Unset on every other comment. |
| [`forge`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewMessage-forge) | [ForgeOrigin](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ForgeOrigin) | The forge comment this comment was copied from. Unset for a comment written in komrad. |
| [`accepted_from`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewMessage-accepted_from) | uuid | The id of the held forge comment the person accepted this comment as a copy of. Unset otherwise. |
| [`held`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewMessage-held) | bool | Whether the comment is kept from the agent, because a forge user without write access wrote the comment or its thread, or the person held it or its thread from the writer when posting it. |
| [`read_at`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewMessage-read_at) | timestamp | When the agent read the person's comment. Unset until then, and on every other comment. |
| [`read_snapshot_id`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewMessage-read_snapshot_id) | uuid | The id of the snapshot taken as the agent read the person's comment, which an addressed reply is compared against. Unset until then, and on every other comment. |
| [`held_by_person`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewMessage-held_by_person) | bool | Whether the person held this forge comment from the writer when posting it, which keeps it, and the thread it opens, from the agent for good. |

### ForgeReply

ForgeReply is a reply komrad posts for the person on a thread copied from the forge.

| Field | Type | Description |
| --- | --- | --- |
| [`id`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ForgeReply-id) | uuid\* | The reply's id. |
| [`thread_id`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ForgeReply-thread_id) | uuid\* | The id of the review thread the reply answers. |
| [`state`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ForgeReply-state) | [ForgeReplyState](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ForgeReplyState) | How far the reply has got toward the forge. |
| [`body`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ForgeReply-body) | string | The reply's text. |
| [`approved_at`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ForgeReply-approved_at) | timestamp | When the person approved the reply for posting. |
| [`sending_started_at`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ForgeReply-sending_started_at) | timestamp | When komrad last started posting the reply. Unset until then. |
| [`sent_at`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ForgeReply-sent_at) | timestamp | When the forge accepted the reply. Unset until then. |
| [`forge_comment_id`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ForgeReply-forge_comment_id) | uuid | The id of the comment komrad copied back from the forge for the reply. Unset until komrad copies it. |
| [`error`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ForgeReply-error) | string | What the forge said when it last refused the reply. Unset unless posting failed. |
| [`created_at`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ForgeReply-created_at) | timestamp | When the reply was written. |

### ForgeOrigin

ForgeOrigin is the forge comment a review comment was copied from.

| Field | Type | Description |
| --- | --- | --- |
| [`login`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ForgeOrigin-login) | string | The forge login of the comment's author. Empty when the forge no longer has the account. |
| [`comment_id`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ForgeOrigin-comment_id) | uuid\* | The forge comment's id. The forge may have deleted the comment since. |
| [`edited_at`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ForgeOrigin-edited_at) | timestamp | When the forge comment was last edited. Unset when it was never edited. |
| [`yours`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ForgeOrigin-yours) | bool | Whether the person wrote the forge comment, as the account komrad connects to the forge with. Always false on a connection made from a GitHub App. |

### ReviewAuthorKind

ReviewAuthorKind is who wrote a review or comment.

| Value | Description |
| --- | --- |
| [`human`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewAuthorKind-human) | The person. |
| [`agent`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewAuthorKind-agent) | An agent, either the writer or a reviewer. |
| [`forge`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ReviewAuthorKind-forge) | A forge user, whose comment komrad copied from the pull request. |

### ForgeReplyState

ForgeReplyState is how far a reply komrad posts to the forge has got.

| Value | Description |
| --- | --- |
| [`approved`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ForgeReplyState-approved) | Approved and waiting to be posted. |
| [`sending`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ForgeReplyState-sending) | Being posted. The forge may already have it. |
| [`sent`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ForgeReplyState-sent) | Accepted by the forge. |
| [`failed`](https://komrad.dev/latest/api/agent/list-review-threads.md#komrad-agent-v1-ForgeReplyState-failed) | Refused by the forge on the latest attempt, waiting for the person to retry or discard it. |
