Update Linear agent session with external URLs
Posts external URLs (PR links, preview URLs, etc.) to the Linear agent session for display in the Linear UI. Sessions without a `linearSessionId` (governor-generated sessions) return `{ updated: false }` without error. Fail-closed: Linear API errors return 500.
Authorization
workerJwt Runtime JWT minted by the platform at worker registration. Three-segment dotted string. Claims include {jti, proj, org, sub (=workerId), reg, scope[]}. Use on all post-registration worker endpoints.
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
application/json
curl -X POST "https://example.com/api/sessions/string/external-urls" \ -H "Content-Type: application/json" \ -d '{ "externalUrls": [ { "label": "string", "url": "http://example.com" } ] }'{
"updated": true,
"externalUrls": [
{
"label": "string",
"url": "string"
}
],
"reason": "string"
}{
"error": "Session not found"
}{
"error": "Session not found"
}{
"error": "Session not found"
}{
"error": "Session not found"
}Worker rejection of a pre-claimed session
Allows a worker to reject a pre-claimed session (e.g. host capacity changed, workarea refused, or daemon is draining). Releases the claim and re-queues the session preserving its original priority. The original `QueuedWork` item must be supplied so the platform can re-enqueue without losing fields.
Record a routing observation (MAB reward)
Called by the runner at session end to report the outcome of a provider dispatch. Updates the Beta-distribution posterior for the `(provider, workType)` arm in the multi-armed bandit router and appends an observation entry. Best-effort: store errors return `{ recorded: false }` with HTTP 200 so a Redis blip never fails the worker's terminal flow.