Skip to content

Wait for a pane's program to exit

GET
/api/panes/{pane_id}/exit
Code sample: Shell / cURL
curl --request GET \
--url http://127.0.0.1:8004/api/panes/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/exit \
--header 'Authorization: Bearer <token>'

Waits until the pane’s program (its command, or its shell) exits and returns its status; for a pane kept open, once its output ended and its exit line was written. A pane that closed in the last 5 minutes (at most the last 256 closed) reports the status it closed with; a waiter already waiting always gets it.

pane_id
required
string format: uuid

Pane ID

timeout_ms
integer format: int64

Milliseconds: 10 minutes by default, at most an hour.

The exit status once the program exits, or the wait times out

Media typeapplication/json
object
status

The program’s exit status, 128 + N if signal N ended it; null if it hasn’t exited, or its pane closed before it reported one.

integer | null format: int32
timed_out
required

The wait ended before the program exited.

boolean

Example generated

{
"status": 1,
"timed_out": true
}

A malformed ID or query parameter

Media typetext/plain
string

Missing or wrong access token

Media typetext/plain
string

The request’s Host or Origin isn’t allowed, or the caller can’t use this route (a guest token, or btmux connect)

No such pane, or it closed too long ago

Media typetext/plain
string

The pane’s shell hasn’t started, as no client showed the pane

Media typetext/plain
string

The server is shutting down

Media typetext/plain
string