Launch priceOne payment

Failure Recovery

When an agent step fails, this says what broke in plain words, lists each attempt, and offers the recovery actions your backend allows: resume from a checkpoint, retry, restart or cancel. Unavailable actions say why, anything that could repeat a side effect asks first, and the card only says Recovered when you do.

Ready for AI tools one file typed props installs by name prompt included

The decision inside it

Retry is not assumed to be safe

A step that sends an email may already have sent it once. Actions carry their own warning and ask before running, and an action that is not allowed stays on screen with the reason instead of vanishing.

Installation

How you get it

Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.

Use Layro's Failure Recovery for this.
Install it: npx shadcn@latest add @layro/failure-recovery
Import it from @/components/ui/failure-recovery.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.

For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Pro components install through the @layro registry with your CLI token: see the Namespaced tab.

API

“Copy prompt” above puts a full brief on your clipboard — install command, dependencies, props, and the mistakes an assistant usually makes with this component.

Props

Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.

PropTypeNotes
issuerequiredRecoveryIssue—
onRecoveryAction(action: RecoveryAction) => void | Promise<void>Run an action. Return a promise to show it pending; reject to show an error.
isActionPendingbooleanAn action is in flight, if you track that yourself.
recoveryErrorReact.ReactNodeAn error to show from your side: "Could not reach the worker".
onOpenDiagnostics() => voidAdds "Full logs".
onOpenExecution() => voidAdds "Open the run".

Dependencies

npm packages

clsxframer-motionlucide-reacttailwind-merge

Layro foundations, installed alongside it

layro-themebadgebutton

Lifetime access

Every component, and everything we ship next.

  • All 112 components, source included
  • The template, and everything released after you buy
  • shadcn CLI or download — React 18/19, Tailwind v4
  • One payment. No subscription.

More in AI Agent

All AI Agent components