Variant
session-update
A single item in [agent.prompt-turn.updates]'s stream.
Variants follow the sessionUpdate discriminator in the JSON
wire protocol.
variant session-update {
user-message-chunk(content-block),
agent-message-chunk(content-block),
agent-thought-chunk(content-block),
tool-call(tool-call-snapshot),
tool-call-update(tool-call-snapshot),
plan(plan),
current-mode-update(session-mode-id),
session-info-update(session-info-update),
available-commands-update(list<available-command>),
usage-update(usage-update),
}Cases
| Case | Payload | Description |
|---|---|---|
| user-message-chunk | content-block | |
| agent-message-chunk | content-block | |
| agent-thought-chunk | content-block | |
| tool-call | tool-call-snapshot | A new tool call has been initiated. Emitted automatically
when a [tools.tool-call] resource is constructed. |
| tool-call-update | tool-call-snapshot | An update to an existing tool call. Emitted automatically
when [tools.tool-call.update] is invoked. The snapshot
carries the tool-call's post-update state. |
| plan | plan | |
| current-mode-update | session-mode-id | |
| session-info-update | session-info-update | |
| available-commands-update | list<available-command> | |
| usage-update | usage-update | Token usage for the session context, so the client can show
a "context %" indicator (context % = used / size). |