Skip to content

Rename a thread, write its description, or set its default model and reasoning effort​

PATCH
/api/threads/{threadId}

Changes what a person writes about the thread, in any state of the thread, finished ones included (a title and a description label the conversation, not a job). At least one of four members is given:

  • title: the thread's new title. Trimmed, then one line of 1 to 200 characters with no control character. A rename is logged as a thread_titled event (source: user) and is final: nothing else replaces a title a person wrote. Renaming to the title the thread has from the person already writes nothing.
  • description: the thread's description (ADR 0035): what the conversation is about now, in a sentence or two. Trimmed, then one line of 0 to 500 characters with no control character; an empty one clears it. It is logged as a thread_described event (source: user) and is final, an empty one included: the model is never asked for this thread's description again, and one it had in flight is dropped. Writing the description the thread has from the person already writes nothing.
  • model and reasoningEffort (ADR 0086, model-pick-v1.md): the thread's default pick, what a message that names none is sent with (a message's own pick wins, then the thread's, then the agent's own default). A model alias, or one of none, minimal, low, medium, high, xhigh, max; null clears it, and a member that is absent is left as it is. It is checked when it is set against the thread's agent's live card, so a choice the agent does not offer is a 422 (model_not_offered, reasoning_not_offered, with offered) and nothing is written; it is checked again whenever a message resolves to it. It is a setting of the thread row: no event records it, and a fork or an export does not copy it. The answer then carries the default as it is now in model and reasoningEffort.

All are checked before any is written, so a 400 changes nothing. A member other than these four is a 400, so that a client that thinks it can change more learns it cannot. The caller's own threads only (thread.write): someone else's is a 404 indistinguishable from one that does not exist, whatever the caller's roles. Everything else about the thread is as getThread says.

Authorizations​

bearerToken

A JWT signed by the configured issuer (RS256, RS384, ES256 or EdDSA), with the configured audience. Read when auth.mode is jwt or jwt_or_proxy_header. A missing or refused token gets 401 with WWW-Authenticate: Bearer; an issuer whose keys cannot be fetched gets 503.

Type
HTTP (bearer)
or
dpopToken

A JWT as bearerToken, bound to the key of the client (cnf.jkt, RFC 7638), sent as Authorization: DPoP <token> with one DPoP header holding a proof signed by that key (RFC 9449, ADR 0054). Read only when auth.dpop is configured. A bad proof gets 401 with WWW-Authenticate: DPoP error="invalid_dpop_proof", algs="ES256 EdDSA", a bad or unbound token error="invalid_token".

Type
HTTP (DPoP)
or
proxyIdentity

Set by oauth2-proxy after OIDC login; requests without it get 401. Read when auth.mode is proxy_header (the default) or jwt_or_proxy_header without a bearer token.

Type
API Key (header: X-Auth-Request-Email)

Request Body​

JSON
{
  
"title": "string",
  
"description": "string",
  
"model": "string",
  
"reasoningEffort": "none"
}

Responses​

The thread, with what was changed

JSON
{
  
"id": "00000000-0000-4000-8000-000000000001",
  
"owner": "user@example.com",
  
"title": "Fix the failing login test",
  
"target": {
  
  
"agentId": "coder"
  
},
  
"state": "working",
  
"tools": [
  
  
"websearch"
  
],
  
"createdAt": "2026-01-15T09:12:03Z",
  
"updatedAt": "2026-01-15T09:14:41Z",
  
"lastSeq": 7
}

Samples​

Powered by VitePress OpenAPI