---
title: "GET /api/sessions/{id}/state"
method: GET
path: "/api/sessions/{id}/state"
tags: ["Ai.Tlbx.MidTerm.OpenApi"]
---

# GET /api/sessions/{id}/state

`GET /api/sessions/{id}/state`

## Path parameters

- `id` string, required

## Query parameters

- `includeBuffer` boolean
- `includeBufferBase64` boolean

## Response `200`

OK

- SessionStateResponse
  - `session` SessionInfoDto, required
    - `id` string, required
    - `pid` integer, required
    - `createdAt` string, date-time, required
    - `isRunning` boolean, required
    - `exitCode` integer, nullable, required
    - `cols` integer, required
    - `rows` integer, required
    - `shellType` string, required
    - `name` string, nullable, required
    - `terminalTitle` string, nullable, required
    - `topic` string, nullable, required
    - `notes` string, nullable, required
    - `manuallyNamed` boolean, required
    - `currentDirectory` string, nullable, required
    - `foregroundPid` integer, nullable, required
    - `foregroundName` string, nullable, required
    - `foregroundCommandLine` string, nullable, required
    - `foregroundDisplayName` string, nullable, required
    - `foregroundProcessIdentity` string, nullable, required
    - `agentAttachPoint` SessionAgentAttachPoint, required
      - `provider` string, required
      - `transportKind` string, required
      - `endpoint` string, required
      - `sharedRuntime` boolean, required
      - `source` string, required
      - `preferredThreadId` string, nullable, required
    - `order` integer, required
    - `parentSessionId` string, nullable, required
    - `bookmarkId` string, nullable, required
    - `spaceId` string, nullable, required
    - `workspacePath` string, nullable, required
    - `surface` string, nullable, required
    - `isAdHoc` boolean, required
    - `agentControlled` boolean, required
    - `appServerControlOnly` boolean, required
    - `profileHint` string, nullable, required
    - `appServerControlResumeThreadId` string, nullable, required
    - `hasAppServerControlHistory` boolean, required
    - `supervisor` SessionSupervisorInfoDto, required
      - `state` string, required
      - `profile` string, required
      - `needsAttention` boolean, required
      - `attentionReason` string, nullable, required
      - `attentionScore` integer, required
      - `lastInputAt` string, date-time, nullable, required
      - `lastOutputAt` string, date-time, nullable, required
      - `lastBellAt` string, date-time, nullable, required
      - `currentHeat` number, double, required
  - `previews` WebPreviewSessionInfo[], required
    - `sessionId` string, required
    - `previewName` string, required
    - `routeKey` string, required
    - `url` string, nullable, required
    - `active` boolean, required
    - `targetRevision` integer, required
  - `bufferByteLength` integer, required
  - `bufferEncoding` string, required
  - `bufferText` string, nullable, required
  - `bufferBase64` string, nullable, required
  - `terminalTransport` TerminalTransportDiagnosticsDto, required
    - `sourceSeq` string, required
    - `muxReceivedSeq` string, required
    - `mthostIpcQueuedSeq` string, required
    - `mthostIpcFlushedSeq` string, required
    - `ipcBacklogFrames` integer, required
    - `ipcBacklogBytes` integer, required
    - `oldestBacklogAgeMs` integer, required
    - `scrollbackBytes` integer, required
    - `lastReplayBytes` integer, required
    - `lastReplayReason` string, nullable, required
    - `reconnectCount` integer, required
    - `dataLossCount` integer, required
    - `lastDataLossReason` string, nullable, required
    - `recoveryRequested` integer, required
    - `recoveryCoalesced` integer, required
    - `recoveryCompleted` integer, required
    - `recoveryResets` integer, required
    - `recoveryReplayBytes` integer, required
    - `recoveryFailed` integer, required
  - `supervisor` SessionSupervisorInfoDto, required
    - `state` string, required
    - `profile` string, required
    - `needsAttention` boolean, required
    - `attentionReason` string, nullable, required
    - `attentionScore` integer, required
    - `lastInputAt` string, date-time, nullable, required
    - `lastOutputAt` string, date-time, nullable, required
    - `lastBellAt` string, date-time, nullable, required
    - `currentHeat` number, double, required

## Changes

- **2026-07-10** `6afde53f08e1` — 6 info
  - added the required property `terminalTransport/oneOf[#/components/schemas/TerminalTransportDiagnosticsDto]/recoveryCoalesced` to the response with the `200` status
  - added the required property `terminalTransport/oneOf[#/components/schemas/TerminalTransportDiagnosticsDto]/recoveryCompleted` to the response with the `200` status
  - added the required property `terminalTransport/oneOf[#/components/schemas/TerminalTransportDiagnosticsDto]/recoveryFailed` to the response with the `200` status
  - added the required property `terminalTransport/oneOf[#/components/schemas/TerminalTransportDiagnosticsDto]/recoveryReplayBytes` to the response with the `200` status
  - …2 more
- **2026-05-13** `f43ccea8bcc5` — 1 info
  - added the required property `session/topic` to the response with the `200` status
- **2026-05-10** `ec6725586e43` — 3 breaking, 3 info
  - removed the required property `session/hasLensHistory` from the response with the `200` status
  - removed the required property `session/lensOnly` from the response with the `200` status
  - removed the required property `session/lensResumeThreadId` from the response with the `200` status
  - added the required property `session/appServerControlOnly` to the response with the `200` status
  - …2 more
- **2026-05-06** `885b13067692` — 1 info
  - added the required property `session/notes` to the response with the `200` status
- …earlier changes not shown

[Full history](https://skmtc.dev/tlbx-ai/apis/tlbx-api/changes/api/sessions/:id/state/get.md)

---

[API](https://skmtc.dev/tlbx-ai/apis/tlbx-api.md) · [All operations](https://skmtc.dev/tlbx-ai/apis/tlbx-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/tlbx-ai/tlbx-api/revisions/04072327b4e0/schema)
