Rensei docs

Claim an issue for a stage, with the claim record as the atomic lock.

Inserts a claim row (one live claim per issue+stage - the atomic primitive; a stale lease-expired row is cleared first), verifies the issue belongs to the project's own tracker team, confirms it is at the stage entry status, then advances it to the in-progress status with a checked (not compare-and-swap) tracker write. Refuses claim_exists/status_not_at_entry/lost_race (409), a cross-project issue or stage/tracker configuration problem (422), tracker_unavailable (503, the claim row was released and a retry is safe - the tracker was never touched), or write_unconfirmed (503, the write call was issued and may have landed but the confirming re-read failed - check the tracker's actual state before retrying; the row is marked lost, not released, precisely because a naive retry is NOT guaranteed safe here).

POST
/api/projects/{projectId}/issues/{issueId}/claim

Authorization

headerAuthorizationBearer <WorkOS user access token>

WorkOS user access token created by the Rensei CLI. The authenticated organization is resolved from membership and may be narrowed with X-Rensei-Org.

Path Parameters

projectId*string

The project id.

issueId*string

The tracker-native issue identifier, e.g. "TEAM-123".

Request Body

application/json
  1. body
stageId*string

A canonical stage id from src/lib/worker-fleet/dispatch/stage-vocabulary.ts (research | backlog-writer | development | qa | acceptance | refinement), or a project-defined custom stage.

Length1 <= length
claimant?string

Persona handle or user id. Defaults to the authenticated caller.

Length1 <= length

Response Body

The issue was claimed and advanced to the in-progress status.

application/json
  1. response
claim*
Example Request
curl -X POST 'https://app.rensei.ai/api/projects/string/issues/string/claim' \  -H 'Content-Type: application/json' \  -d '{  "stageId": "string"}'
Example Response
{  "claim": {    "id": "string",    "organizationId": "string",    "projectId": "string",    "issueId": "string",    "stageId": "string",    "claimant": "string",    "createdBy": "string",    "observedStatus": "string",    "writtenStatus": "string",    "status": "claimed",    "claimedAt": "string",    "leaseExpiresAt": "string",    "releasedAt": "string",    "releaseReason": "string",    "createdAt": "string",    "updatedAt": "string"  }}