Skip to content

[Bug]: Switching threads while dictating clears the recording and everything said #33197

Open

Description

@AidenCB

Note

Claude Opus 5.5 (Claude Code in T3) writing on behalf of @AidenCB.

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web (the voice controller lives in packages/client-runtime)

Steps to reproduce

  1. Start voice input in a thread's composer and speak for a few seconds.
  2. While it's still recording, open a different thread from the sidebar.
  3. Go back to the first thread.

Expected behavior

Leaving the thread ends the recording, and the transcript is added to that thread's draft, the same way typed text stays in a thread's draft when you leave. If it can't be transcribed, the audio is kept so I can retry.

Actual behavior

The dictation is cleared and everything I said is lost. Nothing from the recording reaches the draft, and there's nothing to recover afterwards.

Impact

Minor bug or occasional failure

Cause, from reading the code at 357fb75 (the v0.1.8-nightly.20261109.4399 tag)

  • Opening another thread changes the composer's ownerKey, and the effect at apps/web/src/speech/useEnvironmentSpeechInput.ts:421-429 calls controller.ownerChanged(). Its lint comment says it "abandons the recording and any queued submission when the draft's owner changes".
  • ownerChanged() (packages/client-runtime/src/voice-input/controller.ts:454-457) calls cancel(), which goes through discardRecording and releaseResources, and deleteOwnedRecordings (controller.ts:600-645) deletes the audio.

Version or commit

Desktop 0.1.8-nightly.20261109.4399 (latest nightly)

Environment

macOS 15.6.1, desktop app.

Workaround

Stop the recording before switching threads.

Related: #32653 is the same loss caused by editing the draft while recording. #32682 fixes that one, but it still refuses a transcript for another owner's draft, so it doesn't cover a thread switch. #10140 (closed) tried keeping the recording running across threads on mobile. This report asks for the opposite: stop when the thread changes and keep the result in the original thread's draft.

Activity

  1. suhaasbadada commented on Nov 9, 2026

    @suhaasbadada

    I am taking a focused look at this issue. I reproduced the controller-level loss on current main (c4ce7b0fd74f6beb37ed6034f5c8416e5aa7e165) with a synthetic recorder: changing the draft owner stops and deletes the recording without calling transcription or committing a draft. This was not a live microphone test.

    Proposed scope: stop dictation when leaving the thread, retain the result for the originating draft, and keep recoverable audio if transcription fails. The new thread must never receive the old thread’s transcript. This is not a proposal to keep recording across threads. I will add focused lifecycle/race regression coverage and web-client verification before submitting a PR. I found no competing fix for this exact case; #32682 covers draft edits rather than owner changes.

    Implementation and verification are AI-assisted with GPT-6.1 Sol through OpenCode in T3 Code. No fix has been submitted yet.

  2. suhaasbadada commented on Nov 9, 2026

    @suhaasbadada

    Update: #33210 appeared after my initial duplicate check and addresses the same thread-switch ownership bug, so I have stopped my parallel implementation and will not submit a competing PR. No implementation commit or branch was pushed.

    The local-only implementation passed 90 focused tests and vp run check:changed. I also verified success and failed-audio retry in the isolated real web client using synthetic recorder/transcriber fixtures: no microphone capture, paid transcription, or paid agent turns. These captures verify that local implementation, not #33210:

    One scope difference worth noting for @juliusmarminge: this issue requests recoverable audio after a transcription failure, whereas #33210 currently describes discarding failed detached recordings. I have not tested that PR or taken it over.

    GPT-6.1 Sol through OpenCode in T3 Code.

  3. DynoDS commented on Nov 11, 2026

    @DynoDS

    I see the same thing in the processing stage too. After I stop recording, while it's still turning my speech into text, if I click to another thread the transcript is lost. I'm not sure #33210 covers that stage, so it may be worth checking.

  4. senutpal commented on Nov 16, 2026

    @senutpal

    Note

    Written with AI assistance (Hy4 flash Free running in T3 Code) on behalf of @senutpal. I'm a daily desktop user and reproduced this myself.

    Confirming this on Desktop 0.1.10-nightly.20261114.4709 (Windows) with the same three steps. Returning to thread A shows an empty draft and there is no recovery UI.

    The code reading checks out against current main too:

    That last part explains why the audio is unrecoverable rather than merely untranscribed: the recording files are explicitly deleted on the owner change.

    I also support #37445, which proposes keeping the recording alive while browsing other threads — I think that's the better long-term direction. But the bug here stands either way: even with the narrower fix you're asking for (stop on switch, keep the transcript in A), losing everything said is clearly wrong. Hope the current-source line references help narrow it down.

  5. falkloewert commented on Nov 20, 2026

    @falkloewert

    Note

    Written with Claude Code in T3 Code on behalf of @falkloewert.

    Confirmed on desktop (Linux) in the processing stage, and it is worse when the transcription host is slow.

    1. Start dictation in thread A and speak for several minutes.
    2. Stop recording. The composer shows the transcript being processed; transcription runs on a CPU-only VM here, so it takes a while.
    3. Open thread B to look something up, then return to A. Recording, audio and the pending transcript are gone. Empty draft, nothing on the clipboard, no retry. Several minutes of speech are unrecoverable.

    Expected: never silently destroy a finished or nearly finished transcript.

    Two things would cover it:

    • Keep the transcription job bound to the originating thread and deliver the result to that thread's draft. That is what fix(web): switching threads while dictating keeps the transcript in that thread #33210 does for the recording stage; it does not appear to cover the processing stage either, same as @DynoDS describes above.
    • Safety net for every discard path (thread switch, connection loss, app restart): put the transcript on the clipboard or into a short "recent dictations" list, so it can be pasted back.

    Stopping the dictation when leaving the thread is fine. Losing minutes of speech without a way to recover it is not.

  6. Sharad-Patel1 commented on Nov 20, 2026

    @Sharad-Patel1
    Contributor

    Note

    Generated by claude-opus-5-5
    RESPONDING ON BEHALF OF SHARAD

    This can be closed: #35761 (c242558) fixed this. It ships in v0.1.11-nightly.20261117.4814, and no stable release has it yet. ChatComposer.tsx now passes the thread's stored draft as persistentDraft, and VoiceInputSession.ownerChanged in apps/web/src/speech/voiceInputSession.ts returns early for that target. Opening another thread no longer cancels the recording or deletes its audio, and the transcript goes into the original thread's draft. It doesn't stop the recording when you leave, as the Expected section asks. The recording keeps going while you're in the other thread, and a pill there lets you finish or cancel it. #35761 chose that design on purpose, so I'd close this. The open PR #33210 would then be superseded.

    The attached script adds a case to useEnvironmentSpeechInput.browser.test.tsx that follows the issue's steps with the composer's thread-draft wiring. It starts dictation in thread A, opens thread B, then goes back to A. Before #35761, the dictation is idle when you get back, nothing was transcribed, and A's draft is unchanged. On current main the recording is still running, and stopping it adds the transcript to A's draft while B's draft stays empty. The script covers the recording stage only. I checked switching during transcription, which DynoDS and falkloewert reported, in the real app below.

    I repeated the issue's steps in the real app with two Replay threads and the local Parakeet model on the dev server. A stand-in microphone played a recorded sentence into the page, and the transcription is real. On both commits a dictation that stays in one thread transcribes normally. Before #35761, the words shown in thread A's composer while recording are gone when you come back from thread B, the microphone is idle, and the draft is empty. On main, thread B shows a pill for thread A's recording, the recording is still running back in A, and finishing it puts "Remember to add input validation to the sign-up form before we ship." into A's draft.

    falkloewert's report doesn't say which build it's on, so I also tried switching while it says Transcribing… on main. I paused the dev server for 7 seconds right after Finish to stand in for a slow transcription host, and opened thread B while A was still transcribing. B shows a Transcribing… pill for A. Once the server resumed, the transcript was in A's draft and B's draft was empty (📹 Screen recording). One gap is left. If the transcription host is gone long enough for the app to show the environment as disconnected, the pending dictation is lost with no Retry, whether or not you switch threads. That's the connection-loss case falkloewert lists separately, and #35761 doesn't change it.

    Before #35761 (a10f9e41d3) main (38bac7091a)
    Before #35761 (a10f9e41d3) main (38bac7091a)
    📹 Screen recording 📹 Screen recording

    To reproduce, run bash prove-issue-33197.sh from a clean t3code checkout after vp i.

    Result
    PASS  #35761 (c24255826b) is on main: feat(web): dictation keeps recording into its thread when you switch away (#35761)
    PASS  before #35761 (a10f9e41d3): back in thread A the dictation is idle; transcribed 0x; thread A's draft is "Earlier text"; thread B's draft is ""
    PASS  main (38bac7091a): back in thread A the dictation is recording; transcribed 1x; thread A's draft is "Earlier text dictated"; thread B's draft is ""
    VERDICT: #33197 is fixed on main by #35761
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions