Skip to content

Wait for an agent

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

Pane ID

states
string

Comma-separated agent states; default idle,done,blocked.

timeout_ms
integer format: int64

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

The agent’s status once it settles, exits, or the wait times out

Media typeapplication/json
object
status
One of:

None once the agent has exited.

object
state
required

Lifecycle states for an agent occupying a pane.

This intentionally follows Herdr’s small semantic vocabulary. Failure and permission details belong in the accompanying message/notification instead of multiplying lifecycle states.

string
Allowed values: unknown idle working waiting blocked done
agent
string | null
source
string | null
message
string | null
background

Background work the agent’s screen shows, such as “2 shells, 1 monitor”.

string | null
timed_out
required
boolean

Example

{
"status": {
"state": "unknown"
}
}

An unknown state, or no states; or 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

Media typetext/plain
string

The server is shutting down

Media typetext/plain
string