Skip to main content

List open shells

Returns every shell on the runtime, including shells that have exited and not yet been removed.
Responds with {"sessions": [PtySession, ...]}.

Describe a shell

Returns a PtySession. Poll this when you want to know whether a shell has exited without holding a stream open.

Resize the shell

Changes the terminal size so full-screen programs redraw.

Send a signal

Signals the shell’s process directly.
Names are accepted with or without the SIG prefix. Only these four signals are permitted.
Writing \x03 with send input interrupts the foreground job and leaves the shell running. This call signals the shell process itself. Use input for Ctrl-C. Use this call when you need to act on the shell no matter what is running in it.

Stop a shell

Stop the shell and free its scrollback and its slot in the per-runtime limit.
Shells also stop when the runtime is stopped or deleted. Stop a shell yourself when the runtime stays up and you open one per task.

Endpoint

GET /v1/agents/runtime/{runtime_id}/pty GET /v1/agents/runtime/{runtime_id}/pty/{session_id} POST /v1/agents/runtime/{runtime_id}/pty/{session_id}/resize POST /v1/agents/runtime/{runtime_id}/pty/{session_id}/signal DELETE /v1/agents/runtime/{runtime_id}/pty/{session_id}