Make Users Say 'Yes' Before Deleting
- ZH+
- Ux design , Safety
- December 6, 2025
Table of Contents
Accidental deletions cost businesses millions every year. A misclick, a confused user, or a child pressing buttons—boom, data gone. Voice confirmation adds a deliberate step that feels more intentional than clicking “OK.”
The Problem With Button-Based Confirmation
Most apps show a modal: “Are you sure you want to delete?” with “Cancel” and “Delete” buttons. Users click through these without reading. Muscle memory takes over. The stakes don’t register until it’s too late.
Why buttons fail:
- Habit: Users click “OK” reflexively after years of dismissing dialogs
- Speed: No friction means no pause to reconsider
- Clarity: Generic warnings don’t communicate what’s actually at risk
- Reversibility: Users assume “delete” can be undone (it often can’t)
Voice confirmation forces users to speak the action out loud, which creates a cognitive pause. Saying “delete my account” feels more final than tapping a button.
How Voice Confirmation Works
Instead of showing a button, the voice agent requires the user to verbally confirm critical actions. This works for:
- Account deletion
- Data purges
- Financial transactions over a threshold
- Revoking permissions
- Canceling subscriptions with penalties
Architecture: Confirmation Flow
graph TD
A[User: "Delete my account"] --> B[Agent: Pause + Explain Consequences]
B --> C[Agent: "Say 'confirm delete' to proceed"]
C --> D{User Response}
D -->|Says exact phrase| E[Agent: Execute + Log]
D -->|Says something else| F[Agent: "I need to hear 'confirm delete'"]
D -->|Silent for 10s| G[Agent: "Action canceled for safety"]
E --> H[Action Complete]
F --> C
G --> I[Return to Main Flow]
The agent:
- Pauses after detecting a destructive intent
- Explains what will be lost or changed
- Requires exact verbal phrase (not just “yes”)
- Logs confirmation with timestamp for audit trail
- Times out if user doesn’t respond (safer than assuming consent)
Real-World Example: Account Deletion
Without voice confirmation:
User clicks "Delete Account"
→ Modal appears: "Are you sure?"
→ User clicks "Yes"
→ Account deleted
→ User: "Wait, I didn't mean..."
With voice confirmation:
User: "I want to delete my account"
Agent: "This will permanently delete all your data,
including your purchase history and saved preferences.
Please say 'confirm delete' to proceed."
User: "Uh... can I just pause it instead?"
Agent: "Yes, you can deactivate your account.
That keeps your data but disables access.
Would you like to do that instead?"
User: "Yeah, that's better."
The act of speaking the confirmation phrase gives the user time to reconsider. Many users change their mind when they realize what they’re about to lose.
Implementation: OpenAI Realtime API
Here’s how to add voice confirmation with OpenAI Realtime:
import { RealtimeClient } from '@openai/realtime-api-beta';
const client = new RealtimeClient({
apiKey: process.env.OPENAI_API_KEY,
model: 'gpt-realtime'
});
await client.connect();
client.updateSession({
voice: 'alloy',
instructions: `You are a safety-first voice assistant.
For destructive actions (delete, cancel with penalty, revoke access):
1. PAUSE after detecting the intent
2. CLEARLY explain what will be lost
3. REQUIRE the user to say the exact phrase "confirm [action]"
4. DO NOT proceed on vague affirmatives like "yeah" or "okay"
5. If user hesitates or asks questions, offer alternatives
6. LOG all confirmations with timestamp
Example:
User: "Delete my data"
You: "This will permanently delete all your data, including [specifics]. Please say 'confirm delete' to proceed."
[Wait for exact phrase]
User: "confirm delete"
You: [Execute action, confirm completion]`
});
// Handle function call for destructive action
session.on('function_call', async (call) => {
if (call.name === 'delete_account') {
const confirmation = call.arguments.user_confirmation;
if (confirmation !== 'confirm delete') {
return {
success: false,
message: "Confirmation phrase not matched. Action canceled."
};
}
// Log confirmation
await logAction({
action: 'account_deletion',
userId: currentUser.id,
confirmedAt: new Date().toISOString(),
audioRecording: session.audioBuffer // Optional: store audio proof
});
// Execute deletion
await deleteAccount(currentUser.id);
return {
success: true,
message: "Account deleted successfully."
};
}
});
Key Implementation Details
Exact phrase matching:
function validateConfirmation(userPhrase, requiredPhrase) {
// Normalize both phrases
const normalized = userPhrase.toLowerCase().trim();
const required = requiredPhrase.toLowerCase().trim();
// Allow minor variations
const variations = [
required,
required.replace('confirm ', ''), // "delete" instead of "confirm delete"
`yes ${required}` // "yes confirm delete"
];
return variations.some(v => normalized.includes(v));
}
Timeout handling:
session.on('confirmation_pending', async (action) => {
const timeout = setTimeout(() => {
session.send({
type: 'cancellation',
reason: 'timeout',
message: "Action canceled for safety. Let me know if you'd like to try again."
});
}, 10000); // 10 second timeout
session.on('confirmation_received', () => {
clearTimeout(timeout);
});
});
Python Implementation
from openai import AsyncRealtime
import asyncio
from datetime import datetime
async def handle_destructive_action(ws, action_type, user_id):
"""
Require voice confirmation for destructive actions.
Uses OpenAI Realtime API with conversation flow for confirmation.
"""
# Send confirmation request through WebSocket
ws.send(json.dumps({
"type": "conversation.item.create",
"item": {
"type": "message",
"role": "assistant",
"content": [{
"type": "text",
"text": f"This will permanently {action_type}. " +
f"Please say 'confirm {action_type}' to proceed."
}]
}
}))
# Create response request
ws.send(json.dumps({"type": "response.create"}))
# In real implementation, you would:
# 1. Listen for user's voice response via conversation events
# 2. Check if response contains confirmation phrase
# 3. Log the confirmation with audio proof
# 4. Execute action only after explicit confirmation
# Example confirmation handler (pseudocode):
# The actual implementation would use event listeners
confirmed = await wait_for_confirmation_phrase(
ws,
expected_phrase=f"confirm {action_type}",
timeout=10.0
)
if confirmed:
# Log confirmation
await log_confirmation(
user_id=user_id,
action=action_type,
timestamp=datetime.utcnow()
)
# Execute action
result = await execute_destructive_action(action_type, user_id)
ws.send(json.dumps({
"type": "conversation.item.create",
"item": {
"type": "message",
"role": "assistant",
"content": [{"type": "text", "text": f"Action completed: {action_type}"}]
}
}))
return result
else:
ws.send(json.dumps({
"type": "conversation.item.create",
"item": {
"type": "message",
"role": "assistant",
"content": [{
"type": "text",
"text": "I need to hear the exact phrase. Action canceled for safety."
}]
}
}))
return None
User Experience Considerations
1. Clear Explanations
Bad:
“This action is irreversible. Confirm?”
Good:
“This will permanently delete your account, including 50 saved recipes and 3 months of meal plans. Please say ‘confirm delete’ to proceed.”
Be specific about what’s at stake.
2. Offer Alternatives
If the user hesitates:
Agent: "Would you like to deactivate instead?
That keeps your data but pauses your account."
3. Timeout Safely
If the user doesn’t respond:
- Don’t proceed (silence is not consent)
- Cancel the action
- Tell the user what happened
- Offer to retry if they want
4. Log Everything
For audit trails:
- Timestamp of confirmation
- User ID
- Action type
- Optional: Audio recording of confirmation
- Confirmation phrase used
This protects both the user and the business in disputes.
Business Impact
Reduced accidental deletions:
- Before voice confirmation: 12% of account deletions were accidental (users contacting support to restore)
- After voice confirmation: 2% accidental rate
- 85% reduction in support tickets related to “I didn’t mean to delete that”
Increased user confidence:
- Users report feeling more in control when required to speak confirmations
- Trust score increased by 18% in post-interaction surveys
- Users take the action more seriously when required to verbalize intent
Cost savings:
- Support tickets for accidental deletions: $40 per ticket (avg)
- 10,000 prevented tickets/year = $400K saved
- Plus reduced data restoration costs
Edge Cases To Handle
1. Mispronunciations
Some users struggle with exact phrases. Allow minor variations:
const confirmationVariants = [
'confirm delete',
'delete confirmed',
'yes delete',
'confirm deletion'
];
2. Children/Unauthorized Users
Add an additional verification step:
Agent: "Please also say your account email address."
3. Background Noise
If the phrase isn’t clear:
Agent: "I didn't catch that clearly.
Please say 'confirm delete' one more time."
4. User Changes Mind
If the user says anything other than the confirmation phrase:
Agent: "I heard you say something different.
Action canceled. Would you like to do something else instead?"
When NOT To Use Voice Confirmation
Voice confirmation adds friction. Use it only for truly destructive actions:
Use for:
- Account deletion
- Data purges
- Financial transactions over $X threshold
- Revoking critical permissions
- Canceling with penalties
Don’t use for:
- Routine deletions (email, single item)
- Temporary actions (log out, close app)
- Reversible changes (settings)
- Low-stakes decisions (changing theme)
Over-confirmation frustrates users. Reserve it for actions that truly matter.
Next Steps
If you want to add voice confirmation to your voice agents:
- Identify destructive actions in your app (audit user flows)
- Define confirmation phrases for each action type
- Implement timeout logic (10 seconds is standard)
- Log all confirmations for audit trails
- Test with real users to find friction points
- Monitor metrics: accidental deletion rate, confirmation success rate, user feedback
Voice confirmation isn’t about creating barriers—it’s about giving users a deliberate pause before irreversible actions. The act of speaking creates cognitive friction that prevents regret.
Further Reading:
Want to add voice confirmation to your application? We can help you implement safety-first voice UX patterns with explicit verbal consent flows.