turn/completed
Turn terminal: completed | failed | cancelled, with usage and the settled error object.
Parameters
Section titled “Parameters”Type: TurnCompletedParams
turn/completed params: the run’s durable terminal record
landed.
| Field | Type | Stability | Presence | Description |
|---|---|---|---|---|
durationMs |
integer |
optional | Turn duration; absent means unmeasured, never fabricated. | |
error |
TurnError | optional | Present iff terminal is "failed": mid-turn failures reach the client here — never as a JSON-RPC error. |
|
reason |
string |
optional | The runtime’s free-text terminal reason, verbatim. Display and diagnostics only; never branch on it. | |
sessionId |
string |
required | The owning session. | |
sourceRange |
SourceRange | required | The durable records this event folded from. | |
terminal |
TurnTerminal | required | The turn terminal (open enum). | |
timeToFirstTokenMs |
integer |
optional | Time to first token, when measured. | |
turnId |
string |
required | The terminated turn. | |
usage |
TokenUsage | optional | The turn’s aggregate token usage, summed across the turn’s model completions (same shape as session/tokenUsage.usage). |
|
viewCursor |
string |
required | Opaque, strictly monotonic view cursor. |
Source
schema/msp/experimental/msp.schema.json#/notifications/turn~2Fcompleted
{ "description": "Turn terminal: completed | failed | cancelled, with usage and the settled error object.", "params": { "$ref": "#/$defs/TurnCompletedParams" }}