Get session

GET/v1/sessions/{id}
Retrieves a session by its unique identifier. machineId is only an explicit borrowed-machine pin, not an inventory of owned or inherited machines. Use GET /v1/sessions/{id}/machine/info to read caller-visible stored effective machine metadata without provisioning or waking a machine; a null binding there does not prove guest absence.

Authorization

header

Authorization: Bearer <token>

An access token from Settings → Access tokens, with the scopes this call needs. Authentication

Path parameters

idstringrequired
TypeID with prefix "asess_".

Responses

An agent sessionapplication/json

idstringrequired
Unique session identifier
organizationIdstringrequired
Organization this session belongs to
teamIdstring | nullrequired
Team this session belongs to
createdBystring | null
statusstringrequired
Runtime status of the session. provisioning means setup is in flight, idle means no turn is running, working means a turn is in flight, and failed means provisioning failed terminally. Lifecycle (archive/restore) is signaled by archivedAt, not status.
Value in
"pending" | "idle" | "running" | "failed"
typestringrequired
Immutable session kind assigned at creation.
Value in
"default" | "review" | "memory" | "agent" | "assistant" | "background"
statusDetailSessionStatusDetail | null
Who or what unblocks an idle session (user, session or event; absent when nothing is awaited), an open-text kind refining it (question, plan-review, approval, reply, done, error, ...), and a short user-facing label. error marks a recoverable root-turn failure while the coarse runtime status remains idle; failed is reserved for terminal runtime failure. Readers must tolerate unknown kinds: the closed waitingOn bucket alone decides attention treatment.
archivedAtstring | nullrequired
When the session was archived, or null if not archived
machineIdstring | null
Explicitly borrowed machine, when attached to an existing workspace. Null does not mean the session has no machine: owned, forked and inherited machines are resolved separately. Read GET /v1/sessions/{id}/machine/info for caller-visible stored effective machine metadata, not live guest liveness.
forkedFromobject | null
projectIdstring | null
TypeID with prefix "proj_".
environmentIdstring | null
TypeID with prefix "env_".
parentSessionIdstring | null
TypeID with prefix "asess_".
namestringrequired
Human-readable display name for the session
isMineOrSharedboolean
Whether the current viewer created this session or is in its collaborator roster. Browsing classification only, not an access grant.
visibilitystring
Value in
"private" | "organization"
createdAtstringrequired
updatedAtstringrequired
lastRepliedAtstring | null
lastUsedAtstringrequired
lastActivityAtstring | null
tagIdsarray<string>
Ids of the tags applied to this item, in ascending id order. Resolve names and colors from the organization's tag list (GET /v1/tags).
pullRequestIdsarray<string>
collaboratorsarray<SessionItemCollaborator>
repositoriesarray<SessionItemRepository>
slackChannelsarray<SessionItemSlackChannel>
machineSessionItemMachine | null