> ## Documentation Index
> Fetch the complete documentation index at: https://www.voiceflow.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Recover interrupted conversations

> Handle Voiceflow mobile chat suspension, lost connections and page recreation with an explicit recovery policy and checks for uncertain customer actions.

A mobile app can lose its network, be suspended or have its web content process
terminated while an answer is arriving. Keep the difference between a surviving
page, a recreated page and an uncertain business action visible. This workflow
assumes the [iOS](/docs/guides/channels/mobile/ios) or
[Android](/docs/guides/channels/mobile/android) text-chat installation works.

The widget owns its runtime transport and supported reconnect/replay handling.
The app owns whether the WebView survives and how customers recover when it
does not. Reconnected transport does not prove that an earlier action failed or
that its visible history is complete.

## Define the recovery policy

### 1. Preserve a surviving screen

Have the app developer keep the same WebView while Help remains open. On
foreground return, let that instance recover its transport. Do not reload the
page, initialize a second widget or send another launch automatically.

On iOS, the supplied wrapper leaves `updateUIView` without a reload. On Android,
the supplied Activity forwards `onPause()`/`onResume()` to the view. Neither
keeps the operating system from suspending or terminating it. This is a
foreground chat experience, not background messaging or a notification service.

### 2. Offer an explicit path after page failure

Use a visible load/process-failure state and **Reload support**, as in the
platform examples. Remove/destroy an invalid view before recreating it. Keep
the reload action separate from sending a customer message.

Tell customers that reloading may start a new conversation. Follow the chosen
[retention policy](/docs/guides/channels/mobile/separate-app-conversations);
session storage cannot guarantee survival through process loss. For account
changes, finish logout and isolation before permitting a new load. Do not
restore the previous account's page merely to recover its history.

### 3. Resolve uncertain actions before retrying

If the app lost a reply after the customer requested a business action, check
that action's actual result in your backend/business system. For example, a
support-ticket creation may have succeeded even though its confirmation did
not reach the screen.

Have the integration owner provide a result lookup and duplicate-prevention
policy for writes before enabling them. Do not automatically replay a message
or tool request because the UI timed out. Offer a retry only when the operation
is safe to repeat or you know it did not run. If the result is unknown, direct
the customer to check status or contact support.

For an app-owned native runtime client, implement the canonical
[Errors and recovery](/docs/api-reference/agent-runtime/chat/recovery) behavior
and complete-response handling from Developers. The embedded widget's transport
is not an SSE contract for your native client.

## Test interruptions

1. Start a fresh app conversation and exchange two messages. Background and resume without destroying the view. Check the visible history and send a follow-up.
2. Disable networking while an answer is arriving, restore it and return to Help. Check the eventual reply and follow-up behavior. Do not count a connected indicator alone as success.
3. Recreate the page/Activity and separately terminate the app or web renderer. Check the stated fresh-start or retained-session behavior and the visible recovery action. Repeat on a physical device.
4. Test a controlled write in a sandbox only if your app offers one. Interrupt its reply, inspect the business record and confirm that recovery does not create a duplicate. Otherwise mark write recovery untested.
5. Repeat after an agent, hosted-page or app release. Test a fresh conversation and a surviving older conversation independently.

### Every return starts a new conversation

Check app recreation before changing session identifiers.

Look for page loads on foreground, unstable SwiftUI identity, repeated Compose
factories or Android Activity recreation. The supplied samples intentionally
start fresh after a destroyed view; persistent continuity needs additional
storage and identity work. Do not force one shared user ID as a workaround.

### Messages reappear but the result is uncertain

Check the business outcome separately from replayed display history.

Compare the actual record or operation status with the visible conversation.
A replayed message, mounted UI or successful transport handshake does not
establish whether a business write completed. Stop automatic retries and use
the operation owner's result/duplicate policy.

### The view cannot recover

Replace failed web content and keep recovery explicit.

Use iOS navigation/process callbacks or Android's renderer-gone callback to
show a failure state. Android requires discarding the failed WebView. Check the
hosted URL and network before recreating it. If recreation fails, offer your
existing support route; never bypass certificate errors or expose credentials.
