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).
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/activity" \ -H "Content-Type: application/json" \ -d '{ "workerId": "string", "activity": { "type": "thought", "content": "string" } }'{
"forwarded": true,
"linearSessionId": "string",
"reason": "string"
}{
"error": "Session not found"
}{
"error": "Session not found"
}{
"error": "Session not found"
}{
"error": "Session not found"
}FSM status transition
Drives the session FSM: `pending → claimed → running → finalizing → completed | failed | stopped` Terminal transitions trigger side effects: cost persistence, fleet quota accounting, Linear `agentActivityCreate`, claim release, inbox archival, issue lock release, and next-pending-work promotion.
Post completion summary
Posts a completion summary to Linear. Long summaries are split into multiple Linear comments (comment chunking).