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). Message-scoped events also carry messageId; most events carry a turnId.
Tool events
kind is tool_call.started, tool_call.completed, or tool_call.failed. These carry a toolCallId and a payload describing the tool call.
payload:
status is one of input-streaming, input-available, output-available, output-error, output-denied, approval-requested, approval-responded.
itemType classifies the timeline entry for rendering. Possible values: user_message, assistant_message, reasoning, plan, command_execution, file_change, file_read, mcp_tool_call, dynamic_tool_call, collab_agent_tool_call, web_search, web_fetch, image_view, task_tracking, subagent_invocation, review_entered, review_exited, context_compaction, error, unknown.
Message and stream events
assistant_message and thinking arrive as token deltas followed by a completion. These carry messageId and turnId.
assistant_message.delta
Turn lifecycle events
A turn is one agent step. These carry aturnId.
turn.awaiting_input additionally carries pendingInputId and toolCallId, and its payload names the tool requesting input:
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 conversation messages over REST — history is not replayed on the socket.