Snapshot of in-flight execution shells, urgency-ordered.
Snapshot of in-flight execution shells, urgency-ordered. - Rensei REST API operation reference.
AuthorizationBearer <rsk_live_*>Rensei API key presented as Authorization: Bearer rsk_live_. Required API-key scopes are recorded per operation in x-rensei-required-scopes.
scope?stringDefault org. project requires projectId. user CHANGED MEANING. It used to mean "shells I am recorded as owning, inside the org this session is currently pointed at" — a page-local filter on a derived owner, which answered empty for most callers. It now means "shells I am ALLOWED TO SEE, across every org and project I am a member of": a real server-side union over the caller’s org memberships, independent of the active-workspace cookie or X-Rensei-Org header. Membership is the filter; ownership is not a filter at all. Under this scope the row gains orgSlug, projectSlug and handledAt, the response gains partial, ordering is strict creation order, and cursor is <createdAt>|<shell id> rather than a timestamp. Machine principals (org-scoped API keys) cannot enumerate a person’s memberships and are rejected. org and project scope are unchanged.
"org""project""user"projectId?stringRequired when scope=project. Under scope=user it is a repeatable NARROWING filter (never widening) and may be given several times or comma-separated.
org?stringscope=user only. Narrow the union to these organizations, by id or slug. Repeatable or comma-separated. Omitted ⇒ every membership.
state?stringscope=user only. Ruled filter-bar state: blocked (a human is blocking), active, review, completed, closed. Repeatable or comma-separated. Page-local filter — it narrows the page, not total. Because the filter is applied to a page that was already bounded, a page may legitimately return shells: [] with a NON-NULL cursor: continue on the cursor, never on the array length, or matching rows past the first page are unreachable.
type?stringscope=user only. Inbox kind: dispatch, interactive, inference — the legacy class words typed_dispatch and workflow_run are accepted as aliases (?type=dispatch ≡ ?type=typed_dispatch). Repeatable or comma-separated. Page-local filter. Because the filter is applied to a page that was already bounded, a page may legitimately return shells: [] with a NON-NULL cursor: continue on the cursor, never on the array length, or matching rows past the first page are unreachable.
tiers?stringComma-separated urgency tiers, e.g. 1,2. Page-local filter. Not accepted under scope=user — use state, which is the ruled vocabulary.
limit?integer1 <= value <= 200cursor?stringPrevious page’s cursor. Under org/project scope this is an ISO-8601 latestActivityAt; under scope=user it is the opaque creation keyset this endpoint returned — pass it back verbatim. It is not a bare timestamp and it may carry a partial: prefix recording organizations an earlier page could not read; parsing or constructing it by hand will lose that.
Shells plus the true in-scope total. org/project scope: urgency-ordered (tier-major, activity-descending). user scope: strict creation order, newest first, tie-broken on shell id — the one order two independent snapshots reproduce, because a row never moves because its status changed. PAGING CONTRACT: cursor is the only end-of-list signal. shells may be empty while cursor is non-null — every page-local filter (state, type) thins the page without moving where the next one resumes — so a client must keep paging until cursor is null and must never infer completion from shells.length.
application/json- response
shells*array<>cursor*string|nulltotal*integerTrue in-scope count — render "N of M". Under scope=user this is the TRUE UNION total across every org leg that answered; an org named in partial contributes nothing to it.
-9007199254740991 <= value <= 9007199254740991snapshotAt*stringpartial?array<>scope=user only, and always present under it (empty array when the union is complete). Organizations whose leg of the union could not be read. The response carries every other org’s rows rather than failing whole — a partial answer is labelled, never presented as a complete one. A failure STICKS TO THE WALK: the cursor carries the failed org ids forward, so every later page of the same pagination keeps reporting them (with reason: earlier_page_failed) instead of silently reading complete once the cursor has moved past that org’s unread rows. To recover the missing rows, restart from page 1 with no cursor.
curl -X GET 'https://app.rensei.ai/api/execution-shells'{ "shells": [ { "id": "string", "kind": "session", "inboxKind": "dispatch", "class": "typed_dispatch", "harness": "string", "orgId": "string", "projectId": "string", "owner": { "kind": "user", "id": "string", "source": "string" }, "title": "string", "status": "pending", "rawStatus": "string", "urgencyTier": 1, "signals": { "pendingApproval": true, "needsInput": true, "interviewAwaiting": true, "interviewOrphaned": true, "inReview": true, "hasUnreadMessage": true }, "ask": { "id": "string", "kind": "approval", "text": "string", "workflowName": "string", "openedAt": "string", "fromHandle": "string" }, "needs": "approval", "inboxOpenCount": -9007199254740991, "closed": true, "closedReason": "ended", "tracker": { "provider": "string", "issueId": "string", "trackerSessionId": "string" }, "costUsd": 0, "costSource": "cost_events", "publicSessionId": "string", "issueKey": "string", "sessionHarness": "string", "toolCallCount": 0, "runningCostUsd": 0, "statusClause": "queued", "latestEntry": { "at": "string", "actor": "string", "tool": "string", "text": "string" }, "peer": { "presence": "live", "deliveryTier": "durable" }, "lineage": { "rootSessionId": "string", "parentSessionId": "string", "depth": -9007199254740991, "childCount": -9007199254740991, "childNeedsYou": -9007199254740991 }, "liveness": "live", "latestActivityAt": "string", "lastAgentOutputAt": "string", "createdAt": "string", "startedAt": "string", "workflowInstanceId": "string", "sessionId": "string", "suspendedGateNodeId": "string", "errorSummary": "string", "placement": { "poolNames": [ "string" ], "degraded": true, "unsatisfiableCount": -9007199254740991, "decisionCount": -9007199254740991 }, "triggerType": "string", "workflowName": "string", "a2aHandle": "string", "execution": { "poolName": "string", "hostAlias": "string", "provider": "string", "source": "string" }, "beacon": { "stepText": "string", "updatedAt": "string" }, "stageLabel": "string", "projectLabel": "string", "modelLabel": "string", "orgSlug": "string", "projectSlug": "string", "handledAt": "string" } ], "cursor": "string", "total": -9007199254740991, "snapshotAt": "string", "partial": [ { "orgId": "string", "reason": "string" } ]}Counts-only snapshot of in-flight execution shells for the page header.
Same org/project scope and entitlement rules as `GET /api/execution-shells`, answered as three integers instead of a page: `total` (the same count that route reports as `total`), `active` (normalized status `running`) and `queued` (normalized status `pending`). No `shells` array, no side-signal joins (interviews, approval gates, cost rollup, placement) - one small `GROUP BY status` aggregate per producer table.
Time-ordered conversation projection for one execution shell.
One projection for every shell kind: session activities (agent text, tool entries, system errors), user steers with delivery state, approval asks and decisions, system lifecycle entries with the dispatch receipt last on terminal shells, and inline peer (a2a) entries with their text preview - never the full body. Peer entries are on by default; `peers=0` hides them. Interactive shells with no activities carry the live PTY tail in the top-level `tail` field (observe-fenced, never paged). The shell’s organization is resolved from the shell, not from the caller’s active workspace. A caller who cannot see the shell receives 404.