pub struct TurnPreemptedMessage {
pub reason: String,
pub preempted_by_uuid: String,
pub preempted_message_uuids: Vec<String>,
pub uuid: String,
pub session_id: String,
pub extra: Map<String, Value>,
}Expand description
system/turn_preempted — the CLI itself stopped the running turn so a
user’s rapid follow-up message is answered at once, exactly as a priority
now message would have (running shell commands are backgrounded, not
killed). Sent at the moment of the stop, so it precedes the stopped turn’s
result frame (terminal_reason aborted_streaming or aborted_tools)
and its members’ cancelled command_lifecycle frames: a host renders
that turn as superseded by the follow-up rather than as interrupted, does
not resend its messages, and treats only preempted_by_uuid as picked
up. At most one per burst. Emitted in -p/SDK sessions only, and only to
a consumer that declared rapidFollowupPreempt on its initialize request
while the feature’s rollout flag is on (CLI 2.1.273+).
Fields§
§reason: StringWhy the turn was stopped. rapid_followup: the user’s next message
arrived before the running turn showed any output. More reasons may
be added; treat an unknown one the same way.
preempted_by_uuid: StringThe client-supplied uuid of the queued user message the turn was stopped for. It runs next, together with any messages queued behind it.
preempted_message_uuids: Vec<String>The client-supplied uuids of the user messages the stopped turn was running (uuid-less members omitted; may be empty).
uuid: String§session_id: String§extra: Map<String, Value>Trait Implementations§
Source§impl Clone for TurnPreemptedMessage
impl Clone for TurnPreemptedMessage
Source§fn clone(&self) -> TurnPreemptedMessage
fn clone(&self) -> TurnPreemptedMessage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more