---
title: "GET /api/experimental/persistent-pty/{ptyID}"
method: GET
path: "/api/experimental/persistent-pty/{ptyID}"
tags: ["persistentPty"]
---

# GET /api/experimental/persistent-pty/{ptyID}

`GET /api/experimental/persistent-pty/{ptyID}`

## Request

- Base URL: `https://opencode.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://opencode.ai/api/experimental/persistent-pty/{ptyID}`
- Auth: none required

## Path parameters

- `ptyID` string, required

## Response `200`

Success

- object
  - `data` PersistentPtyInfo, required
    - `id` string, required
    - `title` string, required
    - `command` string, required
    - `args` string[], required
    - `cwd` string, required
    - `status` 'running' | 'exited', required
    - `pid` integer, required
    - `exitCode` integer
    - `sessionID` string, required
    - `foregroundProcess` string, nullable, required
    - `size` object, required
      - `cols` integer, required
      - `rows` integer, required
    - `output` object, required
      - `head` integer, required
      - `tail` integer, required

## Other responses

- `400`: InvalidRequestError
- `401`: UnauthorizedError
- `404`: PtyNotFoundError
- `503`: ServiceUnavailableError

## Changes

> 50 revisions in range; 1 not diffed.

- **2026-10-28** `079d83620443`: 1 info
  - api operation id `server.experimental.persistentPty.get` removed and replaced with `experimental.persistentPty.get`

[Operation history](https://skmtc.dev/kaaass/apis/opencode/changes/api/experimental/persistent-pty/:ptyID/get.md)

---

[API](https://skmtc.dev/kaaass/apis/opencode.md) - [All operations](https://skmtc.dev/kaaass/apis/opencode/llms.txt) - [OpenAPI document](https://skmtc.dev/kaaass/apis/opencode/revisions/4e083d954707?raw)
