Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Desktop thread permanently stuck on "Syncing messages..." — hydration status never reaches `live`; survives full relaunch; cleared only by removing IndexedDB #19563

Closedhichish(GitHub profile, opens in a new tab) opened this issue 2 comments

Summary

On the macOS desktop app, one existing thread is permanently stuck showing the Syncing messages... banner above the composer. The banner never clears, the thread never becomes interactive for live updates, and the state survives a full Cmd+Q + relaunch. All server-side state for the thread is clean/idle — this is a client hydration issue where the thread's status never reaches live.

The only thing that cleared it was removing the renderer's IndexedDB cache.

Environment

  • T3 Code 0.0.45 (Alpha), macOS 26.6.2 (arm64)
  • Provider: Claude Agent (claude-opus-4-8)
  • Desktop (not mobile)

Symptom

  • Selected thread shows Syncing messages... indefinitely (spinner above the composer).
  • Other threads in the same project open fine.
  • Observed after a long-running turn (~29 min) on that thread; a follow-up message was queued during/after it.
  • Switching threads and back, reload, and a verified full quit (pgrep -if t3code empty) + relaunch do not clear it.

What I verified (server/local state is clean)

From the local server DB (~/.t3/userdata/state.sqlite, read-only) and NDJSON traces (~/.t3/userdata/logs/):

  • provider_session_runtime for the thread: status = stopped, activeTurnId = null, last event provider.stopAll.
  • Latest projection_turns row: state = completed.
  • projection_thread_messages: 0 rows with is_streaming = 1.
  • Thread flags: pending_approval_count = 0, pending_user_input_count = 0.
  • All 9 projectors in projection_state caught up to the latest sequence.
  • Websocket RPCs succeeding; no Failure exits in the traces.

So the backend considers the thread fully settled — the banner is purely client-side.

Root cause (evidence)

The banner is derived from a client thread-hydration status (from the bundled renderer):

switch (status) {
  case 'empty':
  case 'cached':
  case 'synchronizing':
    return detailExists ? 'syncing' : 'loading';   // -> "Syncing messages..."
  case 'deleted':
  case 'live':
    return null;                                     // banner cleared
}
// 'loading' -> "Loading messages...", else -> "Syncing messages..."

It only clears when the thread reaches live. For the affected thread it stays at cached/synchronizing.

The thread detail is cached in the renderer's IndexedDB (~/Library/Application Support/t3code/IndexedDB/), reloaded every launch — which is why a full relaunch doesn't help.

A server trace span for the thread subscription:

ws.rpc.orchestration.subscribeThread  durationMs: 3541
exit: Interrupted — "ClientAbort ... The fiber was interrupted"

i.e. the subscribeThread stream that would drive the thread cached/synchronizing -> live exits early (ClientAbort) and the thread never reaches live, so the banner persists.

Workaround that fixed it

With the app fully quit, move the renderer IndexedDB cache aside and relaunch (forces a fresh re-hydration from the healthy server):

mv "$HOME/Library/Application Support/t3code/IndexedDB" \
   "$HOME/Library/Application Support/t3code/IndexedDB.bak"

Suggested fix direction

  • Ensure a thread cannot get stuck in a non-live hydration phase when server state is clean — e.g. retry/re-subscribe after a subscribeThread Interrupted/ClientAbort instead of leaving the cached status pinned.
  • Consider a fallback that treats a cached thread whose live-sync fails as empty and reloads it from the server, rather than reloading the stuck cached detail every launch.
  • A manual "reload/clear local cache for this thread" affordance in the UI would make this user-recoverable without touching IndexedDB on disk.
  • #14244 (transient Syncing messages... with no "starting agent" state)
  • #10206 (mobile stuck on Loading messages... when snapshot fails schema decoding — closed as duplicate)
  • #4595 (iOS sync failure tied to oversized thread activity payloads)

This one differs: desktop, permanent, survives full relaunch, and is cleared only by removing the IndexedDB cache.

  1. Note

    Grok responding on behalf of Julius.

    I'm not treating this as a confirmed bug on main yet. It matches a failure mode fixed after 0.0.45.

    0.0.45 stable shipped Oct 2. Since then, #15937 (merged Oct 13) fixed this exact symptom: when a thread resumes from its cached cursor and the replay hits a row it can't decode, every retry replays from the same point and fails the same way. The thread stays on "Syncing messages..." through relaunches, and clearing IndexedDB "fixes" it only because that resets the cursor. The ClientAbort you saw on subscribeThread is the client dropping a failed attempt before it retries, not the root cause.

    Please:

    1. Have you ever run a nightly (0.0.46) build against this ~/.t3 and then gone back to 0.0.45 stable?
    2. If it happens again, before you clear IndexedDB, open DevTools → Console and copy any SchemaError or "Could not…" warning for that thread.
    3. Retest on the latest nightly (0.0.46-nightly.20261014 or newer).

    If it reproduces on a current nightly, comment with that console output and we'll reopen it as a bug.

  2. juliusmarminge added labelsneeds more info

  3. juliusmarminge added labelsvia-triage

  4. Note

    🤖 Claude Opus 5.5 responding on behalf of Theo

    Thanks for the report. This is fixed on main in #15937. Please test on the nightly built from main on 2026-10-21, or on the next stable release. If the problem still occurs there, please open a new issue that links to this one, with your version and steps to reproduce it.

Sign in to join this conversation.