ClaudeAgentSDK.InterruptReceipt (claude_agent_sdk v0.18.0)

Copy Markdown View Source

Typed result of an interrupt control request (upstream interrupt_receipt_v1, CLI 2.1.205+).

still_queued lists the UUIDs of queued async user messages that survive the interrupt: commands still in the queue, plus any batch already dequeued for the imminent turn but not yet reachable by the abort. These will still run unless cancelled first.

Older CLIs acknowledge interrupts without a payload; the receipt then has an empty still_queued. Feature-detect via the interrupt_receipt_v1 entry in the system/init frame's capabilities (see ClaudeAgentSDK.Message.capability?/2).

Summary

Functions

Builds a receipt from the inner control-response payload.

Types

t()

@type t() :: %ClaudeAgentSDK.InterruptReceipt{raw: map(), still_queued: [String.t()]}

Functions

from_response(payload)

@spec from_response(map() | nil) :: t()

Builds a receipt from the inner control-response payload.

still_queued entries are filtered to strings (matching the TypeScript SDK); a missing or malformed payload yields an empty receipt.