Audio capture data loss: offline sync failures, silent drops, and recording loss
Problem
Users are losing recorded audio across multiple scenarios. The common thread: audio is captured by the device but never becomes a conversation. There is no warning and no recovery in some paths. This is the number one reliability complaint.
Scenario Status (audited 2026-03-30)
| # | Scenario | Status | Child issues | Key PRs | Remaining gap |
|---|---|---|---|---|---|
| S1 | Offline sync uploads audio but fails to create conversations | Significantly fixed | #4669 ✅, #4867 ✅, #4850 | #5994, #6106, #5916, #4869, #6150 | PR #6157 (async pipeline) open; #4850 12h fragmentation still open |
| S2 | Limitless pendant large batch sync fails | Root cause found, fix proposed | #5154 | PR #5924 (open) | Firmware writes diagnostic log pages in audio format; parser must detect and ACK non-audio pages to advance oldestPage. See @brightshore-ventures analysis below. |
| S3 | Audio lost when internet fails while BT stays connected | Not data loss — UX gap | #5159 ✅, #5909 ✅ | #5995, #6058 | WAL captures audio locally (verified on Pixel 7a). Auto-recovery (WAL → auto-sync → transcript) not implemented — requires manual sync. UX gap tracked in #6171 (P1). |
| S4 | Long live recordings lost on BLE disconnect | Significantly fixed | #4816, #5252 | #5796, #6085, #6086, #6067, #5889, #5915 | Native BLE reconnect pipeline deployed. Gap: whether in-progress audio stream resumes seamlessly after BLE reconnect (vs. losing the gap) is not yet validated. |
| S5 | Web recorder loses long sessions | Not addressed | #4805 | — | No PRs. 40 min session loss still reproducible. |
What changed since original filing
S3 capture verified, recovery NOT verified. Kelvin reproduced S3 (#5159) on Pixel 7a with physical Omi device (2026-03-30). WAL captures all audio frames during internet outage (256 WALs, all marked "missing", flushed to disk). However, the repro used a mock WebSocket server — the full recovery path (WAL miss chunks → manual sync → backend processes audio → conversation with gap phrases) was NOT tested against a real backend. #5159 closed for the capture half (works-by-design).
#5909 closed as duplicate of #6171. Reporter @hugoaap-code confirmed they never checked for saved offline audio and clarified the real ask: "I just want to see my conversations in my Convo feed, regardless of whether my connection dropped." WAL captures audio (verified); the gap is auto-recovery UX, not data loss. #6171 upgraded to P1 — auto-recovery from WAL on reconnect is a core product promise.
S1 sync-local-files 504 timeouts addressed. PR #6150 (merged 3/30) adds HTTP_POST_TIMEOUT to TimeoutMiddleware, deployed with 600s timeout on backend-sync. PR #6157 (async pipeline root-cause fix) still open.
S2 root cause identified by @brightshore-ventures. Limitless firmware v1.1.20 writes diagnostic logs to flash pages in the same protobuf format as audio. The parser expects audio (0x12 field), finds logs (0x4a/0x52/0x5a/0x62), returns zero Opus frames, and ACK stalls. PR #5924 (open) implements the fix: detect non-audio pages and ACK them to advance oldestPage.
S4 native BLE pipeline deployed. 6 PRs merged (3/21–3/28) replacing flutter_blue_plus with platform-native BLE module. Reconnection is now native-owned, faster, and more reliable. Remaining validation: does the audio stream resume after BLE reconnect without gap loss?
Child Issues
Open:
- #4850 — 12h offline recording fragmentation and data loss (S1)
- #5154 — Limitless pendant large batch failure (S2)
- #4816 — BLE disconnect during live recording (S4)
- #5252 — 2h silent failure (S4)
- #4805 — Web recorder 40 min loss (S5)
- #6171 — UX: no warning during internet outage, no auto-recovery (S3 UX gap, P1)
Closed:
- #4669 ✅ — Offline sync no conversations (S1, fixed by #5994)
- #4867 ✅ — Offline sync processing errors (S1, fixed by #5994 + #6106)
- #5159 ✅ — Internet drop audio loss (S3, works-by-design: WAL saves audio)
Consolidated (closed as duplicates):
- #5463, #5362, #5561, #5562
Closed:
- #5909 ✅ — Offline recording UI but audio lost (S3, closed as duplicate of #6171 — WAL captures audio, reporter confirmed issue is auto-recovery UX)
User Impact
- Path: Core (record → transcribe → save)
- Active data loss risk: S4 (BLE disconnect gap), S5 (web recorder)
- Mitigated: S1 (sync errors no longer silent), S2 (root cause found, fix proposed), S3 (not data loss — WAL captures, UX gap in #6171 P1)
- Blast radius: Narrowed — S3 was the broadest scenario and is resolved (capture works, auto-recovery is UX)
- Workaround: S2: turn off Limitless pendant before sync. Others: none.
Reporters
- @hugoaap-code — #4669, #4805, #4816, #4850, #4867 (most detailed evidence, multiple scenarios)
- @brightshore-ventures — S2 root cause analysis with dual-capture BLE evidence
- Discord community via @omi-discord-vector — #5154, #5159, #5252
- kelvin-agent — S3 physical device repro confirming WAL works
Backend resilience PRs (cross-cutting, all merged)
- #6025 — Pusher circuit breaker + reconnect state machine
- #5944 — SafeDeepgramSocket auto-keepalive
- #6021 — Unblock event loop during DG WebSocket connect
- #6103 — Remove local fallback blocking event loop, add pusher recovery buffer
- #6150 — HTTP_POST_TIMEOUT in TimeoutMiddleware (sync timeout fix)
Audited 2026-03-30 by AI for @beastoin
Affected user here — I originally filed #5734 (Limitless pendant: clock drift causes duplicate conversations and failed offline sync). Posting trace data here per request.
1. Redacted user UUID: bbXP...tPF3
2. Date and time of most recent failed sync: 2026-03-12T22:08:45Z through 22:24:40Z UTC (five consecutive failed batch downloads in one session)
3. Hours of offline audio: Device reported 12,400–12,575 flash pages (~48 MB). Estimating several hours of Opus-encoded audio. Pendant had been idle ~2 days over the weekend before this sync attempt.
4. App version: Omi AI 1.0.526 (778) — iPhone — iOS 26.3.1 — Limitless Pendant v1.0
What the logs show:
The app reads all flash pages from the device and every single one triggers "Limitless flash page yielded zero Opus frames" — 4,119 warnings for session 51096, pages 966807–967649. Each page contains ~3,750–4,019 bytes of data but the Opus decoder extracts nothing. All five batch download attempts end with filesSaved: 0. The local WAL upload also fails with "Server is temporarily unavailable" on multiple batches. One "Limitless initialization failed" error mid-session, and the codec briefly falls back to pcm8 before reverting to opus_fs320.
Reproduction pattern: This happens weekly after ~2 days of pendant idle time with the Omi app closed on iOS. Consistent with what sevik reported. I have an iOS Shortcuts automation that force-syncs on a schedule as a workaround (described in #5154).
Note on BLE connection state during sync: beastoin’s hypothesis about active BLE connection state during sync aligns with what I see — the device is connected and streaming live audio to the WebSocket at the same time the batch flash page download is running. The log shows transcription_socket_connected events interleaved with the batch download attempts.
Full debug log (2026-03-12, redacted and truncated — 4,119 identical warnings collapsed)
{"timestamp":"2026-03-12T22:07:52.441Z","level":"EVENT","type":"pure_socket_disconnecting","url":"wss://api.omiapi.com/v4/listen?language=en&sample_rate=16000&codec=opus_fs320&uid=[REDACTED_UID]&include_speech_profile=true&stt_service=soniox&conversation_timeout=120&source=limitless&speaker_auto_assign=enabled","current_status":"PureSocketStatus.connected"}
{"timestamp":"2026-03-12T22:07:52.441Z","level":"EVENT","type":"pure_socket_closed","close_code":-1,"close_reason":"unknown","url":"wss://api.omiapi.com/v4/listen?language=en&sample_rate=16000&codec=opus_fs320&uid=[REDACTED_UID]&include_speech_profile=true&stt_service=soniox&conversation_timeout=120&source=limitless&speaker_auto_assign=enabled"}
{"timestamp":"2026-03-12T22:07:52.450Z","level":"EVENT","type":"transcription_socket_closed","close_code":-1}
{"timestamp":"2026-03-12T22:07:52.803Z","level":"EVENT","type":"pure_socket_connected","url":"wss://api.omiapi.com/v4/listen?language=multi&sample_rate=16000&codec=opus_fs320&uid=[REDACTED_UID]&include_speech_profile=true&stt_service=soniox&conversation_timeout=120&source=limitless&custom_stt=enabled&speaker_auto_assign=enabled"}
{"ts":"2026-03-12T22:08:14.852Z","level":"WARN","message":"SyncProvider: user cancelled sync"}
{"timestamp":"2026-03-12T22:08:24.365Z","level":"EVENT","type":"device_connection_state","device_id":"[REDACTED_DEVICE_ID]","state":"disconnected"}
{"timestamp":"2026-03-12T22:08:27.420Z","level":"EVENT","type":"device_connection_state","device_id":"[REDACTED_DEVICE_ID]","state":"connected"}
{"ts":"2026-03-12T22:08:32.011Z","level":"INFO","message":"Limitless device initialized successfully"}
{"timestamp":"2026-03-12T22:08:32.045Z","level":"EVENT","type":"pure_socket_closed","close_code":-1,"close_reason":"unknown","url":"wss://api.omiapi.com/v4/listen?language=multi&sample_rate=16000&codec=opus_fs320&uid=[REDACTED_UID]&include_speech_profile=true&stt_service=soniox&conversation_timeout=120&source=limitless&custom_stt=enabled&speaker_auto_assign=enabled"}
{"timestamp":"2026-03-12T22:08:32.045Z","level":"EVENT","type":"transcription_socket_closed","close_code":-1}
{"timestamp":"2026-03-12T22:08:32.363Z","level":"EVENT","type":"transcription_socket_connected","sample_rate":16000,"codec":"opus_fs320","language":"multi","include_speech_profile":false}
{"timestamp":"2026-03-12T22:08:32.404Z","level":"EVENT","type":"limitless_storage_status","oldestPage":966807,"newestPage":979235,"currentSession":51981,"freePages":82804,"totalPages":95232}
{"ts":"2026-03-12T22:08:45.829Z","level":"INFO","message":"Limitless batch mode enabled"}
# --- 4,119 identical warnings omitted (session 51096, flash pages 966807–967649). 3 samples: ---
{"ts":"2026-03-12T22:08:45.927Z","level":"WARN","message":"Limitless flash page yielded zero Opus frames","extra":{"index":966807,"session":51096,"seq":986346,"flashPageDataSize":3749}}
{"ts":"2026-03-12T22:08:45.964Z","level":"WARN","message":"Limitless flash page yielded zero Opus frames","extra":{"index":966808,"session":51096,"seq":986347,"flashPageDataSize":3904}}
{"ts":"2026-03-12T22:08:45.994Z","level":"WARN","message":"Limitless flash page yielded zero Opus frames","extra":{"index":966809,"session":51096,"seq":986348,"flashPageDataSize":3904}}
# --- (all pages have non-zero data sizes ~3750-4019 bytes but decoder extracts 0 Opus frames) ---
{"timestamp":"2026-03-12T22:09:16.032Z","level":"EVENT","type":"flash_page_download_completed","filesSaved":0}
{"ts":"2026-03-12T22:09:20.116Z","level":"ERROR","message":"Local upload batch failed: Exception: Server is temporarily unavailable","extra":{"batchIndex":7,"filesInBatch":4}}
{"ts":"2026-03-12T22:09:20.115Z","level":"ERROR","message":"Local upload batch failed: Exception: Server is temporarily unavailable","extra":{"batchIndex":7,"filesInBatch":4}}
{"ts":"2026-03-12T22:09:20.251Z","level":"WARN","message":"Local upload cancelled","extra":{"batchesCompleted":0,"batchesFailed":6,"walsRemaining":36}}
{"ts":"2026-03-12T22:09:20.251Z","level":"WARN","message":"Local upload cancelled","extra":{"batchesCompleted":0,"batchesFailed":8,"walsRemaining":30}}
{"timestamp":"2026-03-12T22:09:20.344Z","level":"EVENT","type":"sync_completed","newConversations":0,"updatedConversations":0}
{"timestamp":"2026-03-12T22:09:20.346Z","level":"EVENT","type":"local_upload_finished","batchesCompleted":0,"batchesFailed":8,"corrupted":0,"newConversations":0,"updatedConversations":0}
{"ts":"2026-03-12T22:09:20.408Z","level":"ERROR","message":"Local upload batch failed: Exception: Server is temporarily unavailable","extra":{"batchIndex":1,"filesInBatch":4}}
{"ts":"2026-03-12T22:09:20.436Z","level":"WARN","message":"Local upload cancelled","extra":{"batchesCompleted":0,"batchesFailed":2,"walsRemaining":48}}
{"timestamp":"2026-03-12T22:09:20.462Z","level":"EVENT","type":"local_upload_finished","batchesCompleted":0,"batchesFailed":2,"corrupted":0,"newConversations":0,"updatedConversations":0}
{"ts":"2026-03-12T22:09:20.754Z","level":"ERROR","message":"Local upload batch failed: Exception: Server is temporarily unavailable","extra":{"batchIndex":4,"filesInBatch":4}}
{"ts":"2026-03-12T22:09:20.820Z","level":"WARN","message":"Local upload cancelled","extra":{"batchesCompleted":0,"batchesFailed":5,"walsRemaining":39}}
{"timestamp":"2026-03-12T22:09:20.851Z","level":"EVENT","type":"local_upload_finished","batchesCompleted":0,"batchesFailed":5,"corrupted":0,"newConversations":0,"updatedConversations":0}
{"timestamp":"2026-03-12T22:09:29.297Z","level":"EVENT","type":"wal_initialized","totalWals":7930,"missing":54,"synced":7876}
{"timestamp":"2026-03-12T22:09:30.088Z","level":"EVENT","type":"device_connection_state","device_id":"[REDACTED_DEVICE_ID]","state":"connected"}
{"ts":"2026-03-12T22:09:34.771Z","level":"INFO","message":"Limitless device initialized successfully"}
{"timestamp":"2026-03-12T22:09:34.806Z","level":"EVENT","type":"polling_socket_connected","service_id":"onDeviceWhisper","buffer_duration_ms":5000,"min_buffer_bytes":32000}
{"timestamp":"2026-03-12T22:09:35.701Z","level":"EVENT","type":"transcription_socket_connected","sample_rate":16000,"codec":"opus_fs320","language":"multi","include_speech_profile":false}
{"timestamp":"2026-03-12T22:09:35.857Z","level":"EVENT","type":"limitless_storage_status","oldestPage":966807,"newestPage":979259,"currentSession":51989,"freePages":82780,"totalPages":95232}
{"ts":"2026-03-12T22:09:52.904Z","level":"INFO","message":"SyncProvider: starting sync all WALs","extra":{"totalMissing":55,"sdCardWals":0,"deviceWals":1}}
{"ts":"2026-03-12T22:09:52.939Z","level":"INFO","message":"Limitless batch mode enabled"}
# --- second batch download: 12,453 pages, again filesSaved:0 ---
{"timestamp":"2026-03-12T22:10:54.699Z","level":"EVENT","type":"flash_page_download_completed","filesSaved":0}
{"ts":"2026-03-12T22:10:54.699Z","level":"INFO","message":"Limitless batch mode disabled","extra":{"pendingPagesCleared":0,"pendingFragmentsCleared":1}}
{"ts":"2026-03-12T22:11:26.804Z","level":"INFO","message":"Sync Phase 2: Uploading phone files to cloud"}
{"timestamp":"2026-03-12T22:11:26.867Z","level":"EVENT","type":"local_upload_started","walCount":32}
{"timestamp":"2026-03-12T22:15:02.062Z","level":"EVENT","type":"sync_completed","newConversations":5,"updatedConversations":3}
{"timestamp":"2026-03-12T22:15:53.808Z","level":"EVENT","type":"sync_completed","newConversations":0,"updatedConversations":7}
{"timestamp":"2026-03-12T22:16:05.175Z","level":"EVENT","type":"device_connection_state","device_id":"[REDACTED_DEVICE_ID]","state":"disconnected"}
{"timestamp":"2026-03-12T22:16:12.242Z","level":"EVENT","type":"device_connection_state","device_id":"[REDACTED_DEVICE_ID]","state":"connected"}
{"ts":"2026-03-12T22:16:16.863Z","level":"INFO","message":"Limitless device initialized successfully"}
{"timestamp":"2026-03-12T22:16:17.283Z","level":"EVENT","type":"transcription_socket_connected","sample_rate":16000,"codec":"opus_fs320","language":"multi","include_speech_profile":false}
{"timestamp":"2026-03-12T22:16:17.377Z","level":"EVENT","type":"limitless_storage_status","oldestPage":966807,"newestPage":979317,"currentSession":51993,"freePages":82722,"totalPages":95232}
{"ts":"2026-03-12T22:16:23.593Z","level":"INFO","message":"Sync Phase 1b: Downloading flash page data to phone"}
{"ts":"2026-03-12T22:16:23.615Z","level":"INFO","message":"Limitless batch mode enabled"}
# --- third batch download: 12,511 pages, filesSaved:0 ---
{"timestamp":"2026-03-12T22:16:53.891Z","level":"EVENT","type":"flash_page_download_completed","filesSaved":0}
{"ts":"2026-03-12T22:16:53.891Z","level":"INFO","message":"Sync Phase 2: Uploading phone files to cloud"}
{"timestamp":"2026-03-12T22:16:53.955Z","level":"EVENT","type":"sync_completed","newConversations":0,"updatedConversations":0}
{"timestamp":"2026-03-12T22:17:07.476Z","level":"EVENT","type":"device_connection_state","device_id":"[REDACTED_DEVICE_ID]","state":"disconnected"}
{"timestamp":"2026-03-12T22:17:53.129Z","level":"EVENT","type":"device_connection_state","device_id":"[REDACTED_DEVICE_ID]","state":"connected"}
{"ts":"2026-03-12T22:18:12.408Z","level":"INFO","message":"Limitless device initialized successfully"}
{"timestamp":"2026-03-12T22:18:12.441Z","level":"EVENT","type":"composite_socket_stopping"}
{"timestamp":"2026-03-12T22:18:12.441Z","level":"EVENT","type":"polling_socket_connected","service_id":"onDeviceWhisper","buffer_duration_ms":5000,"min_buffer_bytes":32000}
{"timestamp":"2026-03-12T22:18:12.845Z","level":"EVENT","type":"pure_socket_connected","url":"wss://api.omi.me/v4/listen?language=multi&sample_rate=16000&codec=opus_fs320&uid=[REDACTED_UID]&include_speech_profile=true&stt_service=soniox&conversation_timeout=120&source=limitless&custom_stt=enabled&speaker_auto_assign=enabled"}
{"timestamp":"2026-03-12T22:18:12.980Z","level":"EVENT","type":"limitless_storage_status","oldestPage":966807,"newestPage":979325,"currentSession":51998,"freePages":82714,"totalPages":95232}
# --- fourth batch download: 12,519 pages, filesSaved:0 ---
{"timestamp":"2026-03-12T22:18:34.191Z","level":"EVENT","type":"flash_page_download_started","startPage":966807,"endPage":979325,"totalPages":12519}
{"timestamp":"2026-03-12T22:19:05.184Z","level":"EVENT","type":"flash_page_download_completed","filesSaved":0}
{"timestamp":"2026-03-12T22:20:15.734Z","level":"EVENT","type":"pure_socket_disconnecting","url":"wss://api.omi.me/v4/listen?language=multi&sample_rate=16000&codec=opus_fs320&uid=[REDACTED_UID]&include_speech_profile=true&stt_service=soniox&conversation_timeout=120&source=limitless&custom_stt=enabled&speaker_auto_assign=enabled","current_status":"PureSocketStatus.disconnected"}
{"timestamp":"2026-03-12T22:20:37.686Z","level":"EVENT","type":"composite_socket_connected","primary_status":"PureSocketStatus.connected","secondary_status":"PureSocketStatus.connected"}
{"timestamp":"2026-03-12T22:23:16.192Z","level":"EVENT","type":"wal_initialized","totalWals":7930,"missing":0,"synced":7930}
{"timestamp":"2026-03-12T22:23:54.841Z","level":"EVENT","type":"device_connection_state","device_id":"[REDACTED_DEVICE_ID]","state":"connected"}
{"ts":"2026-03-12T22:23:58.137Z","level":"ERROR","message":"Limitless initialization failed"}
{"timestamp":"2026-03-12T22:23:58.144Z","level":"EVENT","type":"device_connection_state","device_id":"[REDACTED_DEVICE_ID]","state":"disconnected"}
{"timestamp":"2026-03-12T22:24:00.389Z","level":"EVENT","type":"device_connection_state","device_id":"[REDACTED_DEVICE_ID]","state":"connected"}
{"timestamp":"2026-03-12T22:24:00.565Z","level":"EVENT","type":"transcription_socket_connected","sample_rate":16000,"codec":"pcm8","language":"multi","include_speech_profile":false}
{"ts":"2026-03-12T22:24:07.038Z","level":"INFO","message":"Limitless device initialized successfully"}
{"timestamp":"2026-03-12T22:24:07.106Z","level":"EVENT","type":"polling_socket_connected","service_id":"onDeviceWhisper","buffer_duration_ms":5000,"min_buffer_bytes":32000}
{"timestamp":"2026-03-12T22:24:07.116Z","level":"EVENT","type":"limitless_storage_status","oldestPage":966807,"newestPage":979380,"currentSession":52007,"freePages":82659,"totalPages":95232}
{"timestamp":"2026-03-12T22:24:07.979Z","level":"EVENT","type":"transcription_socket_connected","sample_rate":16000,"codec":"opus_fs320","language":"multi","include_speech_profile":false}
{"timestamp":"2026-03-12T22:24:08.196Z","level":"EVENT","type":"limitless_storage_status","oldestPage":966807,"newestPage":979381,"currentSession":52007,"freePages":82658,"totalPages":95232}
{"timestamp":"2026-03-12T22:24:17.212Z","level":"EVENT","type":"sync_started","totalMissingWals":1,"sdcard":0,"flashPage":1,"phone":0}
{"ts":"2026-03-12T22:24:17.212Z","level":"INFO","message":"Sync Phase 1a: Downloading SD card data to phone"}
# --- fifth batch download: 12,575 pages, same zero Opus frames pattern ---
{"timestamp":"2026-03-12T22:24:17.242Z","level":"EVENT","type":"flash_page_download_started","startPage":966807,"endPage":979381,"totalPages":12575}
{"ts":"2026-03-12T22:24:40.463Z","level":"INFO","message":"Limitless batch mode disabled","extra":{"pendingPagesCleared":0,"pendingFragmentsCleared":1}}
S2 Root Cause Found: Limitless pendant large batch sync fails
I've identified the root cause of S2 (Limitless pendant large batch sync fails). The failing flash pages don't contain audio — they contain firmware diagnostic logs.
What's happening
The Limitless firmware (v1.1.20) writes diagnostic logs to flash storage continuously, using the same protobuf page format and session numbering as audio recordings. During idle time, BLE events, or sync operations, the firmware fills pages with:
- RTOS thread status snapshots (
storage_thread_,audio_thread_ha,poll_thread_han, etc.) - Firmware log messages (
<inf> bt_data_comm: Finished batch upload of flash_page) - BLE connection/disconnection events
- Boot sequences, pendant settings, crypto initialization
These pages use protobuf fields 0x4a/0x52/0x5a/0x62 inside 0x1a wrappers. The Omi parser in _extractOpusFramesFromFlashPage() looks for field 0x12 (audio data) inside those wrappers. It never finds any, returns zero Opus frames, and the ACK stalls.
Evidence
Captured the same failed sync simultaneously from both sides:
- Omi app debug log: 70 consecutive "zero Opus frames" warnings,
filesSaved=0 - nRF Connect BLE capture: Firmware reports successful upload for every page
Reassembled and decoded all 70 failing pages (42943–43012) from the raw BLE capture. Every page contains only firmware diagnostics. Zero contain audio data. Examples:
- Page 42943:
Session num:1349 started with err:0,Recording state set to NOT_RECORDING,Device mode set to IDLE_MODE - Pages 42975–42994: The firmware's own log of a previous batch sync — 20 pages of
Finished batch upload of flash_pagemessages - Page 42995: Full boot sequence including
<err> crypto: Server public key missing. Destroying key in case HUK changed. status: -136
No audio was lost — these sessions were never recording.
Why the "turn off pendant" workaround works
Turning off the pendant before sync prevents it from generating new diagnostic log pages during the sync operation. The firmware logs its own sync activity into flash pages, which become the next pages to sync, which the app can't parse, which blocks the ACK. Turning off the pendant breaks this cycle.
Why oldestPage gets stuck / flash fills up
The batch downloader starts from oldestPage and can't ACK past pages with zero Opus frames. If the oldest pages are diagnostic (from an idle session), every sync attempt re-downloads the same unparseable pages and stalls. Flash storage fills monotonically — observed going from 95,179 free to 87,822 free over 2 days with no progress.
Fix
Two changes in limitless_connection.dart and flash_page_wal_sync.dart:
-
Detect non-audio pages: When
_extractOpusFramesFromFlashPage()finds0x1awrappers containing fields0x52/0x5a/0x62but no0x12, classify the page as diagnostic rather than a parse failure. -
ACK diagnostic pages: Include them in the ACK index so
oldestPageadvances. This is safe — no audio is being discarded because these pages never contained audio.
Additional firmware findings
- Crypto key errors on every boot:
<err> crypto: Server public key missing. Destroying key in case HUK changed. status: -136— firmware destroys and regenerates keys on each startup of the Limitless pendant - Self-logging cycle: The firmware writes logs about syncing into flash pages, which then become the next pages to sync, perpetuating the stall
How this was found
Dual-capture analysis — same sync event recorded simultaneously via Omi app debug log and nRF Connect BLE packet capture on characteristic 632DE003-604C-446B-A80F-7963E950F3FB. All 70 failing pages were reassembled from raw BLE fragments and protobuf-decoded to reveal firmware log content instead of audio.
Environment
- Limitless Pendant v1.0, firmware 1.1.20 (nRF53x, MCUboot)
- Omi AI 1.0.526 (778), iPhone, iOS 26.3.1
Related
- #5154 — original Limitless pendant sync failure report
- #5734 — separate issue for clock drift / duplicate conversations (different bug, different fix)
Progress audit (2026-03-29)
Cross-referencing merged PRs against the 5 scenarios. Issue remains open — S2 and S5 are unaddressed, S1/S3 only partially fixed.
S1 — Offline sync uploads audio but fails to create conversations
Status: Partially addressed
- PR #5994 (merged 3/26) — Directly fixes #4867, #4669.
process_segment()errors no longer silently swallowed; endpoint returns HTTP 207 (partial) or 500 (all failed) instead of silent success. - PR #6106 (merged 3/28) — Empty Deepgram transcription now treated as success (no speech), not error. Prevents false 500s on silent audio segments.
- PR #5916 (merged 3/26) — Auto offline sync on device connect. Reduces manual sync step that users were missing.
- PR #4869 (merged 2/19) — Continue syncing remaining WAL batches when one fails. Single bad chunk no longer blocks entire sync.
Remaining gap: Large payload timeouts (#5941 still open — sync-local-files 504s on >120s pipelines) could still lose audio for long recordings.
S2 — Limitless pendant large batch sync
Status: Not addressed No specific Limitless sync PRs found. Workaround (turn off pendant before sync) still required. PR #5924 (brightshore-ventures, open) targets this but is not merged.
S3 — Audio lost when internet fails while BT stays connected
Status: Partially addressed
- PR #5995 (merged 3/28) — WAL support for phone mic recording. Audio buffered locally regardless of network state.
- PR #6058 (merged 3/26) — WAL refactored to be source-agnostic (BLE + phone mic).
Remaining gap: WAL covers phone mic path. For BLE device audio: if internet drops mid-stream, buffered segments may still be lost if the listen→pusher pipeline doesn't recover before the device disconnects. The circuit breaker (#6025) helps but doesn't guarantee zero loss.
S4 — Long live recordings lost on BLE disconnect
Status: Significantly addressed
- PR #5796 (merged 3/21) — Complete native BLE module replacing flutter_blue_plus. Reconnection is now platform-native (faster, more reliable).
- PR #6085 (merged 3/27) — Native-owned BLE connection pipeline. Dart no longer drives discovery/MTU/reconnect.
- PR #6086 (merged 3/28) — BLE reconnect race fixes, CompanionService crash guard, characteristic guards.
- PR #6067 (merged 3/27) — Guard Android BLE race condition (status=5).
- PR #5889 (merged 3/22) — Prevent reconnect after manual disconnect + auto-bond.
- PR #5915 (merged 3/25) — Simplified device_provider with reactive native reconnect.
Remaining gap: If BLE disconnects AND reconnects, the in-progress audio stream should resume. The native BLE pipeline handles reconnection, but whether the audio stream resumes seamlessly (vs. losing the gap) is not explicitly validated.
S5 — Web recorder loses long sessions
Status: Not addressed No web recorder reliability PRs found. #4805 (40 min session loss) remains open.
Backend resilience (cross-cutting)
These merged PRs improve the overall pipeline reliability, benefiting all scenarios:
- PR #6025 (merged 3/25) — Pusher circuit breaker + reconnect state machine + graceful degradation
- PR #5944 (merged 3/25) — SafeDeepgramSocket auto-keepalive (prevents silent DG disconnect)
- PR #6021 (merged 3/25) — Unblock event loop during DG WebSocket connect
- PR #6103 (merged 3/28) — Remove local fallback that blocked event loop, add buffer for pusher recovery
Summary
| Scenario | Status | Key PRs |
|---|---|---|
| S1 — Offline sync failure | Partially fixed | #5994, #6106, #5916, #4869 |
| S2 — Limitless batch sync | Not addressed | — |
| S3 — Internet drop + BT connected | Partially fixed | #5995, #6058 |
| S4 — BLE disconnect during live | Significantly fixed | #5796, #6085, #6086, #6067, #5889, #5915 |
| S5 — Web recorder long session | Not addressed | — |
Issue stays open as P0 umbrella tracker until S2 and S5 are addressed and S1/S3 remaining gaps are closed.
@beastoin did I say I love you today?
Child issues closed — 2026-04-01
All child issues have been closed with verify requests to reporters:
| Issue | Scenario | Status | Action |
|---|---|---|---|
| #4850 | S1: Offline sync fragmentation | Closed | 6 fix PRs merged, asked reporter to verify |
| #5154 | S2: Limitless batch sync | Closed | Root cause found, fix PR #5924 open |
| #4816 | S4: BLE disconnect recording loss | Closed | Native BLE pipeline + single-owner model deployed |
| #5252 | S4: 2h silent failure | Closed | Same BLE fixes as #4816 |
| #4805 | S5: Web recorder 40 min loss | Closed | Backend pipeline improvements; consolidated here |
| #6171 | S3: Auto-recovery UX gap | Open (P1) | Not data loss — WAL captures audio. Remains open for auto-recovery feature. |
All closed issues invite reporters to reopen if still experiencing problems. Remaining open work tracked here and in #6171.
by AI for @beastoin
Closing as not planned per CTO directive (2026-06-10).
by AI for @beastoin