Repository navigation
Description
Drafted by an AI agent (opencode, DeepSeek V4.1 Flash) from a live investigation of the reporter's machine.
What happened
On the Android app (2.4.0, versionCode 831) one specific thread never opens. The screen shows the thread title with "Syncing messages…" as the subtitle, the feed stays blank, and the app becomes unresponsive: the Hermes JS thread sits at 90–130% CPU continuously, Android raises an ANR after 5 s, and the process is eventually killed and restarts. It reproduces 3/3 on open, survives force-stop, app cache clear and relaunch.
The same thread opens normally on desktop, and the same mobile app syncs every other thread in the same environment over the same relay, including threads several times larger (a 9 MB / 2,346-item thread opens immediately). So this is not a connection, relay, or server-snapshot problem.
Diagnosis
The thread contains a single assistant message produced by a degenerated model run. It is well-formed JSON and renders on desktop, but it is pathological as a Markdown document:
- 176,385 characters, 50,539 lines
- 12,561 thematic breaks (
---on their own line) - 2,540 lines that are just "Emit.", 25,254 blank lines
- The worst message in any other thread on this machine has 6 such rules
Running the mobile app's own Markdown stack (unified + remark-parse + remark-gfm, as used by apps/mobile/src/lib/markdownDocument.ts) over that text on a desktop CPU:
{"chars":176385,"lines":50539,"parseMs":1814,"nodes":38080,"blocks":12591}
1.8 s and 38,080 mdast nodes in V8. On Hermes the same parse is much slower, and the whole message is then mounted as one feed row, so React Native has to create tens of thousands of Text/View nodes in one commit. The commit never finishes in reasonable time, the thread's status never flips from synchronizing to live, and the header therefore keeps showing "Syncing messages…" until the ANR kills the app. The syncing label is a symptom of the unfinished first commit, not a transport failure.
Server side during the hang: the subscribe RPC completes, the snapshot and the synchronized completion marker are sent, server CPU is ~2%, and the span is only interrupted when the Android process dies. One mqt_v_js thread is pegged; the UI/main thread is fine.
Sanitized sample of the offending content (the original is 176 KB):
Given the immense repeated loop, just produce.} }.
Here.
---
Emit.
---
I'll emit now.
---
Write.
---
Now.
---
Emit.
---
Produce.
---
Go.
---
Ok, producing the message.
---
Done.
---
Emit.
The message ends with a normal answer, so it looks unremarkable collapsed in the thread list and in previews.
Steps to reproduce
- Have a thread whose last assistant message is ~176 KB with ~12.5k
---lines (a degenerate model loop; any client can produce one, the content is the trigger, not the provider). - Open that thread in the Android app (2.4.0, build 831) against a local or relayed environment.
- The header shows "Syncing messages…" and the feed stays blank.
adb shell top -H -p <pid>shows themqt_v_jsthread at ~100% for as long as you wait; after ~5 s Android logsANR in com.t3tools.t3code/Input dispatching timed out. - Every other thread in the same environment opens normally, so the repro needs that specific message shape.
Expected behavior
A single oversized message should not block the thread from reaching live. Long messages should degrade (chunked/virtualized blocks, or a "show full response" cap) instead of pinning the JS thread and ANRing.
Actual behavior
Thread status stays synchronizing forever, the feed is empty, the JS thread spins at 100% CPU, and Android ANRs and restarts the app. Users read this as "messages won't sync".
Impact
Blocks work completely — the affected thread is unusable on Android and takes the whole app down with it while it is open.
Version
Mobile 2.4.0 (versionCode 831), Android; server 0.1.13.
Environment
Pixel 8, Android 16 (API 37), ADB (platform-tools 37.0.1), Linux host, T3 Code server 0.1.13 on the same LAN, provider opencode.
Logs
E ActivityManager: ANR in com.t3tools.t3code (com.t3tools.t3code/.MainActivity)
E ActivityManager: Reason: Input dispatching timed out (... is not responding. Waited 5000ms for MotionEvent)
E ActivityManager: 256% 31955/com.t3tools.t3code: 231% user + 24% kernel
$ adb shell top -b -n 1 -H -p <pid>
TID USER PR NI ... S[%CPU] TIME+ THREAD
32536 u0_a434 16 -4 ... R 70.3 1:11.19 mqt_v_js
32536 u0_a434 16 -4 ... R 92.8 1:13.04 mqt_v_js
Server trace for the same open (start of the subscribe span, interrupted only when the app process died):
ws.rpc.orchestration.subscribeThread durationMs=49186.8 exit=Interrupted
Related issues
- Android: a thread with many subagent rows takes 8–13 s to show its messages, and its forks inherit the delay #39687 "Android: a thread with many subagent rows takes 8–13 s to show its messages" — same family (feed build on Android), but this one is a single message with thousands of block-level nodes, not many rows.
- [Bug]: Desktop thread permanently stuck on "Syncing messages..." — hydration status never reaches
live; survives full relaunch; cleared only by removing IndexedDB #19563 / fix(client-runtime): threads no longer stay on "Syncing messages..." after a failed resume #19570 "thread permanently stuck on Syncing messages" — different cause (cache/hydration); here the status never commits because the first render never finishes. - [Bug]: Android chat turns black and stops responding after scrolling during a running turn #37263 "Android chat turns black and stops responding after scrolling during a running turn" — similar symptom, different trigger.
Research/answers threads are the most likely to accumulate such a message, so a provider-agnostic guard on message size/shape looks warranted rather than treating it as a model bug.
Workaround
Do not open the affected thread on Android. On desktop, rewind/fork the thread to before the runaway turn; the resulting thread syncs on mobile normally.
Filed by
opencode (DeepSeek V4.1 Flash), investigating the reporter's machine over ADB and the local server database.
Activity
MillingtonAllen commentedon Nov 29, 2026
Duplicate check done before this was filed (GitHub issue search over
repo:pingdotgg/t3code, 14 query shapes, 87 hits reviewed; closest ones read in full):command_execution), and it was a different surface of the work log. This report is thousands of block-level nodes in one assistant message, not one long line.live; survives full relaunch; cleared only by removing IndexedDB #19563 / fix(client-runtime): threads no longer stay on "Syncing messages..." after a failed resume #19570 (closed) — "blank + Syncing messages" from cache/hydration and slow first sync; here the status never commits because the first render never finishes, and the server side is idle.No existing issue describes a single oversized/degenerate message pinning the JS thread. Opened as a new report instead of a comment on those.
Two extra facts for the record:
opencode-go/deepseek-v4.1-flashwith varianthigh, runordinal:30(completed 2026-11-29T13:33:59Z, ~5m27s). The 176 KB / 50,539-line body with 12,561---rules and 2,540Emit.lines was that model's own degeneration loop, not a client-side serialization artifact — the stored JSON is well formed and renders on desktop.mobile-android-build/2.4.0/...is the newest tag andapps/mobile/app.config.tsstill defaults to 2.4.0), so there is no newer mobile release to retest against. Commits since 2026-11-27 do touch shared Markdown helpers (list-item indentation, heading titles, link labels), but none bounds message size or block count, so this path looks unchanged.MillingtonAllen commentedon Nov 29, 2026
Attached a synthetic fixture that reproduces the shape of the offending message, so the render path can be exercised without publishing the reporter's content:
https://gist.github.com/MillingtonAllen/5934e5e48ac0401c8983d85fc36e1e41
Files:
runaway-message-176k.md(the fixture),README.md(provenance and measurements),measure.mjs+package.json(runs the sameunified+remark-parse+remark-gfmpath the mobile app uses).Why synthetic rather than the real message: the original 176 KB is an assistant's analysis of a private repository. Line-level redaction would still leave project detail, and the renderer reacts to block shape, not meaning. The fixture keeps the shape and replaces every sentence with placeholder text:
---rulesThe original also had 2,540
Emit.-only lines; the fixture puts short one-word lines in the same positions. Nothing else the parser sees differs. Note thatremark-parseitself succeeds on this input — the failure is that one message becomes tens of thousands of block nodes inside a single feed row, with no size or block-count bound on the mobile path.