microsoft / microsoft/vscode

On-device dictation can ignore model startup errors and report an empty completion

Open
#336,602 0 comments 0 reactions 1 assignee Claimed by @meganrogge View on GitHub
bug dictation new release
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

Does this issue occur when all extensions are disabled?: Not tested; reproduced with controlled dependencies executing the source methods.

- VS Code Version: Startup gap verified in 1.137.0 and 1.138.0 source; reproduction at `4fa9fcf245ad90eb1f21fae5ed0511515e068b1d`.
- OS Version: Windows; source-method reproduction, not a real-microphone test.

Steps to Reproduce:

1. Start local dictation with a test backend that fails immediately and returns model status `Error` from `getModelStatus()`.
2. Stop dictation after the renderer enters Recording.

**Actual:** No startup failure is surfaced; stop returns no text and records `completed` with `transcriptLength=0`.

**Expected:** Surface the startup error and terminate the session as failed.

### Potential root cause
`_startLocalSession()` skips status tracking when the initial snapshot is already `Error`. `_failSession()` also ignores failures while the renderer is still Idle during startup. Native `stop()` then catches the failed-open promise and returns empty text, assuming the error was already handled.

Sources: [renderer startup](https://github.com/microsoft/vscode/blob/4fa9fcf245ad90eb1f21fae5ed0511515e068b1d/src/vs/workbench/contrib/chat/browser/speechToText/chatSpeechToTextService.ts#L1045-L1078), [startup failure guard](https://github.com/microsoft/vscode/blob/4fa9fcf245ad90eb1f21fae5ed0511515e068b1d/src/vs/workbench/contrib/chat/browser/speechToText/chatSpeechToTextService.ts#L1250-L1265), [native stop](https://github.com/microsoft/vscode/blob/4fa9fcf245ad90eb1f21fae5ed0511515e068b1d/src/vs/platform/localTranscription/node/localTranscriptionService.ts#L715-L743).

The combined startup/stop path was reproduced with synthetic dependencies; its production frequency is not established.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.