---
title: "Read output after a cursor, or follow it live."
method: GET
path: "/v1/sandboxes/{id}/processes/{processId}/output"
tags: ["commands"]
---

# Read output after a cursor, or follow it live.

`GET /v1/sandboxes/{id}/processes/{processId}/output`

## Request

- Base URL: `https://api.withruntime.com`
- URL: `https://api.withruntime.com/v1/sandboxes/{id}/processes/{processId}/output`
- Auth: HTTP bearer

JSON: chunks after cursor, nextCursor to pass next time, and the process. waitMs (up to 8000) holds the call until there is output. follow=true streams NDJSON events until exit. The latest 1 MiB is kept; truncated says when the cursor fell behind.

## Path parameters

- `id` string, required: Resource identifier (UUID).
- `processId` string, required: Resource identifier.

## Query parameters

- `cursor` integer
- `waitMs` integer
- `maxBytes` integer
- `follow` boolean

## Response `200`

Success

- object
  - `chunks` object[], required
    - `stream` 'stdout' | 'stderr'
    - `text` string
    - `base64` string
    - `offset` integer
  - `nextCursor` integer, required: Pass as cursor next time.
  - `truncated` boolean, required
  - `droppedBytes` integer
  - `process` object, nullable, required
    - `id` string, required
    - `kind` 'process', required
    - `state` 'running' | 'exited' | 'killed' | 'timed_out' | 'unknown', required
    - `exitCode` integer, nullable, required
    - `command` string, required
    - `user` 'sandbox' | 'root': Who it runs as.
    - `cwd` string
    - `pty` boolean
    - `outputEncoding` 'utf8' | 'base64'
    - `stdinOpen` boolean: Input is still open for :write.
    - `stdinOffset` integer: Bytes of input accepted so far.
    - `startedAt` string, date-time, required
    - `endedAt` string, date-time, nullable
    - `timeoutMs` integer, nullable
    - `outputBytes` integer
    - `firstOffset` integer: The oldest byte still kept.
    - `replayed` boolean
    - `outOfMemory` object: Present only when the sandbox ran out of memory and Linux's out-of-memory killer ended the program or something it started. The exit code alone (-9, or 137 from a shell) does not say why.
      - `code` 'out_of_memory', required
      - `processesKilled` integer, required: Processes of this command the out-of-memory killer ended.
      - `memoryMiB` integer, nullable, required: The sandbox's memory size.
      - `message` string, required
      - `hint` string, required: What to do: a larger memoryMiB, or a program that uses less.

## Other responses

- `default`: Error

---

[API](https://skmtc.dev/withruntime/apis/runtime-cloud-api.md) · [All operations](https://skmtc.dev/withruntime/apis/runtime-cloud-api/llms.txt) · [OpenAPI document](https://skmtc.dev/withruntime/apis/runtime-cloud-api/revisions/6f4012286988?raw)
