Skip to content
Français

FallbackEvent

  • kindRequired
    "fallback"
    Event type selecting the payload: phase, summary, warning, text, text-delta, result, prompt, tool, tool-result, tool-output, tool-denied, file-change, reasoning, step, hook, instructions-loaded, skills-loaded, model-route, model-request, model-response, model-retry, model-error, stop-prevented, steer, compaction, subagent, conversation, usage, message-usage, quota, fallback, stderr, stopped, failure, finished or raw.
  • fromRequired
    FallbackCandidate
    Candidate that stopped in a fallback event: its position, adapter name and model name when one was selected.
  • toRequired
    FallbackCandidate
    Candidate that takes over in a fallback event: its position, adapter name and model name when one was selected.
  • failureRequired
    FallbackTrigger
    Category that ended the previous candidate in a fallback event: quota or unavailable.
  • messageRequired
    string
    Message of a warning, failure, quota, fallback, model-retry or model-error event, or the message a stop hook sent back to the model on stop-prevented.
  • resetAtOptional
    string | undefined
    ISO timestamp at which a quota or fallback event says the usage or rate limit resets; present only when reported in structured form.
  • subagentIdOptional
    string | undefined
    Identifier of the built-in child that emitted the event; absent for the root harness. Lifecycle events link that identifier to the delegating tool call.
export type FallbackEvent = Extract<
  AgentEvent,
  {
    readonly kind: "fallback";
  }
>;