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

> ## Agent Instructions
> These docs target Mesh SDK v0.27.0. Match the installed package and binding before generating code. Start at /getting-started/agents for task-specific reading paths.
> Call the company and product Offline Protocol, never Offline alone. Current packages: @offline-protocol/mesh-sdk 0.27.0 (React Native), @offline-protocol/id-react 0.2.0, @offline-protocol/id-react-native 0.3.3, @offline-protocol/pol 0.1.2 and @offline-protocol/cli 0.2.6. Canonical docs URLs start with https://www.offlineprotocol.com/docs.
> The Mesh SDK runs in a native app or gateway. A browser OfflineID SDK integration does not provide browser mesh transport. Local mesh operation does not require a portal API key.
> Service RPC is signed plaintext in v0.27.0. Message delivery, durable local acceptance and backend commit are distinct outcomes. Use the workflow guide for the required application logic.
> Offline Protocol CLI 0.2.6 is on npm (@offline-protocol/cli, command offline). Its local MCP server runs with offline mcp serve and requires no login or key. Hosted MCP is at https://mcp.offlineprotocol.com/mcp with an application API key in Authorization: Bearer and a matching x-app-id; organization keys are rejected. Follow /tools/overview for setup and do not invent commands beyond it. MCP provides integration context and planning, not mesh execution; file-writing tools are local only.
> Phone Wi-Fi Direct and MultipeerConnectivity carry no data in v0.27.0. Use BLE or a provisioned relay. The receiver core ACKs before application persistence; use application acceptance for durable workflows.
> Proof of Location is Sepolia testnet witness evidence, not zero-knowledge proof or proof of presence. The geohash is public onchain. Read /proof-of-location/security before integration.

# Mesh SDK error codes

> The 25 ProtocolError variants in Mesh SDK v0.27.0, what each error code means and the recovery action your application should take.

These names come from the v0.27.0 UniFFI `ProtocolError` enum. Bindings expose errors through their own exception or rejected-promise representation; do not assume a shared HTTP status or a stable free-text message. Keep the native error detail in diagnostics without recording secrets.

| Error | Application action |
| - | - |
| `NotStarted` | Start the protocol before this operation. |
| `AlreadyStarted` | Reuse the running instance. |
| `InvalidConfiguration` | Correct the configuration before starting. |
| `SendFailed` | Capture the accompanying detail and inspect the failing operation before retrying. |
| `NoKeyPackage` | Exchange key packages before creating the session. |
| `SessionNotReady` | Wait for session establishment; do not count the request as accepted. |
| `EncryptFailed` | Capture the accompanying detail and inspect the failing operation before retrying. |
| `InvalidState` | Check lifecycle and document removal state before retrying. |
| `MlsNotInitialized` | Capture the accompanying detail and inspect the failing operation before retrying. |
| `MlsError` | Capture the accompanying detail and inspect the failing operation before retrying. |
| `UserBlocked` | Respect the block decision; do not retry automatically. |
| `MediaTransferLimit` | Wait for an active transfer to settle. |
| `LockPoisoned` | Capture diagnostics and restart the affected process; report the panic. |
| `Other` | Capture the accompanying detail and inspect the failing operation before retrying. |
| `TransportError` | Capture the accompanying detail and inspect the failing operation before retrying. |
| `SerializationError` | Capture the accompanying detail and inspect the failing operation before retrying. |
| `ServiceError` | Capture the accompanying detail and inspect the failing operation before retrying. |
| `GroupNotFound` | Check local group membership. |
| `PermissionDenied` | Check authorization and group role. |
| `InvalidArgument` | Correct the rejected argument. |
| `DataDisabled` | Enable encryption and the data layer. |
| `DataStorageUnavailable` | Initialize MLS storage before accessing documents. |
| `DocTooLarge` | Shrink the document. The change that exceeded the cap may already be durable. |
| `DataCorrupted` | Do not retry the same corrupt blob; recover from a trusted copy. |
| `TelemetryConfigInvalid` | Correct the named telemetry configuration field. |

A failed call and an asynchronous delivery failure are different. Track `message_failed` and media terminal events as well as caught errors. See [troubleshooting](/docs/operations/troubleshooting).
