Poll for queued work
Atomically pops and pre-claims work items from the priority queue (ZPOPMIN). Also returns inbox messages for the worker's active sessions. Workers that receive `preClaimed: true` must NOT make a separate claim call. Runtime-JWT callers also receive `gitCredentials` (short-lived GitHub PAT) and optionally `batchWork` (code-survival scan items, gated on the `code-survival-scan` capability).
AuthorizationBearer <JWT>Short-lived worker runtime JWT minted by the platform. Claims bind the worker, project, organization, registration, and scopes.
id*stringWorker ID (must match the sub claim of the runtime JWT).
Poll result (may have empty work).
application/json- response
work*array<>Pre-claimed work items. Workers must NOT separately call the claim endpoint.
preClaimed*booleanTrue when work is non-empty (all items already claimed server-side).
claimedSessionIds*array<string>gitCredentials*array<>Short-lived GitHub PAT credentials for the project's repos.
batchWork?array<>Code-survival batch scan items (only present for workers with code-survival-scan capability).
kgExtractWork?array<>Knowledge-graph extraction items (only present for workers with KG_EXTRACT capability and kg_fleet_extraction feature flag enabled).
landingWork?array<>Merge-queue landing items (only present for workers with LANDING_CAPABILITY and merge_queue_landing flag enabled).
curl -X GET 'https://app.rensei.ai/api/workers/string/poll'{ "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": {} } ], "preClaimed": true, "claimedSessionIds": [ "string" ], "gitCredentials": [ { "token": "string", "cloneUrl": "string", "expiresAt": "2019-08-24T14:15:22Z" } ], "batchWork": [ {} ], "kgExtractWork": [ {} ], "landingWork": [ {} ]}AF-compatible worker heartbeat
Updates `activeCount` on the worker's Redis record and resets its TTL. An optional closed, redacted HarnessConnection inventory report may be submitted only with a runtime worker JWT; it contains configured connection refs plus live evidence, never host-supplied connection configuration. Registration tokens remain valid for inventory-free bootstrap heartbeats but receive a typed 403 when inventory is present. A hosted runtime supplies the exact complete D12 sessionShim projection; the platform returns that same non-secret projection only after stable-host/controller/revision/quarantine and durable receipt authority match. The optional Donmai proof-v2 readiness shape is all-or-none and echoed only; it does not independently authorize a cutover or activation. Missing, stale, or changed publication leaves the host recovering. Returns pending work queue depth.
Refresh expired runtime JWT
Refresh expired runtime JWT - Rensei REST API operation reference.