2026-09-08 12:34:00 -04:00
---
title : Conversation search syntax
---
2026-05-22 13:58:07 +01:00
2026-10-15 14:38:40 -04:00
The chat list endpoint accepts a `q` query parameter for filtering conversations.
All filters use `key:value` syntax.
2026-10-27 12:44:17 -04:00
Bare search terms are rejected.
Use `title:` for title filtering or `search:` for full-text search.
2026-05-22 13:58:07 +01:00
## Filters
2026-10-30 15:52:22 +02:00
| Key | Values | Description |
|--------------|----------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------|
| `title` | substring | Case-insensitive substring match. Quote multi-word values. |
| `archived` | `true` , `false` | Filter by archived state. Default: `false` . |
| `has_unread` | `true` , `false` | Conversations with unread assistant messages. |
| `status` | `waiting` , `running` , `error` , `requires_action` , `interrupting` , `paused` | Conversation state. Comma-separated or repeated values match any of them. |
| `pr_status` | `draft` , `open` , `merged` , `closed` , `none` | Linked pull request state. Comma-separated for OR. `none` matches conversations with no linked pull request. |
| `diff_url` | URL | Match by associated diff URL. Quote values containing colons. |
| `pr` | positive integer | Exact PR number match. |
| `repo` | substring | Case-insensitive substring match against git remote origin or URL. Quote values containing colons. |
| `pr_title` | substring | Case-insensitive PR title substring match. Quote multi-word values. |
| `source` | `created_by_me` , `shared_with_me` | Ownership scope. Default: `created_by_me` . Pass both values comma-separated to return owned and shared conversations. |
| `search` | text | Full-text search across chat titles, PR titles, PR numbers, and message content. Quote multi-word values. |
2026-05-22 13:58:07 +01:00
2026-10-15 14:38:40 -04:00
Multiple filters in one query combine with AND logic.
`search:` cannot be combined with `title:` , `pr_title:` , or `pr:` .
2026-08-25 09:09:10 -04:00
## Full-text search
`search:` uses token-based PostgreSQL full-text search:
2026-10-15 14:38:40 -04:00
- Case-insensitive whole-word matching with AND semantics.
Quoted phrases, `OR` , and `-` negation follow [`websearch_to_tsquery` ](https://www.postgresql.org/docs/current/textsearch-controls.html#TEXTSEARCH-PARSING-QUERIES ) rules.
- Message content matches English word stems (`refactor` matches `refactoring` ) and ignores English stopwords.
Titles and PR titles do not stem.
2026-10-06 22:42:56 +02:00
- No fuzzy, semantic, or word-prefix matching.
- Whole-number values also match PR numbers by prefix: `302` matches PR `30281` .
2026-10-27 12:44:17 -04:00
- A value with no searchable words (punctuation only) returns an empty list.
An empty value returns HTTP 400.
2026-10-15 14:38:40 -04:00
- Results use the standard chat list ordering (pinned first, then most recently updated) and pagination, without match snippets.
2026-09-28 12:29:40 -04:00
- Message content becomes searchable shortly after it is written (background indexing, usually within 10 minutes).
Titles and PR titles are searchable immediately.
2026-05-22 13:58:07 +01:00
## Examples
```sh
# Title substring (case-insensitive)
?q= title:deploy
# Multi-word title (URL-encode the space or use +)
?q= title:my+project
# Unread conversations
?q= has_unread:true
2026-09-28 19:58:35 +10:00
# Conversations that need you, or that failed
?q= status:requires_action,error
# Conversations with a turn in progress
?q= status:running
2026-05-22 13:58:07 +01:00
# Conversations with open or draft PRs
?q= pr_status:open,draft
2026-09-28 19:14:12 +10:00
# Conversations with no pull request, or an open one
?q= pr_status:none,open
2026-05-22 13:58:07 +01:00
# Filter by diff URL (quote values containing colons)
?q= diff_url:"https://github.com/coder/coder/pull/123"
# Combine filters
?q= title:refactor+has_unread:true+pr_status:merged
# Conversations linked to PR #42
?q= pr:42
# Conversations for a specific repository
?q= repo:coder/coder
# Conversations with a specific PR title
?q= pr_title:"fix auth bug"
2026-08-25 09:09:10 -04:00
2026-08-25 15:13:21 -04:00
# Conversations shared with you, plus your own
?q= source:created_by_me,shared_with_me
2026-08-25 09:09:10 -04:00
# Full-text search across titles, PR titles, and messages
?q= search:"kubernetes restart"
# Combine full-text search with other filters
?q= search:refactor+pr_status:open
2026-05-22 13:58:07 +01:00
```
## Notes
2026-09-28 19:58:35 +10:00
- `status:waiting` is an idle conversation, `status:running` is a turn in progress, and `status:interrupting` is a turn being stopped.
- `status:requires_action` means the agent needs you before it can continue, and `status:error` means the turn failed.
2026-11-09 15:55:18 +11:00
- `status:paused` means a turn finished while the next queued message, or any message under **Next step** , was being edited. The agent does not continue until the edit ends.
2026-10-15 14:38:40 -04:00
- `title:` , `repo:` , and `pr_title:` use ILIKE matching.
`%` and `_` act as wildcards.
2026-05-22 13:58:07 +01:00
- `pr_status:draft` means the PR is open **and** marked as a draft.
`pr_status:open` means the PR is open and not a draft.
2026-09-28 19:14:12 +10:00
- `pr_status:none` matches conversations with no pull request, including those whose linked PR was cleared.
2026-10-15 14:38:40 -04:00
- Conversations without a linked diff status are excluded when `pr` , `repo` , `pr_title` , or any `pr_status` value other than `none` is set.
The `repo:` filter also matches chats tracking a branch with no PR.
2026-08-25 09:09:10 -04:00
- Unrecognized keys, bare terms, or combining `search:` with `title:` , `pr_title:` , or `pr:` return HTTP 400 with a validation error.