Hanzo AI
OpenapiAgents

List control

Returns the steering commands (pause/resume/stop/message) recorded against the caller's own session that are newer than the cursor, oldest first, with the…

GET /v1/agents/sessions/{id}/control

Addresshttps://api.hanzo.ai/v1/agents/sessions/{id}/control
MethodGET
Operationget_agents_sessions_by_id_control
AuthAuthorization: Bearer $HANZO_API_KEY

Returns the steering commands (pause/resume/stop/message) recorded against the caller's own session that are newer than the cursor, oldest first, with the cursor to poll from next. It is how a locally started hanzo code session — which is not task-backed, so nothing forwards its commands to an execution engine — consumes what the dashboard posted. Read-only and bounded at 200 per poll, so a steady poll is cheap and an applied command is never redelivered.

Request

2 fields.

FieldInTypeRequiredDescription
idpathstringyesID is the session whose commands are being drained, from the path.
afterqueryinteger—After is the last seq this poller applied; only commands newer than it come back.

Response

StatusBodyMeaning
200controlDrainok

200 body — 6 fields.

FieldInTypeAlwaysDescription
commandsbodycontrolCommandView[]—Commands is the session's control commands newer than the cursor, oldest first.
commands[].commandbodystring—Command is what was asked, from a closed four: pause, resume, stop, message.
commands[].messagebodystring—Message is the text that came with the command: what to say into the run for message, and the cancellation reason for stop. Up to 16 KiB.
commands[].payloadbodyany—Payload is the structured half a caller sent instead of (or beside) Message, embedded as JSON.
commands[].seqbodyinteger—Seq is this command's position in the session's log — the same monotonic number every other turn is ordered by, so a command sits in the transcript where it…
cursorbodyinteger—Cursor is the seq to send as after on the next poll — the highest seq in this page, or the cursor sent in when the page is empty.

Failure carries the platform error shape — see Errors.

Examples

hanzo agents sessions control <id>

Agents API · All Hanzo APIs · Interactive reference

How is this guide?

On this page