Rensei docs
API ReferenceWorker Protocol

Get queued session detail for cloud runners

Lets a cloud runner-in-box (e2b/modal/daytona) fetch its session detail from the platform rather than the local daemon control API (`127.0.0.1:7734/api/daemon/sessions/:id`), which does not exist inside a cloud sandbox. The provisioner stamps `DONMAI_DAEMON_URL=<platform-url>` into the box's env so `donmai agent run` fetches its detail here. Source of truth is the Redis `work:items` hash. The full payload is available **only while the session is still QUEUED** - it is deleted on claim. Auth: bearer worker token (runtime JWT or legacy `WORKER_API_KEY`). The response includes `authToken`, system prompts, repo URL, and org ID - not readable without authentication.

GET
/api/daemon/sessions/{id}

Authorization

workerJwt
headerAuthorizationBearer <JWT>

Short-lived worker runtime JWT minted by the platform. Claims bind the worker, project, organization, registration, and scopes.

Path Parameters

id*string

Session ID (trackerSessionId / linearSessionId).

Response Body

Session work payload with enriched repository and kit info.

application/json
  1. response
sessionId*string
issueId*string
issueIdentifier*string
priority*integer
queuedAt*integer

Unix timestamp (ms).

prompt?string
providerSessionId?string
workType?AgentWorkType
Value in"research""backlog-creation""development""inflight""inflight-coordination""qa""acceptance""refinement""refinement-coordination""coordination""qa-coordination""acceptance-coordination""merge""security"
workTypeRole?string

Role resolved from the organization's work-type registry; omitted when unresolved.

Value in"intake""inflight""review""terminal"
sourceSessionId?string
projectName?string
repository?string

Canonical GitHub clone URL injected by the platform (e.g. https://github.com/owner/repo.git).

ref?string

Existing remote branch the runner checks out and retains as the working/push branch. Absent on new-branch work. Equals the repository declaration's primary source ref exactly when a declaration is present.

repositoryDeclaration?

Session-root-v1 multi-repository declaration (present only for new-branch work when the project binds two or more GitHub repositories and the worker attests session-root-v1). Each repository is cloned into its own subdirectory of the work area; the primary entry's source equals repository, and its ref is the item's ref verbatim ("" on new-branch work, so the runner creates agent/<session> in every mutable leaf).

repositoryDeclarationNotDelivered?

Marker recorded when the project binds extra repositories the worker cannot receive. Closed reason: the harness does not attest session-root-v1, the item is not new-branch work (ref or continuePullRequest set), the bindings fail the runner's leaf rules, or a binding is not GitHub-backed. The session runs flat on the primary repository.

gitIdentity?
gitTrailers?array<string>

Platform-configured attribution trailer lines (commit-message trailer entries, e.g. Co-Authored-By: ...) the runner appends to every commit the session produces.

kits?

Donmai-shaped toolchain demand for kit installation (omitted when empty).

platformUrl?string

Platform base URL for result-poster and heartbeat.

Formaturi
organizationId?string
linearSessionId?string
Example Request
curl -X GET 'https://app.rensei.ai/api/daemon/sessions/string'
Example Response
{  "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": {},  "platformUrl": "http://example.com",  "organizationId": "string",  "linearSessionId": "string"}