ToolFailure

One call failed. The error, the attempt count, and a retry that doesn't restart the turn.

Install it:

npx shadcn add @ambientui/tool-failure

Live

fetch timed out

Behavior

  • ·The attempt count is the honest part: "1/3" tells the user a retry is already policy, not a suggestion.
  • ·Skip exists because a failed call is often not fatal to the answer — forcing a retry to continue is how a transient blip becomes a dead conversation.
  • ·The error is quoted verbatim in mono on the destructive wash; a paraphrased error is a second bug to debug.
  • ·Scoped to the call, not the turn: the surrounding answer keeps its own state.
  • ·Report (onFeedback) opens the same FeedbackDialog the message actions use, inline under the failure — what went wrong from the user's side is captured at the moment they know it, in the ambient visual language rather than a detached modal.

When to use

  • ·Any tool call that failed inside an otherwise live turn.

When not to

  • ·When the whole generation stopped — that is ErrorState.
  • ·For expected empty results; "no matches" is an answer, not a failure.