Retry / failure card
Communicates a failure without panic. The cause, the attempts spent, and the next actions are visible without expanding anything.
Included in the single kansho full pack. Components are not offered as separate installs.
Network failure — retryable
Static preview callbacks show the available recovery actionsStripe API timed out
attempt 3/5Request to stripe.invoices.list timed out after 5s. The previous two attempts also timed out.
Permission failure — needs human
Static preview: Escalate does not change demo statePermission denied: postgres.write
attempt 1/1The current scope grants read access to invoices but not write. A scope escalation is required to mark invoices as paid.
error: permission denied for table invoices at Connection.parseE (pg/lib/connection.js:614:13) at Connection.parseMessage (pg/lib/connection.js:464:19)
Usage
Guidance- State the cause plainly, then offer Retry as the in-place next step.
- Show attempt / maxAttempts so the operator knows how many tries remain.
- Tuck the raw trace behind a disclosure — cause first, detail on demand.
- Say 'sorry' or 'invalid' — name the problem and the next step.
- Escalate silently — offer onEscalate when retry is exhausted.
- When to use
- A recoverable step failure where a retry or escalation is the next move.
- When not to
- A terminal outage — use the provider-outage notice with a countdown.
Accessibility
Keyboard & screen readerKeyboard
- Tab
- Move focus to the trace disclosure and the Retry / Escalate buttons.
- EnterSpace
- Toggle the trace or activate a button.
Announces
- The trace toggle exposes aria-expanded so its open state is announced.
Props
API reference| Prop | Type | Description |
|---|---|---|
| titlerequired | string | What failed, in plain language. |
| causerequired | string | Why it failed — the actionable line. |
| attempt | number | Current attempt number. |
| maxAttempts | number | Total attempts allowed. |
| trace | string | Raw stack trace, shown behind a disclosure. |
| onRetry | () => void | Renders the Retry action. |
| onEscalate | () => void | Renders the Escalate action. |
Included components
This page is the canonical destination for these components. All ship in the single Kansho pack.
Retry failure card
components/agent/retry-failure-card.tsxComponent documentation
Retry failure card
components/agent/retry-failure-card.tsxPurpose
Presents a failed operation with cause, attempt count, optional trace, retry, and human escalation.
Appropriate use
Use when a recoverable agent failure needs both technical detail and a clear next action.
Example
components/agent/retry-failure-card.tsx has a representative live example in the "Network failure — retryable" section on /components/retry-failure.
States
Supports optional attempt/max count, collapsed or expanded trace, retry-only, escalation-only, both actions, or no action.
API and props
RetryFailureCard accepts title, cause, attempt, maxAttempts, trace, onRetry, onEscalate, and className.
Dependencies
Direct imports are React, Lucide icons, Button, and cn.
Accessibility
The trace trigger exposes aria-expanded and aria-controls; recovery controls are native buttons and decorative icons are hidden.
Limitations
It does not retry, escalate, redact trace content, or announce callback outcomes; the host owns those operations.
Source
Source: components/agent/retry-failure-card.tsx.
Full pack
components/agent/retry-failure-card.tsx is documented at /components/retry-failure and installs only through the single Kansho full pack; no individual component install is offered.