[Bug]: Android app re-sends a message 10 hours later while the phone is locked, waking an idle thread #48283
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
apps/mobile
Summary#
The Android app re-sent a message I had sent 10 hours earlier, while the phone was locked and I was asleep. The host took it as a new user message and started a new turn on an idle Claude thread. The resend had a trailing . that the original didn't have.
Steps to reproduce#
I can't reproduce it on demand. This is what happened:
- 00:43:06 UTC. In the T3 Code Android app, connected to my Windows host through the T3 Connect relay, I typed a reply to a Claude thread and tapped Send once. It was a short message, one sentence approving the next step, and it sent normally: there was no stuck Pending/Sending state, and no text stayed in the composer. The turn finished at 00:44:18 and the thread went idle.
- I locked the phone and went to sleep. The app was probably still in the background rather than swiped away. Nobody unlocked or used the phone until after 10:30 UTC. The desktop app was also open on the host PC. The PC was set never to sleep, but its displays had timed out, and a cat may have woken them around 10:30 UTC. Nobody was using it.
- 10:30:47 UTC. With nobody using any device, a client connected to the host resumed (see "Which client" below). Within about 250 ms it did all of the following:
- called
server.refreshProviders; - re-subscribed
orchestration.subscribeShell(the previous subscription fiber shows as interrupted); - sent
orchestration.dispatchCommand/message.dispatchwith commandbca998ba-0c3d-4a5f-84bc-8b43eb969ded.
- called
- The host accepted a new user message,
2ff28334-…, whose text matched the 00:43 message word for word but had a trailing period added. It started run 37 on the thread. - When I next opened the Android app, it showed both messages in the thread, including the one I didn't send. There was no error and nothing marked it as a resend.
Expected behavior#
- A message is sent once, when I tap Send.
- A locked, unused phone never sends anything.
- If the app keeps any pending-send or draft state for a message the host has already accepted, it clears that state and never sends it later as a new message.
Actual behavior#
The message was sent again 10 hours later as a new message with a new id. Nothing on the phone showed that a send was pending.
Impact#
Major degradation or frequent failure
- The re-sent message woke an idle session on a long Opus thread, and the whole context was re-read without the prompt cache. That is expensive.
- The agent can't tell this message from a real one. It took it as a fresh instruction, acted on it, and then blocked on a question for about 4 hours.
- In a different thread, a re-sent approval like this one could launch work a second time.
Notes for triage#
Which client: the host logs can't identify the sender. The dispatch has no client, connection, address or user-agent fields. The phone is the likely sender. I only ever typed this message on the phone, and I don't believe composer drafts sync between clients, so the desktop window shouldn't have had the text. A key press on the desktop after a screen wake can't be fully ruled out, though.
Points to the client, not the server. The host trace has the message at its first receipt, with a new message id and changed text. That points to the phone sending its own state again (a draft or outbox entry, perhaps after keyboard or text normalisation added the
.), not to a server-side replay of the accepted command.The resume pattern (refresh providers, re-subscribe, then dispatch in the same instant, with the screen locked) fits an Android background wake or relay reconnect flushing a queued send.
Both messages are stored with
createdBy: userandcreationSource: web. The Android send is labelledweb, and nothing marks the device or that the send was a retry. Neither the user nor the agent can spot such a resend.Related but different paths: #16182 (closed; pending-message replay under a new id), #47787 (mobile restores a queued prompt after a race) and #24419.
Version or commit#
Host: 0.1.13-nightly.20261125.5258
Environment#
- Phone: T3 Code Android app on a OnePlus 8 Pro (Android 13), connected through the T3 Connect relay.
- Host: Windows 10 Pro 22H2 (19045).
- Provider: Claude (Opus), runtime mode auto.
- Client settings:
followUpBehavior: steer,sendShortcut: enter.
Logs or stack traces#
# host server.trace.ndjson (UTC)
10:28:09/10 ws.rpc.server.reportClientActivity x2 # two connected clients, 120 s heartbeats only, nothing else for ~30 min
10:30:47.505 ws.rpc.server.refreshProviders # a client resumes
10:30:47.733 EnvironmentCommands.dispatchMessage
10:30:47.743 ws.rpc.orchestration.dispatchCommand command_type=message.dispatch command_id=bca998ba-0c3d-4a5f-84bc-8b43eb969ded
10:30:47.758 ws.rpc.orchestration.subscribeShell # previous subscription interrupted
10:30:48.209 ws.rpc.vcs.refreshBranch x4
10:30:48.378 ws.rpc.server.reportClientActivity # off-cycle
# orchestration_v2_projection_messages
8416db8c-… 2026-12-03T00:43:06.635Z createdBy=user creationSource=web text: <original>
2ff28334-… 2026-12-03T10:30:48.183Z createdBy=user creationSource=web text: <original> + "."
The host logs from 00:43 have rotated away, so I can't compare the original send's command id.
Workaround#
None confirmed. Force-closing the app after sending may avoid it.
Written by Claude Code on the reporter's behalf, from their answers and the host's logs.
tanstack-source added labelsbug
SusherP(GitHub profile, opens in a new tab) changed the title
SusherP(GitHub profile, opens in a new tab) changed the title
juliusmarminge added labelsneeds more info
Thanks. Answers, plus two corrections to what I wrote earlier:
Which client sent
bca998ba…: the host logs can't say. The dispatch span and the stored message have no client, connection, address or user-agent fields, and both messages are stored ascreatedBy: userandcreationSource: web. Two clients were connected overnight: the Android app (through T3 Connect) and the desktop app on the host PC. I think the phone sent it. I only ever typed this message on the phone, never on the desktop, and I don't believe composer drafts sync between clients, so the desktop window shouldn't have had that text.relay-client.ndjson: my first version was wrong. That file does have entries in that window: tunnel drops and re-registrations at 07:50–07:56 and 08:40 UTC, then registration errors from 10:57. There's nothing at or near 10:30:47. As far as I can tell it only logs cloudflared tunnel events, not individual requests, so it can't show whether the phone sent anything.
Phone app log: I can't find a log export in the Android app. If there's a way to get one, let me know and I'll attach it.
Peripherals: no keyboard, no Android Auto, no voice assistant. A smartwatch was paired, but it isn't set up for T3 notifications. The phone was locked and unused all night after sending the first message.
Host PC: the desktop app was open. The PC was set never to sleep, but its displays had timed out. My cat may have woken the screens around then, so a key press can't be ruled out. Nobody was using it, though, and I never typed this text in that window.
Correction: the issue said nothing looked unusual on the phone afterwards. That was wrong. When I opened the Android app, it showed both messages in the thread, including the one I didn't send. I've fixed the issue text.
This comment and the issue were written by Claude Code on my behalf, from my answers and the host's logs.
juliusmarminge removed labelsneeds more info
@SusherP In the host's server.trace.ndjson, find the line named
EnvironmentCommands.dispatchMessageat 10:30:47.733 UTC. It is a span the client sends to the host. What are itsresourceAttributes, especiallyservice.name,t3code.client.surfaceanduser_agent.original? Please also check the same fields on anyEnvironmentCommands.*line near 00:43 if one survives. Those fields tell us whether the desktop app, a browser or the phone sent the message.juliusmarminge added labelsneeds more info
Sign in to join this conversation.
@SusherP Which client sent command bca998ba-0c3d-4a5f-84bc-8b43eb969ded: the Android phone through T3 Connect, or a local desktop window on the host? The first version of this issue said relay-client.ndjson had no entries from 00:40 to 10:35 UTC; does it, or the phone's own app log, show a send or reconnect at 10:30:47 UTC? And did that phone have a physical or Bluetooth keyboard, a smartwatch or Android Auto, or a voice assistant connected overnight?