Error Recovery Pattern
This pattern lets users correct AI errors, undo actions, or fix missteps.
🧭 Domain: Recovery ⏱️ Effort: 5-minute fix
Problem
Mistakes happen — sometimes due to the user, sometimes due to AI. But if users can't recover, they're stuck or forced to restart.
Solution
Provide undo, edit, and correction mechanisms that let users fix problems without losing progress.
Implementation Example
Pseudocode: Framework-agnostic code showing the core logic and approach. Adapt the syntax and methods to your specific technology stack.
// Pseudocode:
// Let user edit their last input
function editLastInput(messageId) {
const message = findMessage(messageId);
setEditingMessage(message);
reopenInputField(message.content);
}
function undoLastAction() {
const lastAction = actionHistory.pop();
revertAction(lastAction);
updateUI(previousState);
}
🧠 What this does: Lets users undo a previous action or correct an earlier input without restarting the whole interaction.
Try this:
Testing Checklist
- □Undo/edit available in current and previous steps
- □System updates AI response after correction
- □Errors don't carry forward after fix
- □No punishment for revising input
- □Works gracefully in mobile and slow connections
Related Patterns
User Control Recovery Pattern
This pattern gives users control over AI suggestions, recommendations, and automated actions.
View Pattern→Delegation Recovery Pattern
This pattern allows users to transfer AI tasks to human support when needed.
View Pattern→Exit Recovery Pattern
This pattern ensures users can easily stop, cancel, or exit AI interactions at any point.
View Pattern→Crisis Mode Recovery Pattern
This pattern provides emergency fixes for when AI systems are actively failing users and require immediate intervention.
View Pattern→