Streaming Events
When Claude responds, content is streamed in real-time viasdk_message events. This page documents all streaming event types.
Event Flow
1
Client sends message
User message sent via
sdk_message2
Streaming Response
Server streams
sdk_message events with text chunks. If Claude invokes a tool, a tool_use event is sent, followed by tool_call for execution. Client responds with tool_result, then streaming continues.3
Result
Server sends final
result event with complete response and usage statsText Events
Text content streamed as it’s generated:text fields to build the full response.
Thinking Events
Extended thinking content (when enabled):Tool Use Events
When Claude decides to use a tool:Tool Call Request
After a tool use event, the server sends atool_call requesting execution:
tool_result.