Repository navigation
Description
Note
Claude Opus 5.5 (Claude Code in T3 Code) writing on behalf of the reporter, from their report and an investigation of the source.
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 (the controller is in packages/client-runtime/src/voice-input)
Steps to reproduce
What the reporter did on Android, mobile app 2.3.0, connected to their Mac through the relay (seen once, not reproduced on a device):
- In the mobile app, Settings → Voice: transcribe on a computer, using their own Mac running T3 Code.
- On a weak, intermittent mobile network, record a dictation in a thread composer.
- Tap the button that finishes the recording so it is sent for transcription.
- The composer stayed on "Transcribing" for a while. Then it went back to an empty input, as if nothing had been recorded. No text arrived and no error appeared.
Code-level reproduction, deterministic on main @ d427894. This is a temporary Vitest file, not committed. It reuses the mocks from voiceDestination.test.ts, adds a real VoiceInputController, and copies the VoiceInputProvider.tsx:154 subscription:
- Choose an environment as the voice destination and start a recording.
- Call
stop(), which is what tapping finish does. The phase is nowtranscribing. - Flip the environment's connection away from
connected, either before the upload or whilePOST /api/voice/transcribeis in flight. A drop followed by an immediate reconnect gives the same result.
Results:
| When the connection changes | Final state | Error shown | Transcript inserted | Recording file | Upload |
|---|---|---|---|---|---|
| Never (control) | idle | – | yes | deleted after use | 1 request |
| After finish, before upload | idle | none | no | deleted | never sent |
| While upload is in flight | idle | none | no | deleted | aborted by the client |
| Drop and reconnect while upload is in flight | idle | none | no | deleted | aborted by the client |
The same scratch test against #35567 (head 1c5effb), with that PR's voiceGrantAtom subscription and retryFailedRecording: true:
- Drop before upload: a visible error, "Connection lost. Your recording is saved; retry once reconnected.", and the recording is kept.
- Drop during upload, then the request fails: a visible "Could not transcribe this recording." error. Retry re-sends the kept audio without recording again, and the transcript is inserted.
- A response that arrives after a drop and reconnect while the upload is in flight is inserted.
Core of the scratch test
const controller = new VoiceInputController({
recorder, getTranscriber: () => appAtomRegistry.get(voiceRouteAtom)?.transcriber ?? null,
requestPermission: async () => ({ granted: true, canAskAgain: true }),
configureRecording: async () => {}, releaseRecording: async () => {},
deleteRecording: (uri) => deleted.push(uri),
readDraft: () => ({ ownerKey: "thread-1", text: draft, selection: { start: 0, end: 0 } }),
commitDraft: (text) => committed.push(text), onStateChange: (s) => states.push(s),
});
// Same wiring as VoiceInputProvider.tsx:154 on main
appAtomRegistry.subscribe(voiceRouteAtom, () => controller.cancel());
await controller.start();
const finished = controller.stop(); // user taps finish -> "transcribing"
await uploadStarted; // POST /api/voice/transcribe is pending
appAtomRegistry.set(link(host), null); // presentation leaves "connected", prepared = None
await finished;
// main: state idle, error null, committed [], recording deleted, upload abortedThe presentation and session mocks are the ones in voiceDestination.test.ts, extended with a per-host link atom, as in #35567's test.
Expected behavior
After I tap finish, I either get the transcript in the composer, or a visible error with my recording kept so I can retry. A reconnect alone never ends the dictation.
Actual behavior
Observed: "Transcribing" for a while, then an empty composer with no message. This matches the "while upload is in flight" row above: a slow upload on a weak link, then a connection change.
When the environment's connection changes at any point after finish (during "Transcribing"), the dictation goes back to idle with no error. Nothing is inserted, and the recording file is deleted. Nothing is left to retry, so the user has to say everything again. From the composer it looks as if the audio was sent and the transcript simply never came back.
Impact
Major degradation or frequent failure
Version or commit
Reproduced in code on main @ d427894. Mobile app 2.3.0 (Android), the current version. The host Mac now runs desktop 0.1.10-nightly.20261116.4761; the incident may have been on an earlier build.
Environment
T3 Code mobile app 2.3.0 on Android → T3 Code desktop host on macOS (Apple M1), transcription on the Mac with its local model (Parakeet), over the T3 relay on an intermittent mobile network.
Logs or stack traces
# Host trace files (server.trace.ndjson*) keep about 11 hours. They contain 0 spans named
# environment.voice.transcribe, and the incident time is unknown, so the request cannot be
# matched to the incident. With the silent-cancel path the request may never be sent at all
# (the "before upload" row above). No device logs were collected.
# Cause, from source @ d427894aa1:
# 1. apps/mobile/src/features/voice-input/VoiceInputProvider.tsx:154
# get.subscribe(voiceRouteAtom, () => session.controller.cancel());
# 2. voiceRouteAtom changes whenever the connection does (voiceDestination.ts:93-110, 243-261):
# voiceConnectionAtom returns null unless connection.phase === "connected", and
# EnvironmentSupervisor publishes Option.none() and then a new PreparedConnection on every
# attempt (packages/client-runtime/src/connection/supervisor.ts:436, 913).
# 3. controller.cancel() in "transcribing" / "post-processing" invalidates the operation, aborts
# the request and sets idle with error: null (packages/client-runtime/src/voice-input/controller.ts:423-427).
# releaseResources() then deletes the recording (controller.ts:633-657 → deleteOwnedRecordings at :659).
# 4. Mobile does not set retryFailedRecording, so even a failed upload that does show an error
# keeps no audio to retry.
# 5. canSend in voiceDestination.ts:257 also requires the same PreparedConnection object, so a
# recording that survived a reconnect would fail with "Your transcription choice changed."Links: VoiceInputProvider.tsx#L154 · voiceDestination.ts#L93-L110 · voiceDestination.ts#L243-L261 · controller.ts#L423-L427 · supervisor.ts#L913
What is confirmed and what is not:
- Confirmed in code and the scratch test: any change of
voiceRouteAtomafter finish discards the dictation silently, before or during the upload. - Inferred, not observed: that the reporter's network blips made the supervisor leave
connectedand so triggered this path. It is the only path found that ends with no error and no transcript and is not started by the user. The other silent paths are the user's own Cancel and dismiss. The other failures (an HTTP error, an empty transcript, a changed draft) all show an error. - Possible second trigger, not verified:
voiceConnectionAtomalso returns null whensessionHasScopeis false, and that is false while the session-state fetch result is aFailure. A failed session-state request on a flaky link could therefore change the route while the socket stays up. - Not checked: whether the Mac keeps running inference after the client aborts; the same sequence on a real device; whether relay reconnects behave differently from direct connections.
Workaround
Stay on a stable connection while dictating to a computer, or use on-device transcription. Neither recovers a lost dictation.
Related
- fix(mobile): a dropped connection no longer discards a dictation #35567 (open PR) changes the cancel trigger from the route to the grant, enables
retryFailedRecordingon mobile, and resolves the connection per request. Its description, test and evidence cover a drop during recording and offline finish. In the scratch test above it also fixes this after-finish window, in code only (not run on a device). This issue records that phase and the user-visible symptom, so the PR can close it. - Desktop dictation is discarded when the app loses its connection to the local server #37199: the same loss on desktop/web (
useEnvironmentSpeechInput). Different code. - [Bug]: Switching threads while dictating clears the recording and everything said #33197, [Bug]: Switching threads after pressing Send while dictating drops the message #33366: dictation lost on thread switch. Different trigger.
- Not covered by fix(mobile): a dropped connection no longer discards a dictation #35567 and not shown to happen here: on a stalled (not dropped) link,
POST /api/voice/transcribeuses a 30-minute client timeout (INFERENCE_OR_DOWNLOAD_TIMEOUT_MS,packages/client-runtime/src/voice-input/environment.ts:26). The composer could then stay on "Transcribing" that long, and Cancel deletes the recording. Mentioned for context only; this is not a separate report.
Activity
juliusmarminge commentedon Nov 16, 2026
I tried to reproduce this on the current build and could not.
Commit: origin/main 222288b. I did not run the mobile app on a device. The connection has to change exactly while the composer says 'Transcribing', which is a timing race, so I did not attempt it on the Android emulator. Instead I added one case to apps/mobile/src/features/voice-input/voiceDestination.test.ts, using the file's existing mocks. It chooses a computer as the voice destination and prepares a recording with the route's transcriber. It then publishes a fresh PreparedConnection for the host, which is what EnvironmentSupervisor does on every reconnect, and sends the recording. Result on main: the send is rejected with VoiceTranscriptionError 'Your transcription choice changed.' (code: cancelled), from environmentTranscriber.ts check(). The other 4 tests in the file pass. In the app the dictation never even gets that far: VoiceInputProvider.tsx subscribes to voiceRouteAtom and calls controller.cancel() whenever it changes. Cancelling while transcribing goes to idle with no error and deletes the recording (controller.ts cancel and releaseResources). My test does not exercise that provider path; the issue's own scratch test does.
Closing as not planned. If it still happens for you, reply with the exact steps and the version you are on and it will be looked at again.
bdamokos commentedon Nov 22, 2026
This still happens on current main (6972026). This time it was on iOS, with cloud transcription, and a dictation was lost.
Setup: iPhone, T3 Code iOS 2.3.0 (build 248). The voice destination is OpenAI, through my Mac running desktop 0.1.12-nightly.20261121.5064. The phone was connected over the home network, with the relay as fallback.
What happened (host trace, 22 Nov, CET):
POST /api/voice/cloud/openai/transcribeover the home network. It runs for 38 s and ends with 499 (client closed).The host was overloaded at the time, with event-loop stalls of 4–10 s between 18:39 and 18:57. Of the 38 s, 35.7 s went to
EnvironmentAuth.authenticateHttpRequest(dpop.verifyRequestDpopProof28.3 s,SessionStore.verify7.4 s). So this upload never reached OpenAI, and the phone gave up while the host was still authenticating it.Cause: the one in the original report, unchanged on main.
VoiceInputProvider.tsx:167cancels the controller on everyvoiceRouteAtomchange, and that atom changes on each disconnect and reconnect (voiceDestination.ts:249-266). So a host disconnect during recording or transcribing ends the dictation with no error and deletes the audio. #35567 (open, mergeable) fixes the client side.Cost: this one never reached the provider, but a drop after the upload has been authenticated is worse. The host has already paid for the cloud transcription, and the client then throws the result away. If the host finished an in-flight transcription and held the result briefly, keyed by a client-generated id, a retry after reconnecting could collect it. That would avoid paying for the same audio twice.
Automated comment from a coding agent. claude-opus-5-5