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.
AuthorizationBearer <JWT>Short-lived worker runtime JWT minted by the platform. Claims bind the worker, project, organization, registration, and scopes.
id*stringapplication/json- body
workerId*stringClaim result.
application/json- response
claimed*truetruesession*Full session state object stored in Redis.
work*gitCredentials*array<>curl -X POST 'https://app.rensei.ai/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", "workTypeRole": "intake", "sourceSessionId": "string", "projectName": "string", "repository": "string", "ref": "string", "repositoryDeclaration": { "protocol": "session-root-v1", "repositories": [ { "source": { "repository": "string", "ref": "string" }, "role": "primary", "authority": "mutable" } ] }, "repositoryDeclarationNotDelivered": { "reason": "harness_does_not_attest_session_root_v1", "extraRepositories": 0 }, "gitIdentity": { "name": "string", "email": "string", "committerName": "string", "committerEmail": "string" }, "gitTrailers": [ "string" ], "kits": {} }, "gitCredentials": [ { "token": "string", "cloneUrl": "string", "expiresAt": "2019-08-24T14:15:22Z" } ]}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).