Repository navigation
Description
What happened
When voice dictation transcript cleanup fails (for example, after switching the cleanup model to an OpenCode or Antigravity model), the warning toast only says "Transcript cleanup failed" / "The original transcript was added." and gives no indication of why cleanup failed. Users cannot tell whether the issue is a misconfigured/unsupported cleanup model, provider auth/rate limit, or a server error without inspecting server.trace.ndjson.
Diagnosis
The failure reason is discarded at two layers (verified on commit 0dc32b5c, matching 0.1.12-nightly.20261121.5038 on main):
- Server (
apps/server/src/speech/http.ts:231-237): Theenvironment.voice.postProcesshandler (POST /api/voice/post-process) catches everySpeechOperationError(which wrapsTextGenerationErrorand its user-safedetail, such as invalid structured output, rejected credentials, rate limits, or unsupported provider setup) and converts it into a generic HTTP 500EnvironmentInternalError("The environment failed to answer this request (internal_error)."). The underlying cause is only written toserver.trace.ndjson. - Client (
apps/web/src/speech/voiceInputSession.ts:223-228): Even thoughVoiceInputControllerpasses the caught error tothis.dependencies.onPostProcessingError?.(error)(packages/client-runtime/src/voice-input/controller.ts:660),VoiceInputSessionignores theerrorparameter and always renders a hardcoded warning toast:- title:
"Transcript cleanup failed" - description:
"The original transcript was added."
- title:
Steps to reproduce
- In Settings → Voice → Cleanup, enable transcript cleanup and select a cleanup model that fails (e.g., an OpenCode or Antigravity model affected by Transcript cleanup fails with invalid structured output when the cleanup model does not enforce the schema #32049, or a provider with invalid credentials).
- Dictate into the composer and stop recording.
- Observe the warning toast: it only shows
"Transcript cleanup failed"and"The original transcript was added."with no failure reason, while the actualTextGenerationErrordetail is only present inserver.trace.ndjson.
Version
0.1.12-nightly.20261121.5038 (triage CLI: 0.1.11)
Environment
Linux x64 (7.0.0-34-generic), Node v26.13.1, T3 Code Nightly desktop app (Electron 44.10.1) against local server
Evidence
# Server span logs the specific TextGenerationError detail, then returns generic HTTP 500 internal_error:
environment.voice.postProcess -> Failure
cause: SpeechOperationError (operation: "post-processing")
-> TextGenerationError (operation: "generateTranscriptionPostProcessing", detail: "OpenCode returned invalid structured output.")
-> SchemaError: Expected a valid JSON string
HTTP response: 500 EnvironmentInternalError: The environment failed to answer this request (internal_error).
# Client receives only EnvironmentInternalError and VoiceInputSession ignores the error parameter in onPostProcessingError:
Toast shown: "Transcript cleanup failed" / "The original transcript was added."Related issues
#32049 tracks the underlying OpenCode/Antigravity structured-output failure during transcript cleanup. This issue is specifically about surfacing the failure reason from POST /api/voice/post-process through onPostProcessingError to the user-facing toast so any cleanup failure (auth, rate limit, provider unavailability, schema mismatch, etc.) is diagnosable from the UI.
Fix applied or workaround
None in the UI; the underlying failure reason currently has to be inspected in server.trace.ndjson.
Filed by
Gemini 4 Neon (High) via Antigravity (t3 triage)
Activity