agent channel is a one-way live feed of a task’s events. The client only subscribes and unsubscribes; the server streams task_event messages as the agent works. See the WebSocket overview for connecting.
Client to Server
subscribe
Attach this connection to a task’s live event stream. You then receive every task_event for that task until you unsubscribe or disconnect.
unsubscribe
Detach from a task’s stream.
Server to Client: task_event
Every server message on the agent channel has type: "task_event". A kind field discriminates what happened. All events carry taskId and an optional createdAt (ISO 8601). Every turn-owned event carries a required, non-zero UUID conversationTurnId; conversation.truncated and slash_commands.updated are task-level events and carry none. Message-scoped events also carry messageId; most events carry a provider turnId.
Canonical tool updates
Tool cards are read from the API conversation-turn activity endpoint, not synthesized from WebSocket events. Subscribe totask_read_model_revisions and refetch the turn summaries and revision-keyed activity when it changes, including after reconnect. A result observed by a later execution updates the card in its original conversation turn.
Message and stream events
assistant_message and thinking arrive as token deltas followed by a completion. These carry the durable conversationTurnId, plus messageId and turnId.
assistant_message.delta
Turn settlement
Turn completion, failure, and pending input are authoritative task/conversation read-model state, not agent WebSocket announcements. Refresh canonical conversation snapshots on task revision changes. Keep accepted content visible until the same snapshot includes its durable replacement; an older revision cannot clear a newer execution’s content. Respond to pending input over REST (see below).Other events
Each slash command has
name, description, and an optional input hint.
Driving a Task
The agent channel is receive-only. To act on a task, use the REST API:
There is no public SSE or task-stream endpoint. Live task events reach clients only over this WebSocket. For prior conversation history, fetch turn summaries and per-turn activity over REST — history is not replayed on the socket.