Skip to main content
GET
Read a session's terminal.

Authorizations

Authorization
string
header
required

The token from api.json on the loopback listener; the remote token from remote.json (rakumux remote token) on the remote listener.

Headers

X-Rakumux-Session-Id
string

Act as this session (with X-Rakumux-Session-Token).

X-Rakumux-Session-Token
string

The session's RAKUMUX_SESSION_TOKEN.

X-Rakumux-Agent
string

Act for the session that bound this agent's conversation (with X-Rakumux-Agent-Conversation), e.g. opencode. Not with the session headers.

Pattern: ^[a-z0-9_-]{1,32}$
X-Rakumux-Agent-Conversation
string

The agent's conversation id, e.g. OpenCode's ses_….

Path Parameters

id
string
required

Opaque session id (letters, digits, -, _). Never derive anything from it.

Pattern: ^[A-Za-z0-9_-]{1,128}$

Query Parameters

source
enum<string>
default:screen

screen: the visible screen. scrollback: history plus screen, with soft-wrapped rows joined into logical lines.

Available options:
screen,
scrollback
lines
integer

Keep the last N lines. Default for scrollback is 200; screen returns every row.

Required range: 1 <= x <= 10000
format
enum<string>
default:text

text: plain, rows joined by \n. ansi: SGR-formatted, rows joined by \r\n.

Available options:
text,
ansi

Response

The terminal content.

session_id
string
required
source
enum<string>
required
Available options:
screen,
scrollback
format
enum<string>
required
Available options:
text,
ansi
text
string
required

Terminal output. Untrusted.

rows
integer
required
cols
integer
required
cursor
object
required
truncated
boolean
required

More lines existed than were returned.

untrusted
boolean
required