Update an agent run
Settle a run as completed and report its title, summary, and usage. Only the run's agent can call this, with its bot token. A person gets 403 and ends a run with Stop an agent run instead.
A response activity doesn't complete a run. It leaves the run in_progress, so the agent can keep going. When the agent is done, it posts its final response and then sends status: completed. Plane sets ended_at and the run shows as completed in Plane. This call doesn't post anything to the work item thread.
Plane doesn't check the run's current status first. Only send status: completed for a run you have finished. To report a failure, post an error activity instead, which moves the run to failed. See Run statuses.
Send only the fields you want to change.
Path parameters
slug:requiredstringThe workspace slug. It appears in your Plane URLs. In https://app.plane.so/my-team/projects/, the slug is my-team.
pk:requiredstring (uuid)The id of the agent run. It must be one of the calling agent's runs.
Body parameters
status:optionalstringSet to completed to settle the run. It's the only value accepted. Any other status returns 400.
title:optionalstringA short title for the run, shown where the run is listed in Plane.
Nullable.
summary:optionalstringA summary of what the run did.
Nullable.
token_usage:optionalanyThe tokens the run used, as any JSON value, usually an object in whatever shape your agent records. Plane stores it as sent and replaces the previous value.
credit_usage:optionalanyThe credits the run used, as any JSON value, usually an object in whatever shape your agent records. Plane stores it as sent and replaces the previous value.
Response shaping
fields:optionalstringComma-separated list of fields to return. Fields you don't request are left out of the response instead of coming back as null, so a missing key means you didn't ask for it and null means the value is null. id is always included, whether or not you name it.
Pass all to get every requestable field. An unknown field name returns 400 with the list of valid names and the closest match, so a typo is caught instead of being silently ignored.
Requestable here: agent_user_id, comment_id, created_at, created_by_id, creator_id, credit_usage, ended_at, error_metadata, external_link, external_trigger_id, external_trigger_source, id, native_agent_id, project_id, source_comment_id, started_at, status, stopped_at, stopped_by_id, summary, title, token_usage, trigger_type, type, updated_at, updated_by_id, work_item_id.
See Sparse fields.
expand:optionalstringComma-separated relations to embed alongside the ids: agent_user, creator, work_item, comment, and source_comment.
Expanded objects get their own key: ?expand=work_item keeps work_item_id and adds a work_item object next to it. An unknown value returns 400. See Expanding relations.
Scopes
agents.runs:write
Errors
| Status | Code | Cause |
|---|---|---|
400 | invalid_request | status is anything other than completed, a field has the wrong type, or ?fields= or ?expand= names something unknown. |
401 | unauthorized | Missing or invalid credentials. |
402 | payment_required | The feature this endpoint belongs to isn't enabled on your plan or is switched off. |
403 | forbidden | The caller is a person, not the run's agent, or a guest, or your token scope doesn't allow this. |
404 | not_found | No such run in this workspace, or you can't reach it. An agent can't reach another agent's run. |
406 | not_acceptable | The Accept header asks for a representation the API can't produce. |
413 | payload_too_large | The request body is over the size limit. |
415 | unsupported_media_type | The Content-Type isn't one this endpoint accepts. |
429 | rate_limited | Throttled. Honor the Retry-After header before retrying. |
curl -X PATCH \
"https://api.plane.so/api/v2/workspaces/my-team/runs/5d2e8b47-3a1c-4f96-b0e2-7c9a4d1f8e63/" \
-H "Authorization: Bearer $PLANE_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"status": "completed",
"title": "Find the commit behind the Safari redirect loop",
"summary": "Traced the loop to the SameSite change in commit 4e1a9c2 and suggested a fix."
}'import requests
response = requests.patch(
"https://api.plane.so/api/v2/workspaces/my-team/runs/5d2e8b47-3a1c-4f96-b0e2-7c9a4d1f8e63/",
headers={"Authorization": "Bearer your-bot-token"},
json={
"status": "completed",
"title": "Find the commit behind the Safari redirect loop",
"summary": "Traced the loop to the SameSite change in commit 4e1a9c2 and suggested a fix.",
},
)
print(response.json())const response = await fetch(
"https://api.plane.so/api/v2/workspaces/my-team/runs/5d2e8b47-3a1c-4f96-b0e2-7c9a4d1f8e63/",
{
method: "PATCH",
headers: {
Authorization: "Bearer your-bot-token",
"Content-Type": "application/json",
},
body: JSON.stringify({
status: "completed",
title: "Find the commit behind the Safari redirect loop",
summary: "Traced the loop to the SameSite change in commit 4e1a9c2 and suggested a fix.",
}),
},
);
const data = await response.json();{
"id": "5d2e8b47-3a1c-4f96-b0e2-7c9a4d1f8e63",
"title": "Find the commit behind the Safari redirect loop",
"summary": "Traced the loop to the SameSite change in commit 4e1a9c2 and suggested a fix.",
"status": "completed",
"type": "comment_thread",
"trigger_type": "mention",
"agent_user_id": "a8f3c1d2-6b4e-4e57-9d10-2f5b7c8e3a94",
"native_agent_id": null,
"comment_id": "c47e9a12-8d3b-4f61-a5e0-9b2d6f4c1e78",
"source_comment_id": "c47e9a12-8d3b-4f61-a5e0-9b2d6f4c1e78",
"creator_id": "16c61a3a-512a-48ac-b0be-b6b46fe6f430",
"work_item_id": "8c3d1f72-4a9e-4b65-9d20-6e1f3b7a5c48",
"project_id": "4af68566-94a4-4eb3-94aa-50dc9427067b",
"external_link": null,
"external_trigger_source": null,
"external_trigger_id": null,
"error_metadata": {},
"token_usage": {},
"credit_usage": {},
"started_at": "2026-11-20T10:15:02.118204Z",
"ended_at": "2026-11-20T10:17:41.502913Z",
"stopped_at": null,
"stopped_by_id": null,
"created_at": "2026-11-20T10:15:02.118204Z",
"updated_at": "2026-11-20T10:17:41.502913Z",
"created_by_id": null,
"updated_by_id": "a8f3c1d2-6b4e-4e57-9d10-2f5b7c8e3a94"
}
