# Version 2.5.9 AI Reply Send Hardening

This patch fixes the case where the customer reply shows in the lead dashboard, but the customer does not receive an AI SMS response.

## What changed

### 1. AI failures now produce a fallback reply

If OpenAI/reply generation fails, the app no longer stops after saving the inbound message. It logs the error and sends a safe fallback SMS.

Log:

[AI extraction/reply failed; using fallback reply]

### 2. Customer SMS sends are logged and retried

Every customer-facing reply now goes through one helper:

sendCustomerReply()

It logs:

- [Customer SMS reply attempt]
- [Customer SMS reply sent]
- [Customer SMS reply send returned null]
- [Customer SMS reply send failed]

The app retries once after 1.5 seconds.

### 3. Failed outbound attempts are visible in dashboard

If TextBee rejects/skips the outbound reply, the lead conversation gets a visible message:

[SMS FAILED - CUSTOMER DID NOT RECEIVE] ...

The lead is also marked needs_owner_review.

## Why this matters

Before this patch, a failure inside AI generation or customer SMS send could leave the inbound customer message saved, but no reply sent and not enough dashboard evidence.

Now the dashboard and app.log will show exactly what happened.
