agent.message event. Enable it when you create the Session:
Endpoints
The paths do not change:| API | Incremental behavior |
|---|---|
GET /api/v1/cloud/sessions/{session_id}/events/stream | Live Session SSE stream |
GET /api/v1/cloud/sessions/{session_id}/threads/{thread_id}/stream | Live thread-scoped SSE stream |
GET /api/v1/cloud/sessions/{session_id}/events | Historical Session event replay |
GET /api/v1/cloud/sessions/{session_id}/threads/{thread_id}/events | Historical thread-scoped replay |
incremental_streaming_enabled is false or omitted, these APIs keep the original behavior and hide incremental events.
Event Model
Public events align with qodercli/Anthropic raw stream events. CAW emits raw stream event types such asmessage_start and content_block_start; CAS exposes them publicly by adding the agent. prefix to type and by adding CAS metadata such as id, session_id, session_thread_id, turn_id, message_id, parent_tool_use_id, and processed_at.
Top-level incremental event types:
agent.content_block_delta.delta.type. They are not top-level event types.
In the current implementation, agent.content_block_start.content_block.type can be:
content_block.type | Meaning |
|---|---|
thinking | Thinking block with initial empty thinking |
text | Text block with initial empty text |
tool_use | Tool-use block with id, name, and initial empty input |
delta.type | Meaning |
|---|---|
text_delta | Text output chunk |
thinking_delta | Thinking chunk, when emitted by the model/provider |
signature_delta | Signature chunk for thinking blocks, when available |
input_json_delta | Tool input JSON chunk. The product-level tool_input_delta concept uses this wire shape, with partial_json |
tool_output_delta | Reserved for future tool output streaming. The current implementation does not emit this delta; tool results still return as full agent.tool_result events |
agent.message is still returned after the incremental sequence and remains the authoritative final result. For the same text block, appending text_delta.text in order should equal the final agent.message.content[index].text; if the provider omits a final suffix from stream chunks, CAW emits the remaining suffix as a final text_delta before agent.content_block_stop.
Quick Verification
Prerequisites:- A valid PAT in
QODER_PAT - An existing Agent ID in
AGENT_ID - An existing Environment ID in
ENVIRONMENT_ID jqinstalled locally
Disabled Control
Create another Session withoutincremental_streaming_enabled, or set it to false. The response should include:
user.message, stream and history should contain full events such as agent.message and session.status_idle, but not the incremental event types listed above.
Parser Checklist
- Treat SSE
event:and JSONdata.typeas the public event type. - Reconstruct text by appending
agent.content_block_delta.delta.textfor events whosedelta.typeistext_delta. - Reconstruct thinking by appending
agent.content_block_delta.delta.thinkingfor events whosedelta.typeisthinking_delta; a full compatibilityagent.thinkingevent may still arrive later. - For tool input increments, check
delta.type == "input_json_delta"and appenddelta.partial_json; do not expect a top-leveltool_input_deltaevent. tool_output_deltais not emitted yet; tool execution results return as fullagent.tool_resultevents.- Track
indexto keep multiple content blocks separate. - Treat
processed_atas optional on agent-generated events. - Keep listening after
session.status_idleif the client supports multiple turns on the same connection. - Reconnect with
Last-Event-IDafter network drops.