Threads API
Get a thread
Read one thread's metadata and derived status.
/api/v1/tasks/{taskId}Returns the thread's metadata: its current execution, title and derived status. It does not return the conversation; personal tokens cannot read transcript history. Reading never wakes the workspace, so polling it is free.
Requires a personal API token with the tasks:read scope, sent as Authorization: Bearer over HTTPS.
Path parameters
taskIdstring (UUID)requiredThe thread. A thread that is not yours answers 404, never 403.
Returns
200 OK with the thread's metadata.
Response fields
taskIdstring (UUID)requiredThe thread.
userIdstringrequiredYour account. Every endpoint only ever returns your own threads.
projectIdstring (UUID)requiredThe project the thread belongs to.
executionobjectrequiredThe harness, connection and model the thread currently runs on. Send messages with
execution.id: a fork or a harness switch changes it.titlestringrequiredShown in the sidebar.
statusSummary"working" | "needs_you" | "ready" | "done" | "failed" | "limited"requiredDerived from what is running and linked: Working, Needs you, Ready to review, Done, Failed or Limited. A finished reply alone does not mean
done.sandboxIdstring | nullrequiredThe workspace machine, once one has been assigned.
lastSeqintegerrequiredSequence number of the latest transcript item. It grows as the thread works.
createdAtstring (ISO 8601)requiredWhen the thread was created.
updatedAtstring (ISO 8601)requiredLast change to the thread.
lastMessageAtstring (ISO 8601) | nulloptionalYour latest message. Replies and background activity do not move it.
pinnedAtstring (ISO 8601) | nullrequiredSet when you pinned the thread.
archivedAtstring (ISO 8601) | nullrequiredSet when the thread is archived.
sourceLabelstring | nullrequiredRepository or project name shown in the sidebar.
branchLabelstring | nullrequiredBranch shown in the sidebar.
parentTaskIdstring (UUID) | nulloptionalSet on a child thread started by another thread's agent.
forkedFromTaskIdstring (UUID) | nulloptionalSet on a fork.
pullRequestobject | nulloptionalThe linked pull request with its state, checks and review, when there is one.
Errors
Errors are JSON: { "version": 1, "error": { "code", "message" } }. See Errors for retry advice.
- 401
unauthorized The bearer token is missing, invalid or revoked.
- 403
forbidden The token does not have the
tasks:readscope, or the account is suspended.- 404
not_found The thread does not exist, is not yours, or the id is not a UUID.