Explicitly claim a pre-queued session
Allows a worker to claim a session that was polled but not auto-claimed (e.g. after a `nack` retry). Returns the `QueuedWork` item and short-lived git credentials on success. Workers that receive `preClaimed: true` from the poll response must NOT call this endpoint.
Short-lived worker runtime JWT minted by the platform. Claims bind the worker, project, organization, registration, and scopes.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/sessions/string/claim" \ -H "Content-Type: application/json" \ -d '{ "workerId": "string" }'{
"claimed": true,
"session": {
"linearSessionId": "string",
"trackerSessionId": "string",
"issueId": "string",
"issueIdentifier": "string",
"providerSessionId": "string",
"worktreePath": "string",
"status": "pending",
"createdAt": 0,
"updatedAt": 0,
"workerId": "string",
"queuedAt": 0,
"claimedAt": 0,
"priority": 0,
"promptContext": "string",
"organizationId": "string",
"workType": "research",
"agentId": "string",
"projectName": "string",
"provider": "string",
"totalCostUsd": 0,
"inputTokens": 0,
"outputTokens": 0,
"lastToolName": "string",
"lastToolCalledAt": 0,
"toolCallCount": 0
},
"work": {
"sessionId": "string",
"issueId": "string",
"issueIdentifier": "string",
"priority": 0,
"queuedAt": 0,
"prompt": "string",
"providerSessionId": "string",
"workType": "research",
"sourceSessionId": "string",
"projectName": "string",
"repository": "string",
"kits": {}
},
"gitCredentials": [
{
"token": "string",
"cloneUrl": "string",
"expiresAt": "2019-08-24T14:15:22Z"
}
]
}{
"error": "Session not found"
}{
"error": "Session not found"
}{
"error": "Session not found"
}Post agent activity (thought/action/response)
Stores activity in the in-process ring buffer and forwards `thought | action | response` to the Linear AgentSession. Linear forwarding is fire-and-forget (non-fatal on failure).
Post completion summary
Posts a completion summary to Linear. Long summaries are split into multiple Linear comments (comment chunking).